write-agents-md
Skill1 starsChanged 8 days agoMITView on GitHub
指导 AGENTS.md 的撰写与治理:创建、修订、压缩、评审或迁移 AGENTS.md,设计继承的提示作用域,判断内容归属,并协调父子文件的重叠与矛盾。新建或修订任何一份 AGENTS.md(或宿主的同类入口文件)时加载。
9 other projects use a version of this.
Adopted by
Most recently taken up by
- agentkitco/agentkit-dev-skillstheir own version, first seen Nov 1, 2026
- Aarf101/budgetlooptheir own version, first seen Oct 20, 2026
- joshua-zyy/write-agents-mdtheir own version, first seen Oct 3, 2026
- AsakuraMizu/skillstheir own version, first seen Sep 18, 2026
- dzianisv/skillstheir own version, first seen Aug 18, 2026
- narumiruna/skillstheir own version, first seen Jul 15, 2026
Other versions9 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 9
- narumiruna/skills★ 17same name
- dzianisv/skills★ 4same name
- AsakuraMizu/skills★ 2same name
- Aarf101/budgetloop★ 0same name
- agentkitco/agentkit-dev-skills★ 0same 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.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- candid-friendSkill
- cleanupSkill
- clear-writingSkill
- context-packSkill
- delegate-briefSkill
- detailed-domain-designSkill
- domain-impact-analysisSkill
- formal-docs-landingSkill
- formal-guardSkill
- one-lesson-ruleSkill
- pass-the-batonSkill
- pqw-modeSkill
- progress-artifactsSkill
- requirement-and-invariantsSkill
- single-session-dev-flowSkill
- slice-closeoutSkill
- spec-and-planSkill
- teach-pqw-skillsSkill
- tech-research-and-reuseSkill
- think-closed-loopSkill
- think-evidenceSkill
- think-model-firstSkill
- think-orthogonalSkill
- think-ought-vs-isSkill
- think-right-then-wellSkill
- think-unknownsSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
29 rules. 0 are common, 29 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 9 edited versions we read keep these.
29
Distinctive
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
- Distinctive: line 8
Treat an AGENTS.md as persistent cognitive infrastructure, not a convenient place for every useful rule.
- Distinctive: line 14
Follow its applicable writing rules.
- Distinctive: line 15
Keep this skill's authority boundaries, prompt structure, and required report.
- Distinctive: line 19
Keep three layers distinct:
- Distinctive: line 44
Keep content resident only when it is mostly:
- Distinctive: line 65
Do not teach DDD, OOP, TDD, Python, REST, or other mature-model basics unless the project deliberately deviates from the common meaning.
- Distinctive: line 70
Treat AGENTS.md as the owner of agent entry, orientation, navigation, and escalation.
- Distinctive: line 79
If two normative sources conflict, stop prompt authoring and reconcile them.
- Distinctive: line 80
Never hide an unresolved project decision inside prompt wording.
- Distinctive: line 84
Use this derivation shape:
- Distinctive: line 94
Before writing, identify every parent AGENTS.md inherited at the target path.
- Distinctive: line 97
Put a principle at the highest scope where it is both true and useful.
- Distinctive: line 98
Put local topology and local red lines at the narrowest common parent that covers their consumers.
- Distinctive: line 100
Do not repeat a parent's rule to show importance.
- Distinctive: line 110
Do not use a universal line limit.
- Distinctive: line 123
Resolve ownership gaps first: If an operational table in AGENTS.md is the only surviving definition, move it to a proper owner or gate …
- Distinctive: line 131
Make red lines sparse and memorable: Keep only project-specific, high-blast-radius prohibitions.
- Distinctive: line 133
Write decision triggers, not workflows: Use “when deciding X, read Y because it owns Z.” Move execution steps to a skill or developer guide.
- Distinctive: line 135
Update the whole chain atomically: Add a new child entry before removing the parent content it replaces.
- Distinctive: line 139
Prefer plain, image-forming language.
- Distinctive: line 151
Every paragraph passes the five-job admission gate.
- Distinctive: line 159
Every taste and red line traces to a current owner.
- Distinctive: line 160
No sentence creates a second business SSOT.
- Distinctive: line 175
No manually maintained counts, completion snapshots, or dated inventory.
- Distinctive: line 176
No generic best-practice tutorial, command catalog, or long checklist.
- Distinctive: line 178
All relative links resolve.
- Distinctive: line 180
Every removed hard rule has a confirmed new owner or gate.
- Distinctive: line 182
Use realistic task probes, not only prose review.
- Distinctive: line 202
Do not claim success from line-count reduction alone.
“Common” is measured: kept by at least 6 in 10 of the 9 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
Treat an AGENTS.md as persistent cognitive infrastructure, not a convenient
place for every useful rule. Give the agent the project's mind, map, taste,
hard boundaries, and routes to deeper knowledge. Assume a frontier model
already knows ordinary engineering technique.
Load the clear-writing skill before you write or revise documentation.
Follow its applicable writing rules.
Keep this skill's authority boundaries, prompt structure, and required report.
The Content Model
Keep three layers distinct:
- Keep the way (
道) resident: project-specific mental models, maps, decision taste, and a few non-negotiable boundaries. - Load the rule (
法) on demand: domain contracts, local conventions, governance mechanisms, and task-specific constraints. - Externalize technique (
术): generic best practice, commands, procedures, templates, field catalogs, checklists, and tool usage belong in skills, developer docs, scripts, or CI.
Admit a paragraph only when it has one of five jobs:
| Job | What it gives the agent | Authority relationship |
| Mental model | A durable way to see the system | Short projection of philosophy or architecture |
| Map | Where concepts, ownership, code, or knowledge live | Minimal projection of the current topology |
| Taste | A preferred direction when several designs could work | Traceable to design taste, an effective ADR, or stable design |
| Red line | A hard stop against a costly, cross-boundary error | Traceable to a normative owner |
| Trigger | When and where to load more specific knowledge | Owned by the prompt as navigation; never copies the target's body |
Move a paragraph out when it does not fit one of these jobs. Usefulness alone does not justify permanent prompt cost.
Decide What Deserves Residency
Keep content resident only when it is mostly:
- specific to this project and not reliably inferable from industry knowledge;
- relevant across multiple likely tasks beneath this directory;
- consequential to boundaries, ownership, safety, or long-term evolvability;
- difficult to enforce completely through code, types, tests, lint, or CI;
- stable enough to express in one or two memorable sentences.
Default these elsewhere:
| Content | Better home |
| Domain meaning, exact fields, invariants, current architecture | The owning design/spec/contract |
| Why a consequential decision was made | ADR |
| Reusable task procedure or judgment method | Skill |
| Commands and contributor mechanics | Developer guide or command help |
| Deterministic naming/import/generated-file checks | Script, lint, or CI |
| Templates and field-complete protocols | Template/reference owned by the mechanism |
| Counts, progress, dates, inventories | Generated/queryable status |
| Temporary plans and campaign state | The project's scratch-plan location |
Do not teach DDD, OOP, TDD, Python, REST, or other mature-model basics unless the project deliberately deviates from the common meaning.
Preserve Authority
Treat AGENTS.md as the owner of agent entry, orientation, navigation, and
escalation. Do not let it become the owner of business semantics.
- Link each taste and red line to one current normative source.
- Change the owner first and its prompt projection second.
- Let a child prompt refine local consequences; never let it reverse a parent mental model or red line.
- Apply path specificity only to working guidance. It does not make a nearer prompt authoritative over a business claim.
- If two normative sources conflict, stop prompt authoring and reconcile them. Never hide an unresolved project decision inside prompt wording.
- State when a sentence is a map or shorthand projection so readers do not mistake it for the full SSOT.
Use this derivation shape:
normative owner
└── short AGENTS projection
└── narrower local refinementDesign the Inheritance Chain
Before writing, identify every parent AGENTS.md inherited at the target path.
Judge the active chain as one prompt, not as isolated files.
- Put a principle at the highest scope where it is both true and useful.
- Put local topology and local red lines at the narrowest common parent that covers their consumers.
- Do not repeat a parent's rule to show importance. Translate only the local consequence, or link back.
- Let each level answer a different question:
- root: What are we building, how do we see it, and what must never break?
- area: How does this area embody the architecture, and where are its owners?
- leaf: What is locally surprising, constrained, or easy to get wrong?
- Route a normal task to its owner in at most two navigation hops when practical.
- Say what can remain unread. Progressive disclosure needs a stopping rule, not only more links.
Do not use a universal line limit. Set a budget proportional to how often and how broadly the file is inherited; roots need the strictest budget. When a chain feels long, remove duplicated technique before compressing useful mental models into cryptic prose.
Author or Revise
- Read the inheritance chain and local owners. Inspect parent prompts, current target content, child prompts affected by the change, and the normative sources behind every proposed taste or red line.
- Inventory before deleting. Classify each existing section as resident mind/map/taste/red-line/trigger, on-demand rule, externalizable technique, generated status, or obsolete duplication.
- Resolve ownership gaps first. If an operational table in
AGENTS.mdis the only surviving definition, move it to a proper owner or gate before removing it. Compression must not silently erase policy. - Write the role sentence first. State in one sentence what cognitive value this prompt adds beyond its parent. Reject sections that do not support it.
- Write maps and taste before routes. Give enough orientation for the agent to choose the right route; a link table without a mental model is a search index, not a prompt.
- Make red lines sparse and memorable. Keep only project-specific, high-blast-radius prohibitions. Link the why instead of reproducing it.
- Write decision triggers, not workflows. Use “when deciding X, read Y because it owns Z.” Move execution steps to a skill or developer guide.
- Update the whole chain atomically. Add a new child entry before removing the parent content it replaces. Repair inbound section references and child statements that cite the old layout.
Prefer plain, image-forming language. A good shorthand such as “blueprint is the script, runtime is the performance” can preserve a boundary more effectively than a dense responsibility table, provided it links to the owner and does not distort it.
Validate
Require all of the following.
Cognitive Value
- The file's role is expressible in one sentence.
- Every paragraph passes the five-job admission gate.
- A representative agent can restate the correct mental model and decision direction without reading every linked document.
- Taste guides ambiguous choices without pretending to be an absolute rule.
- Red lines are few, hard, project-specific, and memorable.
Authority Integrity
- Every taste and red line traces to a current owner.
- No sentence creates a second business SSOT.
- Parent and child prompts refine rather than contradict one another.
- Unresolved owner conflicts are surfaced, not papered over.
- Projections, evidence, tracking, and history do not masquerade as owners.
Progressive Disclosure
- A representative task reaches its normative owner in at most two hops when practical.
- Unrelated procedures and catalogs stay unloaded.
- The prompt says when deeper reading is needed and when it can stop.
- The inherited prompt chain contains no material duplication.
Maintenance Quality
- No manually maintained counts, completion snapshots, or dated inventory.
- No generic best-practice tutorial, command catalog, or long checklist.
- Mechanically enforceable rules point to automation instead of duplicating it.
- All relative links resolve.
- Inbound references to removed headings are updated.
- Every removed hard rule has a confirmed new owner or gate.
Use realistic task probes, not only prose review. Include at least:
- one ordinary local change that should remain lightweight;
- one boundary-changing task that must trigger deeper design;
- one apparent document/implementation conflict;
- one temptation to bypass a package or service boundary.
For each probe, verify the mental model expressed, owner reached, irrelevant context avoided, and stopping point.
Report the Result
Summarize:
- the role of each changed
AGENTS.md; - what stayed resident and why;
- what moved to owners, skills, docs, scripts, or CI;
- any unresolved source contradiction or ownership gap;
- the inherited-chain size and task-probe results.
Do not claim success from line-count reduction alone. The outcome is better judgment at lower recurring context cost.
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.

