agentjail: Instructions file for Codex

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

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: reads .claude/ paths; mentions CLAUDE.md; mentions Claude Code.

This is LuD1161/agentjail's own configuration. It tells Codex and OpenCode how to work on agentjail itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything agentjail configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LuD1161/agentjail. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LuD1161/agentjail/main/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/github.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/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.

agentmods 80×15 button for agentjail AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lud1161/agentjail/agents-md"><img src="https://agentmods.dev/badge/instructions/lud1161/agentjail/agents-md.svg" alt="Reviewed on agentmods" width="80" 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. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.04812 $0.04812
Opus 5.5 $0.01925 $0.01925
Sonnet 5.5 $0.00962 $0.00962
Haiku 4.5 $0.00481 $0.00481

Measured 1mo ago against content hash 23b1761360f1, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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. 1mo 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 (99 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 4,812 tokens to every session, about $0.0192 per session on Opus 5.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

data-scientist copilot-instructions.md

Repository instructions for a data-science workflow in GitHub Copilot, covering datasets, statistics, and analysis files.

realnghon/data-scientist · 373 tokens

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,715 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,461 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens