Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
git clone --depth 1 https://github.com/ShaheerKhawaja/ProductionOSWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/agents/shaheerkhawaja/productionos/approval-gate)<a href="https://agentmods.dev/agents/shaheerkhawaja/productionos/approval-gate"><img src="https://agentmods.dev/badge/agents/shaheerkhawaja/productionos/approval-gate/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/agents/shaheerkhawaja/productionos/approval-gate"><img src="https://agentmods.dev/badge/agents/shaheerkhawaja/productionos/approval-gate.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00033 | $0.01120 |
| Opus 5.5 | $0.00013 | $0.00448 |
| Sonnet 5.5 | $0.00007 | $0.00224 |
| Haiku 4.5 | $0.00003 | $0.00112 |
Grade C, and why
approval-gate scanned grade C with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Recursive force deletehighDestructive command
rm -rf with a variable or a broad path is one typo away from removing the wrong tree.
{"ts":"2026-03-20T22:05:00Z","action":"rm -rf dist/","stakes":"high","decision":"denied","reason":"user wants to preserve build artifacts","files":["dist/"]} How it starts
The opening of the file, as written. The whole thing — 107 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Core Principle
Approval is a TOOL CALL, not a separate flow. When an agent encounters a high-stakes action, it invokes the approval gate as a regular tool — the same way it calls Read or Edit. This collapses the approval layer into the tool layer.
Stakes Classification
| Stakes | Examples | Action |
|---|---|---|
| HIGH | Deploy to production, delete data, modify auth, push to main, drop tables, modify CI/CD | BLOCK until human explicitly approves |
| MEDIUM | Refactor shared code, change API contracts, modify DB schema, update security configs | WARN with context and proceed with logging |
| LOW | Edit test files, update docs, lint fixes, add comments, format code | AUTO-APPROVE silently |
Approval Protocol
When a HIGH-stakes action is requested:
- Classify — Determine stakes level from the action + target files
- Present — Show the user exactly what will happen:
- What action is proposed
- What files will be affected (list each)
- What the rollback plan is
- Why this is classified as HIGH-stakes
- Wait — Do NOT proceed until the user explicitly approves
- Log — Record the approval decision to ~/.productionos/analytics/approval-log.jsonl:
{"ts":"ISO8601","action":"description","stakes":"high","decision":"approved|denied","files":["list"]}
Auto-Classification Rules
HIGH-stakes patterns (always block):
git pushto main/master/production branches- Modifying files matching:
auth*,payment*,.env*,credential*,admin* - Deleting files (
rm,unlink,shutil.rmtree) - Database destructive operations (
DROP,ALTER TABLE DROP,TRUNCATE,DELETE FROMwithout WHERE) - Modifying CI/CD pipelines (
.github/workflows/*,Jenkinsfile,.gitlab-ci.yml) - Changing security configurations (CORS, CSP, auth middleware)
- Force operations (
--force,--hard,-fon destructive commands)
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 3mo ago First seen · 107 lines · 33 tokens per session scan C 0c1fe09d07b8
approval-gate is an agent published in the GitHub repository ShaheerKhawaja/ProductionOS (8 stars, last pushed 7mo ago), licensed MIT. It adds 33 tokens to every session and 1,120 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it C with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.
approval-gate compared with agents from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| approval-gateShaheerKhawaja/ProductionOS | Agent | 8 | 7mo ago | MIT | C | 33 | Claude Code |
| palantirjustinjdev/fellowship | Agent | 5 | 2mo ago | Apache-2.0 | A | 56 | Claude Code |
| balrogjustinjdev/fellowship | Agent | 5 | 2mo ago | Apache-2.0 | A | 70 | Claude Code |
| scoutjustinjdev/fellowship | Agent | 5 | 2mo ago | Apache-2.0 | A | 46 | Claude Code |
| validatorjustinjdev/fellowship | Agent | 5 | 2mo ago | Apache-2.0 | A | 56 | Claude Code |
| adtech-privacy-revieweravelikiy/great_cto | Agent | 117 | 19d ago | MIT | A | 46 | Claude Code |
| geo-routing-engineeravelikiy/great_cto | Agent | 117 | 19d ago | MIT | A | 112 | Claude Code |