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.
npx agentmods add instructions/lud1161/agentjail/agents-mdgit clone --depth 1 https://github.com/LuD1161/agentjailWrote 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/instructions/lud1161/agentjail/agents-md)<a href="https://agentmods.dev/instructions/lud1161/agentjail/agents-md"><img src="https://agentmods.dev/badge/instructions/lud1161/agentjail/agents-md.svg" alt="Measured on agentmods" 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 | $0.04812 | $0.04812 |
| Opus 5 | $0.02406 | $0.02406 |
| Sonnet 5 | $0.00962 | $0.00962 |
| Haiku 4.5 | $0.00481 | $0.00481 |
Grade A, and why
agentjail AGENTS.md scanned grade A with 0 findings 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 4d 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 342 lines — stays where its author put it; the contents beside it link to each section on GitHub.
agentjail — agent instructions
Every coding agent (Claude Code, Codex CLI, Cursor, Aider, etc.) working in this repo must follow these instructions. They override default behavior.
This file is the canonical, tool-agnostic rule set. Tool-specific configs (e.g. a local CLAUDE.md, .cursorrules, .codex/instructions.md) should reference or @-import this file rather than duplicate it. Personal/per-contributor preferences belong in your own gitignored config, not here.
What this project is
agentjail gives every coding agent (Claude Code, Codex CLI, Cursor) a policy guardrail — enforcing what files it can read/write, which MCPs it can call, and which shell commands it can run — without requiring any changes to the agent itself.
Three deployment tiers, in build order:
- Tier 1 — Hooks (shipped): plug into the hook systems that Claude Code / Codex / Cursor already ship. Zero new infrastructure. Lightest isolation.
- Tier 2 — MicroVM/Container: run the agent in isolation; monitor at the container boundary. Stronger isolation for setups that need hard containment.
- Tier 3 — Kernel module: EDR-style, system-wide. Strongest isolation, works for any process on the machine.
Read this before doing anything
docs/ARCHITECTURE.md— mandatory first read. Architecture overview: hook → daemon → OPA flow, isolation tiers, policy model.docs/ENGINEERING.md— engineering principles that govern every change.docs/GOTCHAS.md— bugs this codebase actually shipped, and the shape of each mistake. Every entry was invisible to a green test suite. Read it before touching the tunnel, the policy DSL, or any per-OS backend; add to it when you fix something a passing suite hid.docs/adr/0001-os-sandbox-enforcement-layer.md— OS sandbox (agentjail-shield) decision.docs/adr/0002-latency-as-engineering-metric.md— latency targets.docs/adr/0003-mcp-reverse-proxy.md— MCP proxy strategy.docs/adr/0004-credential-broker-tier1.md— credential broker design (Tier 1.5 OSS path).docs/adr/— all ADRs. Each captures one decision with Context / Decision / Consequences.
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.
- 4d ago First seen · 342 lines · 4,812 tokens per session scan A 23b1761360f1
agentjail AGENTS.md is an instructions file published in the GitHub repository LuD1161/agentjail (86 stars, last pushed today), licensed Apache-2.0. It adds 4,812 tokens to every session, about $0.0241 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
llm-safe-haven CLAUDE.md
Instructions for pleasedodisturb/llm-safe-haven, covering llm safe haven, what this is, project structure, tdd — non-negotiable (adopted 2026-08-17) and the contract.
llm-safe-haven AGENTS.md
Instructions for pleasedodisturb/llm-safe-haven, covering agents.md, what this file is (and isn't), why this shape (d-08), working agreements and current state.
zyrax-guard AGENTS.md
Instructions for tiagosilva07/zyrax-guard, covering engineering baseline, stack, how to behave, hard rules and conventions.
xche-ai-app-security-pack AGENTS.md
Instructions for xChechi/xche-ai-app-security-pack, a project described as: Free security guardrails for apps built with AI coding tools (Claude Code, Cursor, Lovable, Bolt). Drop-in rules + OWASP/LLM/MCP policy + secret-scanning hooks & CI gate.
xche-ai-app-security-pack CLAUDE.md
Instructions for xChechi/xche-ai-app-security-pack, a project described as: Free security guardrails for apps built with AI coding tools (Claude Code, Cursor, Lovable, Bolt). Drop-in rules + OWASP/LLM/MCP policy + secret-scanning hooks & CI gate.
code-security-skill CLAUDE.md
Claude Code instructions for Chiehyii/code-security-skill, covering code security skill — claude.md, what this skill does, how to use the search engine, full security report for any feature and get checklist for file upload.