codex-toolkit / home
AGENTS.md0 starsChanged 4 months agoMITView on GitHub
- Reads credentials
- Deletes or force-pushes
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- AGENTS.mdAGENTS.md
- run-checksSkill
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 0 are common, 5 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 14
Verify your work: run the tests/linters/build the repo provides before saying "done".
- Very specific: line 20
Never skip hooks/signing (--no-verify, --no-gpg-sign) unless explicitly told.
- Distinctive: line 21
Prefer new commits over amending published history.
- Very specific: line 22
Never commit secrets. .env.example only.
- Distinctive: line 26
Default to no comments. Add one only when the WHY is non-obvious.
- Distinctive: line 28
No backwards-compat shims, dead re-exports, or "// removed" tombstones.
- Distinctive: line 39
When you learn something durable (a scar, a preference), note it in the PSM.
- Distinctive: line 43
Read it before starting work in that repo.
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Global Agent Instructions (~/.codex/AGENTS.md)
<!--
COMPRESSED global instructions, applied to EVERY repo. Ordering matters for
prompt caching: keep the STATIC top section byte-stable, push anything that
changes to the bottom. Target <=150 lines. Full rationale in AGENTS-full.md.
-->Operating principles (static — keep byte-stable for cache hits)
- Understand before acting. Read the relevant code/docs first; never guess paths.
- Smallest change that solves it. No speculative features, abstractions, or refactors.
- Match existing style and conventions in the file/repo you are editing.
- Trust internal code and framework guarantees; validate only at real boundaries.
- Verify your work: run the tests/linters/build the repo provides before saying "done".
- Be terse. State results and decisions, not deliberation.
Safety (static)
- Risky/irreversible actions (delete, force-push, reset --hard, drop table, send messages, anything affecting shared state) require explicit confirmation.
- Never skip hooks/signing (
--no-verify,--no-gpg-sign) unless explicitly told. - Prefer new commits over amending published history.
- Never commit secrets.
.env.exampleonly; reference secrets by env-var name. - Fix root causes; do not bypass safety checks to make an error disappear.
Code conventions (static)
- Default to no comments. Add one only when the WHY is non-obvious.
- Name things well so the WHAT is self-evident; don't narrate the code.
- No backwards-compat shims, dead re-exports, or "// removed" tombstones.
Cost & resilience (static)
- Respect the cost circuit-breaker (
~/.codex/scripts/cost-breaker.py); do not loop expensive calls. If it trips, stop and report rather than forcing past it. - On provider 429/quota errors, fall back along
CODEX_PROVIDER_CHAIN(~/.codex/scripts/quota-fallback.py) instead of hard-failing.
Persistent memory (static)
- At session start, read
~/.codex/session_context.md(PSM) for cross-session context. Honor durable preferences and recorded pitfalls there. - When you learn something durable (a scar, a preference), note it in the PSM.
Per-repo overrides (dynamic — repo AGENTS.md wins)
- A repository's own
AGENTS.mdoverrides anything here on conflict. - Read it before starting work in that repo.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

