agent-config
When to Use
Create, update, or audit the instruction files coding agents load every session. AGENTS.md is the default output: it's the open standard that Claude Code (v2.1.277+), Codex, Cursor, Copilot, and others read. Produce CLAUDE.md as the output only on an explicit request, meaning the user asks for a CLAUDE.md to be written or edited ("create a CLAUDE.md", "add X to CLAUDE.md"). Naming it as a source doesn't count ("migrate our CLAUDE.md to AGENTS.md"), and neither does a CLAUDE.md that already exists on disk. Skip READMEs and contributor docs, skills (skill-creator), and subagent files under .claude/agents/.
Core Principle
These files are context, not enforced configuration. They load every session, and the agent may still deviate from them.
- Short, always-on facts the agent cannot infer go in the file.
- Multi-step procedures go in a skill. Anything that must never happen goes in a
PreToolUsehook plus permissions. Verification of the work goes in tests or CI. - Minimal beats complete. Agents run every command the file lists and obey every rule, so each extra line costs steps and tokens on every task. LLM-generated files that restate the repo measured about 20% more cost with no success gain. This skill is an LLM writing such a file, so the prune pass in Step 3 is mandatory for new content.
Which layer owns an instruction: references/knowledge-routing.md. Loading rules and sources: references/official-standards.md.
Prerequisites
- A git repo with
originset, for anything that writes.auditonly needs read access. - Tools:
git, and write access to the target path.