human-in-the-loop-gatelisted
Install: claude install-skill imtiazrayhan/agentscamp-library
An agent that can act autonomously will eventually try to do something you'd want to stop — spend money, delete a record, email a customer, force-push to main. A human-in-the-loop (HITL) gate makes consequential actions **require approval** without turning the whole agent into a manual tool. This skill adds that gate cleanly.
## When to use this skill
- An agent performs irreversible or costly actions (payments, deletions, deploys, outbound messages, merges).
- You're moving an agent from a trusted sandbox toward production or real-user traffic.
- A compliance or safety requirement mandates a human checkpoint before certain operations.
## Instructions
1. **Classify actions by consequence.** Separate reversible/cheap actions (read a file, search) the agent may do freely from consequential ones (write to prod, spend, send, delete) that require approval. Gate only the latter — gating everything destroys the point of an agent.
2. **Interrupt before the action, not after.** At the gate, pause the agent and surface the **proposed action plus its context**: exactly what it will do, the arguments, and why. The human approves, edits, or rejects.
3. **Make the pause durable.** Persist agent state at the interrupt (checkpoint) so approval can come seconds or hours later, and a process restart doesn't lose the run. Frameworks like [LangGraph](/tools/langgraph) provide interrupt/resume primitives; for others, persist state explicitly.
4. **Handle all three outcomes.** Approve → resume