agentjail AGENTS.md

agentjail AGENTS.md is an instructions file for Codex, OpenCode from LuD1161/agentjail. It costs 4,812 tokens per session, scanned A, original, Apache-2.0.

A shared instruction file for coding agents working on the agentjail project. It defines the project context and rules for what agents may access and run.

In plain words
What is it for?
It helps agents work safely in the repository, including controlling file access, shell commands, and external tool connections.
Why use it?
It keeps different coding agents following one consistent set of project rules instead of relying on duplicated or conflicting settings.

Instructions file for CodexOpenCode

Install

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.

agentmods
npx agentmods add instructions/lud1161/agentjail/agents-md
Clone the repo
git clone --depth 1 https://github.com/LuD1161/agentjail

Made for: Codex, OpenCode.

Wrote 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.

agentmods badge for agentjail AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lud1161/agentjail/agents-md.svg)](https://agentmods.dev/instructions/lud1161/agentjail/agents-md)
Your own site
<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>
Per session 4,812 This file is loaded in full into every session.
When invoked 4,812 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce 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

Measured 4d ago against content hash 23b1761360f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

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.

AGENTS.md · 342 lines

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:

  1. Tier 1 — Hooks (shipped): plug into the hook systems that Claude Code / Codex / Cursor already ship. Zero new infrastructure. Lightest isolation.
  2. Tier 2 — MicroVM/Container: run the agent in isolation; monitor at the container boundary. Stronger isolation for setups that need hard containment.
  3. Tier 3 — Kernel module: EDR-style, system-wide. Strongest isolation, works for any process on the machine.

Read this before doing anything

  1. docs/ARCHITECTURE.md — mandatory first read. Architecture overview: hook → daemon → OPA flow, isolation tiers, policy model.
  2. docs/ENGINEERING.md — engineering principles that govern every change.
  3. 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.
  4. docs/adr/0001-os-sandbox-enforcement-layer.md — OS sandbox (agentjail-shield) decision.
  5. docs/adr/0002-latency-as-engineering-metric.md — latency targets.
  6. docs/adr/0003-mcp-reverse-proxy.md — MCP proxy strategy.
  7. docs/adr/0004-credential-broker-tier1.md — credential broker design (Tier 1.5 OSS path).
  8. docs/adr/ — all ADRs. Each captures one decision with Context / Decision / Consequences.

Read the full file on GitHub · 342 lines

Changes

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.

  1. 4d ago First seen · 342 lines · 4,812 tokens per session scan A 23b1761360f1

Subscribe to this mod's changes

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.

Related

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.

pleasedodisturb/llm-safe-haven · 1,322 tokens

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.

pleasedodisturb/llm-safe-haven · 965 tokens

zyrax-guard AGENTS.md

Instructions for tiagosilva07/zyrax-guard, covering engineering baseline, stack, how to behave, hard rules and conventions.

tiagosilva07/zyrax-guard · 565 tokens

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.

xChechi/xche-ai-app-security-pack · 763 tokens

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.

xChechi/xche-ai-app-security-pack · 764 tokens

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.

Chiehyii/code-security-skill · 1,160 tokens