codex-howto / examples
AGENTS.md15 starsChanged 3 months agoMITView on GitHub
Adapt this file to the repository. Remove any command or rule that you have not verified. Run from the repository root: Use package-level focused tests before running the full suite.
- Installs packages
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,774 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 repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- build-backendSkill
- build-frontendSkill
- engineering-loopSkill
- maintain-codex-wikiSkill
- operate-devopsSkill
- orchestrate-engineeringSkill
- review-codeSkill
- review-securitySkill
- test-softwareSkill
The file
We split this AGENTS.md into the rules it gives an agent
8 rules. About 1 is common, 7 are distinctive, and 0 are very specific to this project.
≈1
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
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
- Distinctive: line 15
Run from the repository root:
- Distinctive: line 25
Use package-level focused tests before running the full suite.
- Distinctive: line 31
Add a migration for persisted schema changes.
- Common: line 33
Keep secrets out of source files, logs, fixtures, and command output.
- Distinctive: line 34
Do not edit generated files directly.
- Distinctive: line 40
Run the relevant component or browser test after rendered changes.
- Distinctive: line 50
Run format, validate, and plan/render steps before proposing an apply.
- Distinctive: line 51
Never change production resources without explicit approval and a recovery plan.
≈ “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
Example repository guidance
Adapt this file to the repository. Remove any command or rule that you have not verified.
Layout
apps/web/: customer-facing web applicationservices/api/: public API and background jobspackages/contracts/: shared schemas and generated client sourcesinfra/: infrastructure as code and deployment configurationdocs/: architecture and operational documentation
Commands
Run from the repository root:
pnpm install --frozen-lockfile
pnpm lint
pnpm typecheck
pnpm test
pnpm buildUse package-level focused tests before running the full suite.
Engineering rules
- Inspect existing patterns before introducing a dependency or abstraction.
- Change shared API shapes in
packages/contracts/before updating consumers. - Add a migration for persisted schema changes; do not edit production data manually.
- Preserve backward compatibility unless the task explicitly changes a public contract.
- Keep secrets out of source files, logs, fixtures, and command output.
- Do not edit generated files directly.
Frontend
- Reuse the shared component library and design tokens.
- Include loading, empty, error, and keyboard behavior for interactive features.
- Run the relevant component or browser test after rendered changes.
Backend
- Validate input and enforce resource-level authorization.
- Cover success, failure, and denied cases.
- Design retryable side effects to be idempotent.
Infrastructure
- Run format, validate, and plan/render steps before proposing an apply.
- Never change production resources without explicit approval and a recovery plan.
Definition of done
- Focused tests pass.
- Required lint, type, and build checks pass.
- The final diff contains no unrelated changes.
- The final response lists changed files, commands run, unverified checks, and residual risks.
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.

