agent-writing
Skill4 starsChanged 2 days agoMITView on GitHub
Write instructions that agents actually follow: skills (name, description, trigger phrases, body), CLAUDE.md / AGENTS.md rule files, and briefs for subagents or other agents (objective, DONE criteria, verification, report shape). Covers what to cut, length budgets, examples over adjectives, and a pre-ship checklist. Use for a subagent or agent brief, a system prompt, trimming a rules file that has grown too long, or when an agent keeps ignoring an instruction. For the full style reference on writing skill and doc files, use `writing-for-agents`.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- frostney/known-good-routetheir own version, first seen Oct 11, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- frostney/known-good-route★ 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 repository50 other files it gives its agents.
- arenaSkill
- blast-radiusSkill
- bun-playwright-runner-selectionSkill
- cinematic-shotSkill
- clean-ui-shotSkill
- codebase-designSkill
- debug-loopSkill
- dep-upgradeSkill
- diagnosing-bugsSkill
- discoverSkill
- domain-modelingSkill
- earshotSkill
- eval-judgeSkill
- flaky-testSkill
- grillingSkill
- grillSkill
- idea-scoutSkill
- improve-codebase-architectureSkill
- interrogateSkill
- make-mediaSkill
- migrate-to-rustSkill
- migration-planSkill
- multi-agent-windows-hazardsSkill
- perf-loopSkill
- postmortemSkill
- prototypeSkill
- prSkill
- real-soundSkill
- recallSkill
- release-notesSkill
- repo-mapSkill
- researchSkill
- retroSkill
- secure-diffSkill
- sellSkill
- subagent-report-recoverySkill
- tasteSkill
- taste-skillSkill
- tddSkill
- teachSkill
- to-questionnaireSkill
- to-specSkill
- to-ticketsSkill
- wayfinderSkill
- weeklySkill
- windows-bash-backslash-halvingSkill
- wizardSkill
- writing-for-agentsSkill
- ycSkill
- ystack-upgradeSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
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 28
Body: when it applies (and when to skip), the procedure as numbered steps, rules, output format.
- Distinctive: line 35
Every line costs on every turn.
- Distinctive: line 37
Put the exact command, path or pattern in the rule.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent writing
An agent reads every word, every time, and acts on what is concrete. Vague text costs tokens on every run and still gets ignored. Write less, and make each line something the agent can do or check.
When it applies
- Writing or editing a skill, a CLAUDE.md / AGENTS.md, a system prompt, or a brief for another agent.
- An agent keeps skipping a rule: the wording is usually the bug.
Skills
- Name: short, lowercase, hyphenated, a verb or a noun the user would say.
- Description is the trigger. It is always loaded; the body loads only when it fires. Write what the skill does in one sentence, then "Use for/when" with the phrases a user really types and the situations that should fire it. One phrase per distinct case; drop synonyms.
- Body: when it applies (and when to skip), the procedure as numbered steps, rules, output format. Each step ends on something checkable.
- Budget: 40-150 lines. Push rare branches and long reference into a sibling file, named from the
step that needs it ("for X, read
ref/x.md").
Rule files (CLAUDE.md, AGENTS.md)
- Every line costs on every turn. Keep only rules the agent would get wrong without them.
- Each rule: the instruction, then a short why. The why lets the agent handle cases you didn't list.
- Put the exact command, path or pattern in the rule. "Use bun" beats "prefer our package manager".
- Move anything used rarely into a referenced file with a trigger line.
Briefs to another agent
The brief is all the agent knows. Include:
- Objective: one or two sentences, including why.
- Context: paths to read, what is already ruled out, constraints.
- DONE means: checkable criteria, e.g. "
bun testpasses andGET /xreturns 200". - Verification: the exact command to run and what to report from it.
- Limits: scope, files not to touch, iteration caps ("stop after 2 fix cycles and report").
- Report shape: outcome first, files changed, evidence, open items, assumptions made. Long output goes to a file; return the path.
Give the brief the facts, not your conclusion, when you want an independent view.
What to cut
- Adjectives that ask for quality ("be thorough", "carefully", "high-quality"). Replace each with the check that would prove it.
- Shouting (CAPS, "CRITICAL", "MUST") except for the one or two rules that really are hard limits.
- Restating what the model already does by default.
- Background and history the agent can't act on.
- Duplicates: the same rule in two places drifts apart.
Examples over adjectives
One concrete example (a command, a filled-in template, a before/after) fixes behaviour better than a
paragraph of description. Use a placeholder format like <path> so it isn't copied literally. Show a
bad example only next to the good one.
Pre-ship checklist
- Description says what it does and lists real trigger phrases.
- Every step ends on something the agent can check.
- Every "be X" adjective replaced by a check or an example.
- No rule that the model would follow anyway.
- Within the length budget; rare branches moved out.
- Host-neutral if shared: "a subagent, if your host has them", no tool names from one product.
- Tried once: give it to a fresh agent on a small real task, watch where it goes wrong, fix that line.
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.

