Writing AGENTS.md and CLAUDE.md files
For engineers
Deciding what goes into a coding agent's project memory file, how files layer, and how to prove a file changes behaviour
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
Which line is the best candidate for a repository memory file?
Check yourself · 2 of 5
A teammate wants to paste the staging API key into the memory file so the agent can deploy. What is the best response?
Check yourself · 3 of 5
Where does a rule that applies only to the services/billing/ package best live?
Check yourself · 4 of 5
What is the cleanest way to test whether a memory-file rule matters?
Check yourself · 5 of 5
An agent proposes adding a 40-line procedure for adding a payment provider to the root memory file. What is the best response?
Topics
- Commands, conventions and boundaries worth writing down4 min read · Build and test commands, house conventions, architecture pointers and no-go areas an agent cannot infer from the code
- Content that bloats or endangers a memory file4 min read · Secrets, copied documentation, stale facts, vague style advice and long tutorials that waste tokens or leak data
- Layering global, repository and folder instructions5 min read · How user, repo, nested folder and path-scoped rule files combine, which wins on conflict, and how imports work
- Testing whether a memory file changes agent behaviour5 min read · Running the same tasks with and without a rule, reading transcripts and catching rules the agent ignores
- Keeping memory files short and current4 min read · Size budgets, pruning, owners, and reviewing agent-proposed memory updates like code
Start here
- AGENTS.md (opens in a new tab)DocsFree
The open format, what to put in the file and which agents read it.
- How Claude remembers your project (Claude Code docs) (opens in a new tab)DocsFree
How CLAUDE.md, AGENTS.md, imports and path-scoped rules load, and how to troubleshoot ignored files.
- Custom instructions with AGENTS.md (OpenAI Codex docs) (opens in a new tab)DocsFree
How Codex discovers AGENTS.md files from global to nested, and its 32 KiB default size limit.
Helps to know first
110 questions · last verified 2026-12