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 | $0.00016 | $0.00560 |
| Sonnet 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 9d 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.
- 9d 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 4mo ago), licensed MIT. It adds 33 tokens to every session and 1,120 once invoked, about $0.0002 per session on Opus 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.
Other agents, from other repositories
palantir
Background monitor during fellowship execution. Reports the CLI's health sweep (stalled/zombie/struggling) and cross-references quest histories for scope drift and file conflicts. Spawned by Gandalf alongside quest teammates. Reports issues to the lead via SendMessage.
balrog
Adversarial validation agent. Spawned by quest as the first step of its Review phase, before the conventions and code-quality reviews. Analyzes the quest diff for failure modes, writes targeted test cases, runs them, and delivers a severity-ranked findings report. Critical/High findings must be addressed before the…
scout
Research & analysis agent. Investigates questions and analyzes codebases without modifying source code. Can write research notes to docs/research/ or .fellowship/. No git operations, no commits, no PRs.
validator
Read-only adversarial validator. Spawned by scout to verify research findings against the actual code. Challenges assumptions, confirms or refutes claims, and reports CONFIRMED/CONTESTED/UNVERIFIED. Cannot modify files or run commands — enforced by tool restrictions.
project-auditor
Use for /audit or when no PROJECT.md exists. Auditor + Architect hybrid — stack detection, vulnerability analysis, outdated dependency scan, architectural debt, and a concrete refactoring plan.
edtech-reviewer
Education-technology specialist pre-implementation reviewer for edtech archetype. Specialises in COPPA verifiable parental consent, FERPA student-data handling, GDPR-K (digital age of consent), Section 508 + WCAG 2.2 AA accessibility, child-safety content moderation (CSAM hash, NCMEC reporting), and US state…