write-agents-md
Skill4 starsChanged 3 months agoMITView on GitHub
Write, compact, or deduplicate an AGENTS.md / CLAUDE.md project instruction file. Use when creating agent instructions from scratch, or when asked to shorten, dedupe, clean up, or remove fluff/AI-slop from an existing AGENTS.md or CLAUDE.md. Triggers: "write AGENTS.md", "compact our agent instructions", "dedupe CLAUDE.md", "trim the agent rules".
- Reads credentials
- Commits and pushes
8 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
- narumiruna/skillstheir own version, first seen Jul 15, 2026
- brandhaug/skillstheir own version, first seen Jul 3, 2026
Other versions8 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 8
- narumiruna/skills★ 17same 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 repository38 other files it gives its agents.
- skills/take-ownership/AGENTS.mdAGENTS.md
- bitwarden-cliSkill
- blogpostSkill
- build-in-public-reelSkill
- chrome-devtools-remoteSkill
- chrome-useSkill
- claude-maxSkill
- claude-sessionsSkill
- dev-stackSkill
- dev-workflowSkill
- dev-workflow-supervisorSkill
- duckdns-domainSkill
- flutter-android-releaseSkill
- github-copilot-sessionsSkill
- git-worktreeSkill
- google-workspace-cliSkill
- hyperagent-eval-skillSkill
- macro-panelSkill
- mermaid2excalidrawSkill
- naste-slaste-styleSkill
- no-github-backlogSkill
- no-pr-backlogSkill
- opencode-apiSkill
- opencodeSkill
- overflowSkill
- prompt-hermes-aiSkill
- reportSkill
- retrospectiveSkill
- secretsmctlSkill
- solo-founder-meta-agentSkill
- solo-founderSkill
- spaceship-dnsSkill
- take-ownership-meta-agentSkill
- take-ownershipSkill
- telegram-cliSkill
- vercel-lfsSkill
- write-skillSkill
- yc-pitch-deckSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 8 are distinctive, and 0 are very specific to this project.
0
Common
Most of the 8 edited versions we read keep these.
8
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 14
Every line is a directive or a fact: No preamble, no motivation, no "we strive to".
- Distinctive: line 27
Keep sections only if the project needs them.
- Distinctive: line 40
Don't invent sections to look complete.
- Distinctive: line 45
Inventory: every distinct directive/fact as a flat list.
- Distinctive: line 49
Verify: check every item from step 2 still appears.
- Distinctive: line 53
Every inventoried directive is preserved.
- Distinctive: line 54
No rule stated twice.
- Distinctive: line 55
No line that fails the "does this change behavior?" test.
“Common” is measured: kept by at least 6 in 10 of the 8 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
AGENTS.md (and CLAUDE.md) is loaded into every agent session. You pay its full token cost on every turn, forever. Treat it as a hot path: each line must earn its place by changing agent behavior. If a line doesn't change what the agent does, cut it.
Core rules
These come from Claude and OpenAI prompt-engineering guidance. Apply all of them.
- Every line is a directive or a fact. No preamble, no motivation, no "we strive to". If deleting a line wouldn't change behavior, delete it.
- Say each thing once. Pick the single best home for a rule and link to it; never restate it under three headings.
- Positive imperatives over prohibitions. "Run X before Y" beats "don't forget X". Tell the agent what to do, not what to avoid.
- Decision rules over absolutes. Reserve ALWAYS/NEVER/caps for true invariants (safety, secrets, irreversible actions). Elsewhere use "prefer", "default to", "when X, do Y".
- State scope explicitly. Literal-minded agents won't generalize "use the dedicated tool" to all tools — write "for every file edit" if that's what you mean.
- Concrete over qualitative. Replace "important issues" / "be thorough" with the actual bar: paths, commands, names, thresholds.
- Lead with what matters. Order by importance and frequency, not narrative. The rule used every turn goes near the top.
- Name exact tools, paths, commands.
gh pr create,source ~/.env.d/x.env,$(date +%F).md— not "the CLI" or "a dated file". - Examples in tags. Wrap concrete examples in
<example>...</example>so they're distinct from instructions. One real example beats a paragraph of description. - Structure only to aid scanning. Headings and flat bullets where they help an agent jump to a section; plain imperative lines otherwise. Avoid deep nesting.
Suggested shape
Keep sections only if the project needs them. Typical order:
# <Project> — Agent Instructions
<1-2 line: what this repo is + what "done" means here>
## Workflow # the steps an agent takes per task, in order
## Commands # exact build/test/lint/run commands
## Conventions # code style, naming, structure that isn't obvious from the code
## Constraints # secrets handling, what not to touch, irreversible actions
## Delegation # when/how to spawn subagents (names, models), if applicableDon't invent sections to look complete. Omit any with nothing non-obvious to say.
Process
- Read the existing file fully (skip if creating new).
- Inventory every distinct directive/fact as a flat list. This is your preservation set — nothing in it may be lost.
- Dedupe: collapse repeats to one canonical statement.
- Cut fluff: motivational padding, hedging, restated context, bold/caps noise, "as an AI" framing, anything the codebase or git history already tells the agent.
- Tighten: rewrite survivors as terse positive imperatives; make scope and bars explicit.
- Verify: check every item from step 2 still appears. Shortening must come from tighter prose and removed duplication — never from dropping a real rule.
Done when
- Every inventoried directive is preserved.
- No rule stated twice.
- No line that fails the "does this change behavior?" test.
- Absolutes reserved for real invariants.
- Report before/after line + byte count and what was merged/cut.
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.

