---
name: "human-in-the-loop-approval-gate"
description: "Enforce mandatory interactive approval before agents execute destructive or financial operations."
metadata:
  author: "Anthropic"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "require approval for destructive action"
  - "add confirmation gate agent"
  - "preview diff before execution"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Human-in-the-Loop Safe Destructive Action Gate

Builds explicit approval checkpoints for high-risk actions (file deletion, database migrations, cloud provisioning, sending emails): structured diff previews, risk classifications, and confirmation prompts.

## When to Invoke
Invoke this skill whenever you need to:
- require approval for destructive action
- add confirmation gate agent
- preview diff before execution

## Execution SOP & Rules
1. Classify tool calls into Read-Only (safe to auto-execute) vs Destructive (requires approval).
2. Display exact arguments and a human-readable summary of the intended side effects.
3. Abort execution immediately if the user rejects the action or cancels the prompt.
4. Log all approval decisions and timestamps in an audit log for compliance tracking.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
