Levers for writing documents an agent consumes: context pointers, the two loads, information hierarchy, progressive disclosure, completion criteria, leading words, and pruning. Use when creating or editing a skill, an agent definition, an instruction file, AGENTS.md, or CLAUDE.md.
61
72%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Passed
No findings from the security scan
Fix and improve this skill with Tessl
tessl review fix ./src/orchestrator/skills/writing-for-agents/SKILL.mdReference for any document an agent consumes: a skill, an instruction file, 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.
A context pointer is a reference held in the agent's context that names out-of-context material and encodes the condition for reaching it. A skill's description is one. The pointer's wording, not its target, decides when and how reliably the agent reaches the material. A must-have target behind a weakly worded pointer is a variance bug: sharpen the wording first, and inline the material only if sharpening fails.
A pointer does two jobs: state what the material is, and list the branches that should trigger reaching it. Every word costs on every turn, so it earns harder pruning than the body.
Every document and pointer spends one of two budgets.
Material reached only through a pointer escapes context load at the price of the pointer's own line. Material with no pointer rides entirely on cognitive load.
A document is built from steps (ordered actions) and reference (definitions, rules, facts consulted on demand). The two mix freely. The core decision is where each piece sits on a ladder ranked by how immediately the agent needs it:
Push too little down and the top bloats. Push too much and you hide material the agent needs.
Progressive disclosure is the move down the ladder so the top stays legible. Branching is the cleanest test: inline what every branch needs, push behind a pointer what only some branches reach. Where a document has steps, undisclosed reference buries them and turns attending to them into a coin flip.
Co-location decides what sits beside a piece once its rung is chosen. Keep a concept's definition, rules, and caveats under one heading so reading one part brings its neighbours. Scattering fragments one meaning across many places, which is distinct from duplication repeating one meaning in two.
Sprawl is the failure mode: a document too long even when every line is live and unique. Attention thins across the excess. The cure is the ladder.
Every step ends on a completion criterion, the condition telling the agent the work is done. Two properties make it a lever:
The strongest criteria are both checkable and exhaustive.
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 bullets). Repeated as a token, never as a sentence, it accumulates a distributed definition and anchors a region of behaviour in the fewest tokens. Coining your own works if you define it clearly, but a made-up word recruits no priors, so reach for an existing word first.
It anchors twice. In the body it anchors execution, so the agent reaches for the same behaviour every time the word appears. In a pointer it anchors invocation, so shared language across prompts, docs, and code reaches the material more reliably.
Hunt for passages that collapse into a single token. "fast, deterministic, low-overhead" becomes tight. "a loop you believe in" becomes red, turning a fuzzy gate into a binary observable state. Assume every document carries restatements that leading words retire.
Negation is the failure mode beside this lever. Steering by prohibition drags the forbidden behaviour into context and makes it more available. Prompt the positive: state the target behaviour so the banned one is never spoken. A prohibition earns its place only as a hard guardrail you cannot phrase positively, and even then pair it with the positive target.
package.json scripts, config files, directory layout, --help output). A document restating it is a cache, earning its load only when the lookup is expensive. Cache the unwritten convention, the reason behind a choice, the gotcha no config confesses. Leave one-command lookups to the environment, where they cannot go stale.Splitting spends one of the two loads, so split only when the cut earns it.
When skills multiply past what a human can remember, that piled-up cognitive load is cured by a router: one document naming the others and when to reach for each.
A skill is one directory holding SKILL.md with name and description frontmatter. The description is the skill's top-level context pointer and the only part guaranteed to reach every assistant, so it carries the trigger branches. Claude Code and the single-file targets also receive sibling files, but Cursor and Windsurf compile SKILL.md alone. Anything the agent must have therefore belongs in SKILL.md.
Adapted from the writing-for-agents skill in mattpocock/skills, MIT, copyright 2026 Matt Pocock.
c0f4566
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.