agentleFS
AbdulSamad94AbdulSamad94/Personal-AI-Employee/.agents/skills/hitl-workflow/SKILL.md

hitl-workflow

Skill8 starsChanged 4 months agoMITView on GitHub

Human-in-the-Loop approval workflow. Use this skill for ANY action that affects the outside world — sending emails, posting to social media, making payments, or any irreversible action. Also use when uncertain about what to do. Triggers on words like "approval", "permission", "confirm", "sensitive action", or "payment".

The file

Show its rules and text

We split this skill into the rules it gives an agent

14 rules. About 0 are common, 10 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Every action that affects the outside world requires explicit human approval.

    line 13
  2. Distinctive:

    After expiry, a new approval request must be created.

    line 101
  3. Distinctive:

    When you need to execute pending actions, follow this process:

    line 105
  4. Very specific:

    If no files in vault/Approved/, wait — do not act

    line 115
  5. Very specific:

    When a file appears in vault/Rejected/:

    line 119
  6. Distinctive:

    Read it to understand what was rejected

    line 121
  7. Distinctive:

    Check if there are any notes added by the human

    line 122
  8. Distinctive:

    Update the original task file status to: rejected

    line 123
  9. Distinctive:

    Do NOT retry the action unless explicitly asked

    line 126
  10. Very specific:

    If an approval file exists in vault/Pending_Approval/ past its expiry:

    line 130
  11. Very specific:

    Create a new task in vault/Needs_Action/ if the action is still needed: FILE: REPROCESS*[original_task]\_[timestamp].md Content: "Previous …

    line 134
  12. Distinctive:

    NEVER retry a payment automatically even if it failed

    line 144
  13. Distinctive:

    NEVER send payment to a new recipient without prior history

    line 145
  14. Distinctive:

    Always include the invoice or reference document

    line 147

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “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

Skill: Human-in-the-Loop (HITL) Approval Workflow

Core Principle

You are a powerful AI agent but you are NOT autonomous by default. Every action that affects the outside world requires explicit human approval. This is not optional. This is the most important rule you follow.

The Three Folders

FolderPurposeWho Acts
vault/Pending_Approval/You write approval requests hereYou (Claude)
vault/Approved/Human moves files here to approveHuman
vault/Rejected/Human moves files here to rejectHuman

You WRITE to Pending_Approval/. You NEVER write directly to Approved/. You CHECK Approved/ to know when to execute. You NEVER act without checking Approved/ first.

When HITL is REQUIRED (No Exceptions)

  • Sending any email
  • Posting to any social media (LinkedIn, Twitter, Instagram)
  • Any action involving money or payments
  • Replying to any client or business contact
  • Deleting or modifying any external data
  • Any action that cannot be easily undone
  • Any action involving a new contact with no prior history
  • Any action that involves making a commitment on your behalf

When HITL is NOT Required

  • Reading files
  • Creating plan files
  • Updating Dashboard.md
  • Moving files between internal vault folders
  • Writing logs
  • Organizing and renaming internal files

Approval File Template

For ALL external actions, create this file in vault/Pending_Approval/:

Filename format: [ACTION_TYPE][description][YYYYMMDD_HHMMSS].md


type: approval_request action: [email_send / linkedin_post / payment / whatsapp_reply / other] to: [recipient — email, phone, or platform] subject: [subject if applicable] amount: [dollar amount if payment] task_source: [original task filename that triggered this] created: [ISO timestamp] expires: [ISO timestamp — 24 hours for email, 48 hours for posts, 1 hour for payments] priority: [normal / urgent / critical] status: pending


What Will Happen If You Approve

[Describe in plain language exactly what action will be taken]

Content / Details

[The exact content — email body, post text, payment details, etc.]

Why This Action

[Brief explanation of why this needs to happen]

Risks If Not Approved

[What happens if this is rejected or ignored]

✅ To Approve

Move this file to vault/Approved/

✏️ To Edit Then Approve

Edit the content above, then move to vault/Approved/

❌ To Reject

Move this file to vault/Rejected/

⏰ Expiry

This approval expires at [expiry timestamp]. After expiry, a new approval request must be created.

Checking for Approvals

When you need to execute pending actions, follow this process:

  1. List all files in vault/Approved/
  2. For each approved file: a. Read the file b. Verify it hasn't expired (check the expires field) c. Verify the action type matches what you're about to do d. Execute the action via the appropriate MCP server e. Log the execution f. Move the file from vault/Approved/ to vault/Done/
  3. If no files in vault/Approved/, wait — do not act

Handling Rejections

When a file appears in vault/Rejected/:

  1. Read it to understand what was rejected
  2. Check if there are any notes added by the human
  3. Update the original task file status to: rejected
  4. Log: [timestamp] | rejected | [filename] | [action_type]
  5. Move the rejection file to vault/Done/
  6. Do NOT retry the action unless explicitly asked

Handling Expired Approvals

If an approval file exists in vault/Pending_Approval/ past its expiry:

  1. Move it to vault/Rejected/ with a note: "Expired — no action taken"
  2. Log the expiry
  3. Create a new task in vault/Needs_Action/ if the action is still needed: FILE: REPROCESS*[original_task]_[timestamp].md Content: "Previous approval expired. Human review needed to determine if this should be re-processed."

Payment-Specific Rules

Payments have stricter rules than all other actions:

  • Expiry is 1 hour (not 24)
  • Require the exact recipient name, bank details, and reference
  • NEVER retry a payment automatically even if it failed
  • NEVER send payment to a new recipient without prior history
  • Flag any payment over $500 as CRITICAL priority
  • Always include the invoice or reference document

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.