# Human In The Loop

> Use when a coding agent must request approval, expert judgement, clarification, review, or intervention before proceeding with high-risk or ambiguous work.

- **Type:** Skill
- **Install:** `agentstack add skill-mmccalla-coding-agent-skill-library-human-in-the-loop`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [mmccalla](https://agentstack.voostack.com/s/mmccalla)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** Apache-2.0
- **Upstream author:** [mmccalla](https://github.com/mmccalla)
- **Source:** https://github.com/mmccalla/coding-agent-skill-library/tree/main/skills/human-in-the-loop

## Install

```sh
agentstack add skill-mmccalla-coding-agent-skill-library-human-in-the-loop
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Human-in-the-Loop

## When to use

Use this skill when automation alone is insufficient because the task is ambiguous, high-impact, irreversible, privacy-sensitive, legally/materially significant, or requires domain judgement.

## Objective

Introduce human judgement at the right decision points without slowing safe, reversible work unnecessarily. Approval must use **architectural enforcement outside the model** (tool dispatcher, policy engine or workflow gate), not prompt-only instructions the agent can ignore.

## Procedure

1. Detect the need for human judgement using confidence, impact, reversibility and policy checks.
2. Pause execution before the risky action at a gate enforced outside the LLM (dispatcher or policy engine refuses execution until approval clears).
3. Present a concise decision packet: context, options, recommendation, trade-off, risk and required approval.
4. Resume only after clear approval or revised instructions recorded by the gate.
5. Record the decision and rationale in the implementation notes.

## Intervention points

Ask for human input before:

- deleting, overwriting or migrating important data;
- changing security, authentication, permissions or secrets;
- making architectural choices with material trade-offs;
- accepting low-confidence model output;
- merging code when tests or validation are incomplete;
- exposing sensitive data to external services.

## Decision packet template

```markdown
Decision required: 
Context: 
Options: A / B / C
Recommendation: 
Main trade-off: 
Risk if wrong: 
Approval needed: 
```

## Guardrails

- Do not bury approval requests in long prose.
- Do not ask for approval for trivial reversible steps.
- Do not proceed on implied approval for destructive or privileged operations.
- Do not rely on prompt text alone as the approval control; enforce the gate outside the model.
- Redact secrets and minimise personal data in review packets.

## OWASP ASI09 controls

Use `skills_docs/security/OWASP_ASI_CROSSWALK.md` for the shared risk map. For ASI09 Human-Agent Trust Exploitation, approval requests must include evidence, uncertainty, consequences, alternatives and the exact action being authorised.

## Related skills

- `apply-laws-of-ai` — escalation aligned with safety laws
- `guardrails-safety-patterns` — policy gates before human review
- `agentic-ux-patterns` — approval and evidence UI patterns

## References

- [OWASP Top 10 for Agentic Applications (ASI09 Human-Agent Trust Exploitation)](https://genai.owasp.org/resource/owasp-top-10-for-agentic-applications-for-2026/)
- [OWASP AI Agent Security Cheat Sheet (HITL controls)](https://cheatsheetseries.owasp.org/cheatsheets/AI_Agent_Security_Cheat_Sheet.html)

## Verification

- [ ] HITL trigger is explicit.
- [ ] Options are clear and bounded.
- [ ] Recommendation and risk are stated.
- [ ] Approval action is unambiguous.
- [ ] Decision is recorded.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [mmccalla](https://github.com/mmccalla)
- **Source:** [mmccalla/coding-agent-skill-library](https://github.com/mmccalla/coding-agent-skill-library)
- **License:** Apache-2.0

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-mmccalla-coding-agent-skill-library-human-in-the-loop
- Seller: https://agentstack.voostack.com/s/mmccalla
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
