write-agents-md
Skill0 starsChanged 6 months agoMITView on GitHub
Use when Codex needs to create, rewrite, audit, slim down, or install AGENTS.md/CLAUDE.md agent instruction files for a repository, especially when avoiding /init-style generated context, reducing context debt, adding repo-specific pitfalls, or setting nested AGENTS.md guidance.
7 other projects use a version of this.
Adopted by
Most recently taken up by
- joshua-zyy/write-agents-mdtheir own version, first seen Oct 3, 2026
- AsakuraMizu/skillstheir own version, first seen Sep 18, 2026
- narumiruna/skillstheir own version, first seen Jul 15, 2026
- brandhaug/skillstheir own version, first seen Jul 3, 2026
- dzianisv/skillstheir own version, first seen Jun 16, 2026
- josecabralf/skillstheir own version, first seen Jun 5, 2026
Other versions7 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 7
- narumiruna/skills★ 15same name
- dzianisv/skills★ 4same name
- AsakuraMizu/skills★ 2same name
- brandhaug/skills★ 0same name
- josecabralf/skills★ 0same name
- joshua-zyy/write-agents-md★ 0same name
- justinchoo93/skills★ 0same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
We split this skill into the rules it gives an agent
12 rules. 0 are common, 9 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 7 edited versions we read keep these.
9
Distinctive
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
- Distinctive: line 11
Treat AGENTS.md as a compact map of project-specific traps and verification rules, not as a README for agents.
- Distinctive: line 13
Only include information that changes agent behavior and is hard to infer from the repo itself.
- Distinctive: line 19
If scope is unclear, ask before editing.
- Very specific: line 27
Keep: exact commands, required flags, forbidden substitutions, repeated agent mistakes, deployment/runtime traps, security/performance/UX …
- Distinctive: line 28
Remove: folder tours, stack lists, README duplicates, broad architecture essays, obvious style rules, team background.
- Distinctive: line 30
Prefer nested files for large workspaces.
- Distinctive: line 35
Write in Korean by default unless the repo clearly uses English docs.
- Distinctive: line 36
Use bullets and short sections.
- Distinctive: line 37
Keep the file small. Aim for under 80 lines unless the repo genuinely needs more.
- Distinctive: line 42
Check that commands are executable-looking and not invented.
- Very specific: line 82
Default behavior is --scope user --agent codex.
- Very specific: line 86
Read references/principles.md when you need the inclusion/exclusion checklist, anti-patterns, or examples.
“Common” is measured: kept by at least 6 in 10 of the 7 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Write AGENTS.md
Core Principle
Treat AGENTS.md as a compact map of project-specific traps and verification rules, not as a README for agents.
Only include information that changes agent behavior and is hard to infer from the repo itself.
Workflow
- Identify the target scope.
- Root repo? Monorepo package? Existing
CLAUDE.mdmirror? - If scope is unclear, ask before editing.
- Root repo? Monorepo package? Existing
- Read current evidence.
- Existing
AGENTS.md,CLAUDE.md,README.md - Package scripts, test config, CI config, lint/typecheck commands
- Nearby files only as needed to verify non-obvious conventions
- Existing
- Filter every candidate line.
- Keep: exact commands, required flags, forbidden substitutions, repeated agent mistakes, deployment/runtime traps, security/performance/UX guardrails, PR/commit checks.
- Remove: folder tours, stack lists, README duplicates, broad architecture essays, obvious style rules, team background.
- Prefer nested files for large workspaces.
- Root
AGENTS.md: routing and global rules only. - Subdirectory
AGENTS.md: package-specific traps and commands. - The closest file should carry the most specific instruction.
- Root
- Write in Korean by default unless the repo clearly uses English docs.
- Use bullets and short sections.
- Keep the file small. Aim for under 80 lines unless the repo genuinely needs more.
- Each changed line must trace to discovered repo evidence or user-provided constraints.
- Verify.
- Re-read the final file.
- Check that commands are executable-looking and not invented.
- Mention any assumptions or missing commands instead of guessing.
Starter Install Command
To install a lean starter AGENTS.md in the current project:
agents-md-initUseful variants:
agents-md-init /path/to/project
agents-md-init --print
agents-md-init --forceThe command writes a cautious starter template only. After installing it, inspect the project and replace placeholders with evidence-backed rules.
Skill Install Command
To install this skill itself:
agents-md-skill installUseful variants:
agents-md-skill install --scope user
agents-md-skill install --scope project
agents-md-skill install --agent claude --scope user
agents-md-skill install --agent gemini --scope project
agents-md-skill install --agent all --scope user
agents-md-skill install /path/to/project --agent codex --scope projectDefault behavior is --scope user --agent codex. Use --force to overwrite an existing installed copy.
Reference
Read references/principles.md when you need the inclusion/exclusion checklist, anti-patterns, or examples.
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.

