agentleFS
mmccallammccalla/coding-agent-skill-library/skills/human-in-the-loop/SKILL.md

human-in-the-loop

Skill4 starsChanged 5 months agoApache-2.0View on GitHub

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

5 other projects use a version of this.

Adopted by

Most recently taken up by

The file

We split this skill into the rules it gives an agent

7 rules. 0 are common, 6 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 5 edited versions we read keep these.

  • 6

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this skill when automation alone is insufficient because the task is ambiguous, high-impact, irreversible, privacy-sensitive, …

    line 15
  2. Distinctive:

    Ask for human input before:

    line 31
  3. Distinctive:

    Do not bury approval requests in long prose.

    line 54
  4. Distinctive:

    Do not ask for approval for trivial reversible steps.

    line 55
  5. Distinctive:

    Do not proceed on implied approval for destructive or privileged operations.

    line 56
  6. Distinctive:

    Do not rely on prompt text alone as the approval control.

    line 57
  7. Very specific:

    Use skills_docs/security/OWASP_ASI_CROSSWALK.md for the shared risk map.

    line 62

“Common” is measured: kept by at least 6 in 10 of the 5 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

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

Decision required: <short title>
Context: <what led to this point>
Options: A / B / C
Recommendation: <preferred option>
Main trade-off: <cost of the recommendation>
Risk if wrong: <consequence>
Approval needed: <exact action>

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

Verification

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

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.