request-approval
Use Preloop's request_approval tool to get human approval before risky operations like deletions, production changes.
Installation
npx clawhub@latest install request-approvalView the full skill documentation and source below.
Documentation
Request Approval Skill
Use Preloop's request_approval MCP tool to get human approval before executing risky operations. Preloop will notify the user (via Slack, email, mobile apps, etc.) and wait for their response.
Setup
Preloop must be configured as an MCP server. See references/SETUP.md for configuration details.
When to Request Approval
ALWAYS Request Approval For:
- Deleting anything (files, directories, database records, cloud resources)
- Production changes (deployments, config changes, environment variables)
- Database operations (schema changes, migrations, bulk deletions/updates)
- External modifications (creating/merging PRs, posting to APIs, sending emails)
- Security changes (permissions, access controls, API keys)
- Financial operations (purchases, charges, refunds)
- System modifications (installing packages, changing system settings, CI/CD changes)
Usually Request Approval For:
- Creating pull requests or issues (unless explicitly requested)
- Pushing commits to main/master branches
- Modifying critical files (package.json, requirements.txt, docker-compose.yml, etc.)
- Running commands that modify system state
- Making bulk changes (affecting many files/records)
DON'T Request Approval For:
- Reading files or data
- Searching or querying
- Creating feature branches
- Running tests (in isolated environments)
- Making commits to feature branches
How to Use
Call the request_approval tool BEFORE executing the risky operation.
Parameters
Required:
operation(string): Clear, specific description of what you'll do
- ❌ Bad: "Delete some logs"
context(string): Additional details about what will be affected
reasoning(string): Why this operation is necessary
Optional:
caller(string): Auto-populated by Preloopapproval_policy(string): Specific approval policy name (uses account default if omitted)
Response
The tool returns a string:
- Approved: Success message → proceed with the operation
- Denied: "Approval denied" or "Approval denied: {reason}" → STOP, don't execute
- Error: Error message → check configuration or try again
Quick Example
Task: User asks to delete old cache files
Your workflow:
request_approval:- operation: "Delete the temp-cache/ directory"
- context: "Contains 3,421 cache files totaling 1.8GB from batch jobs that ran last week. All jobs completed successfully."
- reasoning: "Cache is no longer needed and is consuming disk space. Results are in the database."
See references/EXAMPLES.md for more examples.
Decision Framework
When unsure:
Golden Rule: When in doubt, request approval. Better to ask unnecessarily than to cause harm.
If Approval is Denied
Best Practices
DO:
- ✅ Request approval BEFORE executing
- ✅ Be specific and detailed
- ✅ Include numbers (file count, size, affected records)
- ✅ Explain the impact
- ✅ Respect denials
DON'T:
- ❌ Execute first, then ask
- ❌ Be vague
- ❌ Bundle multiple operations
- ❌ Proceed if denied
- ❌ Skip approval because you think it's "probably fine"
Additional Resources
- references/SETUP.md - Configuration and MCP server setup
- references/EXAMPLES.md - Detailed examples and workflows
- references/TROUBLESHOOTING.md - Common errors and solutions
Remember: Safety first! Trust is earned by being cautious and respectful of the user's systems and data.