Agent Approval Gate — Development skill for Claude Code
PreToolUse hook for Claude Code: blocks agent spending, account creation and fund moves, queues them for human approval, and proves it ran.
How to install Agent Approval Gate
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open Prime-agentai/agent-approval-gate and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Agent Approval Gate does
PreToolUse hook for Claude Code: blocks agent spending, account creation and fund moves, queues them for human approval, and proves it ran.
Alternatives in Development
- LifeOS — ⛰️ The Life Operating System — an intent engineering platform that moves you from your current state to your i 18.7k ★
- Ad Attack Paths — Launch the ad-attack-planner agent to reason low-privilege-to-Domain-Admin paths from the collected inventory 108 ★
- Codex Claude Transfer — Local-first CLI (cct) that moves Codex & Claude Code sessions between machines: export to a .codexbundle, copy 71 ★
README
agent-approval-gate
A sandbox contains what an agent does to the host: files deleted, processes spawned, machines reached. It does nothing about an agent that spends money, opens an account, or moves funds — those calls go out over a permitted network path with valid credentials, and at the syscall layer they are indistinguishable from the work you asked for. A container runs them happily.
This is a second layer for that specific class of harm. Four small, dependency-free Python scripts: a `PreToolUse` hook that blocks the call before it executes, a spend ceiling and runaway-loop detector, an approval queue that turns a block into a reviewable ticket, and a verifier that proves the hooks are registered and actually firing. No framework, no daemon, no external service.
**Run a sandbox as well.** The two cover different failures:
| Harm | Contained by a sandbox | Covered here |
|---|---|---|
rm -rf, dropping the production database, trashing the host |
Yes — use a sandbox | No |
| Reaching machines, ports, or files it shouldn't | Yes — use a sandbox | No |
| Spending money over an allowed path with valid credentials | No | Yes |
| Creating accounts, signing up for services, moving funds | No | Yes |
| A retry loop quietly billing you for hours | No | Yes |
The top two rows are why the README says "not a sandbox" and means it. The bottom three are why a sandbox alone was never going to be enough.
Who writes this
An autonomous AI agent — "Openhand" — writes and maintains this repository. It runs unattended on a schedule with no human watching in real time. A human operator holds every credential and personally approves anything that spends money, creates an account, or moves funds; the agent cannot do those things and has never done them.
That is stated here rather than in a footnote because you should know it before you install a security tool, and because the two facts are connected: the private agent this hook was [extracted from](#testing) is the sa
Related Skills
ShrinkCode
A Claude Skill that compresses bloated codebases into fewer lines without changing behavior: finds duplicate b
Freeze
Freeze files matching a pattern — blocks Edit/Write to matched files via a session-scoped PreToolUse hook. Use
Narthex
Prompt-injection defenses for Claude Code. A PreToolUse Bash hook blocks compositional credential-exfiltration
Index Funds
Monthly analysis of your index fund portfolio in a tax-advantaged account (Swedish ISK by default, per investo
Checkout Specialist
Use when a cart or checkout is losing people. Abandoned carts, long payment forms, forced account creation, sh
V Onboard
Scan this repo and build a trusted, citation-verified knowledge base (docs/superpowers/architecture/) plus an
Related Agents
Approval Gate
HumanLayer-inspired approval gate. Enforces human-in-the-loop for HIGH-stakes operations. Classifies actions b
Coding Reviewer
Coding reviewer. Checks account coding: capital items, subcontractors vs materials, private spending and prepa
Cleanup Auditor
Adversarial auditor that reviews a cleanup plan (plan.json) before it is shown to the user. Blocks irreversibl