writing-for-agents
Skill2 starsChanged 3 months agoMITView on GitHub
Write skills and agent docs for low load, high reliability.
97 other projects use a version of this, 80 of them edited.
Adopted by
Most recently taken up by
- mattpocock/skillsedited, first seen Oct 8, 2026
- grezxune/ai-toolsedited, first seen Oct 5, 2026
- AlexisBalayre/claude-code-configedited, first seen Oct 5, 2026
- KroxiDev/engineering-skillstheir own version, first seen Oct 5, 2026
- michielvandermeer/skillsedited, first seen Oct 4, 2026
- Integralist/agent-skillsedited, first seen Oct 4, 2026
Used with
Projects with it also use setup-ts-deep-modules, writing-beats and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
loulanyueSkillsetup-ts-deep-modules
Wire dependency-cruiser into a TypeScript repo so each package is a deep module — implementation hidden in subfolders, reachable only through its entry-point files. User-invoked.
Also in 13 projects that use this
RoentekSkillwriting-beats
Writing, exploit — assemble raw material into a journey of beats, grounding each term before a beat leans on it.
Also in 16 projects that use this
RoentekSkillwriting-shape
Writing, exploit — shape raw material into an article, paragraph by paragraph.
Also in 16 projects that use this
pahwarangerSkillsetup-skills
Sets up an `## Agent skills` block in AGENTS.md/CLAUDE.md and `docs/agents/` so the engineering skills know this repo's ticket tracker (GitHub or local markdown), triage label vocabulary, and domain doc layout. Run before first use of `to-tickets`, `to-prd`, `triage`, `diagnose`, `tdd`, `improve-codebase-architecture`, or `zoom-out` — or if those skills appear to be missing context about the ticket tracker, triage labels, or domain docs.
Also in 5 projects that use this
qwlabsSkillclaude-handoff
Hand the current conversation off to a fresh background agent that picks up the work immediately.
Also in 12 projects that use this
qhuang20Skillmigrate-to-shoehorn
Migrate test files from `as` type assertions to @total-typescript/shoehorn. Use when user mentions shoehorn, wants to replace `as` in tests, or needs partial test data.
Also in 14 projects that use this
- +2 more from Roentek
Other versions97 projects use a version of this.
Word for word · 0
None found.
Edited · 80
- mattpocock/skills★ 335k23% same
- aws/graph-explorer★ 48423% same
- niki914/zafiro★ 22123% same
- tt-a1i/matt-skills-with-to-goal★ 18223% same
- iamyoki/qwen-image-2.1-skill★ 14623% same
- murray17/rovai-ai★ 12223% same
- willdady/platypus★ 11423% same
- timharris707/skills★ 4013% same
- VoDaiLocz/kilo-kit-mcp★ 2723% same
- korallis/skills-collection★ 1823% same
70 more not listed
Wrote their own version · 17
- vinvcn/mattpocock-skills-zh-CN★ 4.6ksame name
- devcxl/mattpocock-skills-zh★ 426same name
- leandrocfe/skills★ 38same name
- ConnorGriffin/skills★ 22same name
- aethrox/doctrine★ 18same name
- KroxiDev/engineering-skills★ 4same name
- jesse-merhi/skills★ 3same name
- shumingyang-opencode/mattpocock-skills-zh-tw★ 3same name
- YSAA1/harness-workflow★ 3same name
- dafaalz/agent-skills★ 2same name
7 more not listed
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 repository16 other files it gives its agents.
- canvas-course-syncSkill
- categorizerSkill
- course-knowledge-baseSkill
- course-study-sessionSkill
- email-draftingSkill
- exam-prepSkill
- grade-calculatorSkill
- homework-checklistSkill
- meetings-and-clubsSkill
- note-formatting-rulesSkill
- photos-to-pdfSkill
- roadmapSkill
- school-advisorSkill
- study-notes-workflowSkill
- suite-updateSkill
- verification-before-completionSkill
The file
We split this skill into the rules it gives an agent
6 rules. 1 is common, 5 are distinctive, and 0 are very specific to this project.
1
Common
Most of the 87 edited versions we read keep these.
5
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 21
This is the meta-discipline behind every other skill: Use it whenever you write or edit a skill, AGENTS.md, or any agent-facing doc.
- Distinctive: line 32
Don't use for: human-only documentation (specs, READMEs for people) — though the leading-words and pruning ideas still apply.
- Common: line 52
Every document and pointer spends one of two budgets:
- Distinctive: line 88
Every step ends on a completion criterion — the condition that tells the agent the work is done.
- Distinctive: line 125
Single source of truth: Keep each meaning in one authoritative place.
- Distinctive: line 170
Read each line: does it change the model's behavior vs the default?
“Common” is measured: kept by at least 6 in 10 of the 87 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
Writing for Agents
Reference for writing any document an agent consumes: a skill, an AGENTS.md /
CLAUDE.md, a doc reached by a pointer. The packaging differs; the writing does
not — the same levers make each one predictable, because the agent takes the
same process every run rather than producing the same output.
This is the meta-discipline behind every other skill. Use it whenever you
write or edit a skill, AGENTS.md, or any agent-facing doc. When the document is
a skill, also read references/SKILL-MECHANICS.md for frontmatter, invocation
choice, and router skills.
When to Use
- Creating or editing a skill (including the ones in this suite)
- Writing or modifying
AGENTS.md/CLAUDE.md/ project rules - Writing any document an agent will read
Don't use for: human-only documentation (specs, READMEs for people) — though the leading-words and pruning ideas still apply.
Context pointers
A context pointer is a reference held in the agent's context that names some
out-of-context material and encodes the condition for reaching it. A skill's
description is one; a line in AGENTS.md naming a doc is the same object. The
pointer's wording, not its target, decides when the agent reaches the material.
A pointer does two jobs: state what the material is, and list the branches that trigger reaching it. Every word of an always-loaded pointer costs on every turn, so prune harder than the body:
- Front-load the leading word — the pointer does its triggering work up front
- One trigger per branch — collapse synonyms for the same branch
- Cut identity the body already carries
The two loads
Every document and pointer spends one of two budgets:
- Context load — the cost of always-loaded material on the agent's window (an AGENTS.md line, a skill description). Spends tokens/attention every turn whether or not it fires.
- Cognitive load — the cost on the human: which docs exist and when to reach for each. Not a cost to minimise; it is the price of human agency. Spend it where human judgement matters, remove it where it does not.
Material behind a pointer escapes context load (pays only the pointer's line); material with no pointer rides entirely on cognitive load.
Information hierarchy
A document is built from steps (ordered actions) and reference (definitions/rules/facts consulted on demand). Where each sits on the ladder:
- In-file step — primary tier: what the agent does, in order
- In-file reference — consulted on demand
- Disclosed reference — pushed into a separate file, reached by a pointer
Push too little down → the top bloats. Push too much → you hide material the agent needs. That tension is the whole decision.
- Progressive disclosure is moving down the ladder (out of the main file, behind a pointer) to keep the top legible. Not primarily token saving — it protects the hierarchy. Inline what every branch needs; disclose what only some reach.
- Co-location decides what sits beside what once there — keep a concept's definition, rules, and caveats under one heading so reading part brings its neighbors.
- Sprawl is the failure mode: a document too long even when every line is live. Cure: disclose reference behind pointers, split by branch/sequence.
Steps and completion criteria
Every step ends on a completion criterion — the condition that tells the agent the work is done. Two properties make it a lever:
- Clarity — can the agent tell done from not-done? A vague bound invites premature completion (ending before genuinely done). Sharpen the bound first.
- Demand — how much it requires. "Every modified model accounted for" forces thorough work where "produce a change list" does not.
The strongest criteria are both checkable and exhaustive.
When to split
Splitting spends one of the two loads, so split only when the cut earns it:
- By sequence — split a run of steps where the later, visible steps tempt the agent to rush the one in front.
- By invocation (skill-specific) — see
references/SKILL-MECHANICS.md.
Leading words
A leading word is a compact concept already in the model's pretraining that the agent thinks with while running the document (lesson, fog of war, tracer bullet). Repeated as a token, it anchors a region of behavior with the fewest tokens by recruiting priors. Coin your own only if you define it clearly; a made-up word pays in definition tokens what a pretrained word gives free.
Hunt for restatements to collapse into a single token:
- "fast, deterministic, low-overhead" → tight
- "a loop you believe in" → red (a tight loop that goes red on the bug)
Negation is the failure mode beside this: steering by prohibition drags the forbidden behavior into context and makes it more available. Don't think of an elephant — the elephant is all there is. Prompt the positive (state the target behaviour), and pair any unavoidable guardrail with the positive target.
Pruning
- Single source of truth. Keep each meaning in one authoritative place. Duplication costs maintenance + tokens.
- The environment is a source of truth too.
package.jsonscripts, config, directory layout,--help. A document that restates the environment is a cache — earn its load only when the lookup is expensive. Cache only the unwritten conventions, reasons, and gotchas config won't confess. - Relevance. Does each line still bear on what the document does? Without a pruning discipline the default fate is sediment — stale layers that settle.
- Hunt no-ops sentence by sentence — an instruction the model already obeys by default. The test (does it change behavior vs the default?) is model-relative; settle disputes by running the doc. Delete whole sentences, not trim words. A weak word is a no-op — use a stronger one.
Procedure (writing or reviewing an agent-facing doc)
- Identify the two loads. Is this content always-loaded, or behind a pointer? What's the human's cognitive cost?
- Place each piece on the ladder. Inline what every branch needs; disclose what only some reach. Co-locate related definitions.
- Write steps with strong completion criteria — checkable + exhaustive.
- Adopt leading words for repeated behavior concepts; prompt positively.
- Prune. Single source of truth, let the environment own what it can, drop no-ops and stale/relevance-lost lines.
Related
references/SKILL-MECHANICS.md— skill-specific mechanics: model-invoked vs user-invoked, splitting by invocation, and router skills.hermes-agent-skill-authoring— the repo-standard Hermes frontmatter/struct rules (the machine-side requirements this skill's discipline complements).
Pitfalls
- A weak pointer for a must-have target — a reliability bug; sharpen the wording or inline the material.
- Restating the environment — a cache that goes stale. Let config/help own what they own.
- Scattering instead of co-locating — fragments one meaning across places.
- Relying on negation — prohibitions make the banned behavior more available. Prompt positively.
- A bloated guts with no disclosure — don't protect the top tier by hiding material the agent needs; cut or disclose, don't pad.
Verification
- Read each line: does it change the model's behavior vs the default? If not, it's a no-op — delete it.
- Duplicate meanings collapsed to a single source.
- Environment-owned lookups not restated.
- Completion criteria checkable and exhaustive.
- High-value material stays inline; branch-specific content is behind pointers; no sprawl.
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.

