Skip to content

Skill Vault · Organize your work

Make your AI instructions easier to follow

Clarify when an instruction applies, what to do and how to check success.

An instruction document to paste or provide.

Skill name /writing-for-agents

Your next step

Try it for yourself

You’ll need: An instruction document to paste or provide.

Paste into an AI conversation after adding your own context.

This is a one-off starter for the approach. Installing the full Skill adds its complete instructions.

Ready to copy
Rewrite this agent instruction so its trigger is discoverable, its workflow is imperative and concise, optional detail is progressively disclosed, and success can be verified. Document: [paste or link it].

What happens nextThe revision has a clear trigger, concise steps and a way to verify completion.

Use it again

Add the full Skill.

The starter lets you try the approach. Installation adds the complete instructions to your AI coding tool.

Copy the setup instructionsFor Codex or Claude Code on your computer

Your next step

Ask your agent to help you install it

You’ll need: Node.js with npx, Git, and the agent you choose. A project folder where you want the Skill available.

Paste this into Codex or Claude Code with your project open. Your agent will help you review and install the package.

Review files and permissions before accepting an install. Adding a Skill does not run it.

Ready to copy
Help me install /writing-for-agents from MattEspo23/skills v0.1.2 in this project.

Review the package instructions and supporting files first. Include these Skills: writing-for-agents.

Use the command for the agent I am using:
Add to Codex:
npx skills@latest add 'MattEspo23/skills#v0.1.2' --skill writing-for-agents --agent codex --copy

Add to Claude Code:
npx skills@latest add 'MattEspo23/skills#v0.1.2' --skill writing-for-agents --agent claude-code --copy

Show me where the files will go before making changes. Preserve existing Skills and customizations. Stop if the release, supporting Skills, or target agent cannot be verified. Do not run the Skill or change external services during setup.

After installation, explain how I can use /writing-for-agents and what access it needs.

What happens nextYour agent should review and add /writing-for-agents, then explain how to use /writing-for-agents. Stop if a dependency or version cannot be verified.

No additional supporting Skill is required by this package. Source version: v0.1.2.

Prefer a terminal command?

Add to Codex

Command
npx skills@latest add 'MattEspo23/skills#v0.1.2' --skill writing-for-agents --agent codex --copy

Add to Claude Code

Command
npx skills@latest add 'MattEspo23/skills#v0.1.2' --skill writing-for-agents --agent claude-code --copy

Inspect the source on GitHub

Installing copies the instructions into your chosen agent. It does not run the Skill or configure project tools.

Keep the package’s supporting files, LICENSE and NOTICE together with the Skill instructions.

Full notes & source materialThe complete original text, examples and reference details.

These are the complete original notes. Planned videos and services mentioned here may not be available yet; the actions above reflect what you can use on this site now.

Write Skills and instruction documents that agents can discover, load, and follow predictably.

Watch

An EspoAI decision path turning everyday work into a repeatable method.

Skill Vault video planned · Video planned

Install

Public release v0.1.2 — install the latest source or pin the tested release.

Install latest

Command
npx skills@latest add MattEspo23/skills --skill writing-for-agents

Reproducible install

Command
npx skills@latest add 'MattEspo23/skills#v0.1.2' --skill writing-for-agents

Clean installs are verified for Codex and Claude Code. The installer copies editable files into the selected agent; review every Skill before giving it tool access.

This is the public, editable adapted baseline. Its deeper Espo-specific revision and Skill Vault video are planned; the released source can be installed now.

What it does

writing-for-agents is the reference you write agent-facing documents against — a skill, an AGENTS.md / CLAUDE.md, a spec, a runtime prompt, a README, any doc an agent reads. The packaging differs; the writing does not: the same levers make each one predictable, so the agent takes the same process every run rather than producing the same output.

Its default move is deletion, not explanation. Ask an agent to write instructions for another agent and it spends most of its words explaining what the model already knows — every one of those lines is a no-op, paying context and changing no behaviour. This reference is the lens that finds them, which is why it earns its keep at least as often on a document you already have as on a blank file.

It was called writing-great-skills until v1.1. The rename tracks what it always was underneath: almost none of it is skill-specific. The skill-only mechanics — frontmatter, the model- versus user-invoked choice, router skills — are disclosed to a linked SKILL-MECHANICS.md you read only when the document in front of you is a skill.

When to reach for it

Type /writing-for-agents, or the agent reaches for it on its own when you're creating or editing a skill, or modifying AGENTS.md or CLAUDE.md.

Reach for it by hand for everything else an agent reads: your docs, specs and tickets, system and AFK prompts. The test is one question — does an agent read this? — and it does not matter how the document gets in front of it, whether a pointer names it, a human pastes it, or it simply sits in the repo. For working out what a codebase actually contains in the first place, use grill-with-docs — this reference governs how a document reads, not what it knows.

The two loads

The idea the whole reference turns on is a pair of budgets every document and pointer spends:

  • Context load — the cost of always-loaded material on the agent's window: an AGENTS.md line, a skill description, anything sitting in context every turn whether or not it fires.
  • Cognitive load — the cost on you: which documents exist, and when to reach for each. You are the index. Not a cost to minimise — it is the price of human agency.

Once you think in these two loads, most authoring decisions — split or don't, inline or disclose, point or push — become the same trade made in different places.

The levers

  • Context pointers — the reference held in context that names out-of-context material and encodes when to reach it. A skill description and an AGENTS.md line naming a doc are the same object; the pointer's wording, not its target, decides how reliably the agent reaches through it.
  • Information hierarchy — the ladder from in-file step, to in-file reference, to disclosed reference behind a pointer. Progressive disclosure is the move down that ladder so the top stays legible.
  • Completion criteria — the clarity and demand of each step's done-condition, and the legwork that demand drives; the defence against premature completion.
  • Leading words — a compact concept already in the model's pretraining (tight, red, tracer bullet) that the agent thinks with while running the document. It anchors twice: execution in the body, invocation in the pointer.
  • Pruning — single source of truth, relevance, and the no-op test applied sentence by sentence, against duplication, sediment and sprawl.

Common questions

Where did /writing-great-skills go? It is this skill, renamed in v1.1. Practitioners were already pointing it at AGENTS.md, docs, specs, tickets and runtime prompts long before the name caught up; structure, leading words and pruning turn out to be the craft of any text an agent reads. There is no alias — reinstall under the new name.

"Writing for agents" — so the agent does the writing? The other way round. You are the author; the agent is the reader. That is the whole difficulty of the genre: you are writing for a reader who has already read everything, so explanation is waste and precision is the entire job.

Can't I just ask the agent to write it for me? You can, and it will produce something verbose. Left alone the model explains what it already knows, and it will not apply the no-op test or reach for a leading word on its own. Use the reference on the draft — a review pass is where most of its value lands.

I asked an agent to trim a document and it cut the functionality. Agents told to "streamline" optimise for length, because length is the thing they can see. The no-op test is behavioural, not aesthetic: delete the line and ask whether the agent's behaviour changed. When a sentence fails, delete the whole sentence rather than trim words from it — and settle a disagreement about it by running the document, not by arguing.

How do I know when it's done? When it works, and you can no longer find duplication, sediment or no-ops. There is no automated eval here; the check is a manual run plus the failure-mode vocabulary as a diagnostic. When a document misbehaves, that vocabulary is also the repair kit — name the failure mode first, then fix that.

Should this live in CLAUDE.md or somewhere else? Ask which load you want to pay. CLAUDE.md loads into every session unconditionally; material behind a pointer costs only the pointer's own line until it fires. Anything that applies in one context out of ten is paying context load the nine other times.

Do I need to rewrite my documents for each new model? Mostly no, and over-fitting to one model is its own trap. Updating for a new model is usually another no-op pass rather than a rewrite.

My skill only works on the exact task I built it from. The common route — do the work once, then have the agent write it up as a skill — over-indexes on that one run, and the exemplars come out too specific. Keep the run as evidence, then abstract deliberately: strip what belonged to that repo and those files, and write for the class of task.

English isn't my first language. Do I lose the leading-word advantage? No — finding the word that packs the most behaviour into the fewest tokens is work the reference does for you. It is one of the things it is for.

It's working if

  • The document gets shorter as it gets better, and you are surprised how little is left.
  • You can point at a leading word and watch it doing work in more than one place.
  • Nothing is stated twice, in any form. Duplication is the most reliable sign a document was never tested.
  • Reference that only one branch needs sits behind a pointer rather than in the main file.

Where it fits

This is a reach-for-it-anytime standalone reference. It has no neighbour in the chain because it sits underneath the whole set rather than beside any one skill: every skill here was written against it, and the documents the other skills leave behind — a CONTEXT.md and its ADRs, a spec, a ticket — are exactly the text it governs once an agent has to read them. When you're unsure which skill or flow fits a task, ask-espo routes you over the whole set.

Try it once

Use the core behavior in one conversation before installation. The repeatable Skill package is the primary path when you want the behavior available across future work.

Copyable text
Rewrite this agent instruction so its trigger is discoverable, its workflow is imperative and concise, optional detail is progressively disclosed, and success can be verified. Document: [paste or link it].

Source & license

Released in EspoAI Skills v0.1.2; adapted from mattpocock/skills v1.2.3. The released package is skills/productivity/writing-for-agents/SKILL.md.

The public package is MIT-licensed and pinned here to the exact release commit. View the released EspoAI source

The adapted baseline preserves the upstream copyright, MIT permission notice, and pinned provenance. View the original pinned source

Skill package files

The full Skill text as copied from content/skill-vault/skills/writing-for-agents/. Supporting agent configuration files stay in that folder.

SKILL.md

Source text
---
name: writing-for-agents
description: Writing documents for agents. Use when creating or editing skills, or modifying AGENTS.md or CLAUDE.md.
---

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 — the agent taking the same _process_ every run, not producing the same output.

When the document you're writing is a skill, read [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md) for frontmatter, invocation choice, and router skills.

## 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 — and how reliably. 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 (a branch is a distinct case the document handles, so different runs take different paths through it). Every word of an always-loaded pointer costs on every turn, so it earns even harder pruning than the body:

- **Front-load the leading word** — the pointer is where it does its triggering work.
- **One trigger per branch.** Synonyms that rename a single branch are one branch written twice; collapse them and keep only genuinely distinct branches.
- **Cut identity the body already carries.**

## The two loads

Every document and pointer you add 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, anything sitting in context every turn, spending tokens and attention whether or not it fires.
- **Cognitive load** — the cost on the human: which documents exist and when to reach for each. The human is the index. 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 reached only through a pointer escapes context load at the price of the pointer's own line; material with no pointer at all rides entirely on cognitive load.

## Information hierarchy

A document is built from two content types — **steps** (the ordered actions the agent performs) and **reference** (definitions, rules, facts consulted on demand) — that mix freely: all steps (a recipe), all reference (a review's rules, this skill), or both. The core decision is where each piece sits on the **information hierarchy**, a ladder ranked by how immediately the agent needs the material:

1. **In-file step** — the primary tier: what the agent does, in order.
2. **In-file reference** — consulted on demand. Often a legitimately flat peer-set (every rule of a review on one rung) — a fine arrangement, not a smell.
3. **Disclosed reference** — pushed out into a separate file, reached by a context pointer, loaded only when the pointer fires. Spans a sibling file in the same folder through fully external reference that lives anywhere and any document can point at.

Push too little down and the top bloats; push too much and you hide material the agent actually needs. That tension is the whole decision.

**Progressive disclosure** is the move down the ladder — out of the main file and behind a pointer — so the top stays legible. Not primarily a token optimisation: it is how the hierarchy is protected. Branching is the cleanest disclosure test: inline what every branch needs, and push behind a pointer what only some branches reach. When a document has steps, in-file reference that should be disclosed buries them and turns attending to them into a coin-flip — a variance lever, not just a legibility one.

**Co-location** is the within-file companion: where the ladder decides _how far down_ a piece sits, co-location decides _what sits beside it_ once there. Keep a concept's definition, rules, and caveats under one heading rather than scattered, so reading one part brings its neighbours with it. The test: the document should read like documentation written for the agent — grouped material reads that way; scattered material does not. (Distinct from duplication: that repeats one meaning in two places; scattering fragments one meaning across many.)

**Sprawl** is the failure mode here: a document simply too long, even when every line is live and unique. Attention thins across the excess, and every extra line is one more to keep relevant. The cure is the ladder: disclose reference behind pointers, and split by branch or sequence so each path carries only what it needs.

## 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 ("understanding reached") invites **premature completion**: ending the step before it is genuinely done, attention slipping to _being done_. The visible steps still ahead — the **post-completion steps** — supply the pull; the criterion's clarity is the resistance. Defend in order: **sharpen the bound first** (local and cheap); only if it is irreducibly fuzzy _and_ you observe the rush, hide the later steps by splitting the sequence — and hiding only works across a real context boundary (a hand-off or a subagent dispatch; an inline call leaves the later steps in context and clears nothing).
- **Demand** — how much it requires. "Every modified model accounted for" forces thorough work where "produce a change list" does not. Demand drives **legwork** — the digging the agent does within the work, latent in the wording rather than written as its own step — and it is not step-bound: "every rule applied" binds a body of flat reference just as "every step done" binds a sequence, which is how an all-reference document still carries an exhaustiveness bar.

The strongest criteria are both checkable and exhaustive.

## When to split

Splitting one document into two spends one of the two loads, so split only when the cut earns it:

- **By sequence** — split a run of steps where the post-completion steps tempt the agent to rush the one in front of it. Keeping them out of view drives more legwork on the current task. Beware the reverse: merging sequences exposes each step's later steps to what follows, inviting premature completion.
- **By invocation** — skill-specific: see [`SKILL-MECHANICS.md`](SKILL-MECHANICS.md).

## Leading words

A **leading word** is a compact concept already living 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 whole region of behaviour in the fewest tokens, by recruiting priors the model already holds. Coining your own works if you define it clearly, but a made-up word recruits no priors — you pay in definition tokens what a pretrained word gives free; reach for an existing word first.

It anchors twice. In the body, _execution_: the agent reaches for the same behaviour every time the word appears, and inside flat reference it focuses attention on a class of thing to look for. In a pointer, _invocation_: when the same word lives in your prompts, your docs, and your codebase, the agent links that shared language to the material and reaches it more reliably.

Hunt for opportunities to refactor with leading words. A triad spelled out at three sites, a pointer spending a sentence to gesture at one idea — each is a passage begging to collapse into a single token:

- "fast, deterministic, low-overhead" → _tight_ (a _tight_ loop).
- "a loop you believe in" → _red_ — a fuzzy gate becomes a binary observable state (the loop goes _red_ on the bug, or it doesn't).

You win twice: fewer tokens, and a sharper hook for the agent to hang its thinking on. Assume every document is carrying restatements that leading words retire — go find them.

**Negation** is the failure mode beside this lever: steering by prohibition drags the forbidden behaviour into context and makes it _more_ available, not less. _Don't think of an elephant_, and the elephant is all there is; the negation is a weak modifier the strongly-activated concept overruns, so the ban half-reads as an instruction to do the thing. Prompt the **positive** — state the target behaviour ("write one-line comments") so the banned one is never spoken. A prohibition earns its place only as a hard guardrail you cannot phrase positively; even then, pair it with the positive target so attention lands on what to do.

## Pruning

- Keep each meaning in a **single source of truth**: one authoritative place, so changing the behaviour is a one-place edit. **Duplication** — the same meaning in more than one place — costs maintenance and tokens, and inflates a meaning's prominence on the ladder past its real rank. (The accidental inverse of a leading word, which repeats a token on purpose, never the meaning.)
- The **environment** is a source of truth too — `package.json` scripts, config files, the directory layout, `--help` output — and a document that restates it is a **cache**: a copy of a lookup, earning its load only when the lookup is expensive. Cache what the agent cannot find by looking: the unwritten convention, the reason behind a choice, the gotcha no config confesses. Leave the one-file, one-command lookups to the environment, where they cannot go stale.
- Check every line for **relevance**: does it still bear on what the document does? A line loses relevance by never bearing on the task (mere exposition, or a branch that should be disclosed) or by going stale as the behaviour or world it describes changes. Shorter documents are easier to keep relevant. Without a pruning discipline the default fate is **sediment**: stale layers that settle because adding feels safe and removing feels risky, until you must core down through them to find what is still live.
- Hunt **no-ops** sentence by sentence: an instruction the model already obeys by default pays load to say nothing. The test — does it change behaviour versus the default? — is model-relative, not reader-relative: two people disagreeing about a no-op disagree about the default, and settle it by running the document, not by debate. When a sentence fails, delete the whole sentence rather than trim words from it. The test also grades leading words: a word too weak to beat the default (_be thorough_ when the agent is already thorough-ish) is a no-op, and the fix is a stronger word (_relentless_), not a different technique.

SKILL-MECHANICS.md

Source text
# Skill mechanics

The skill-specific branch of [`writing-for-agents`](SKILL.md): what changes when the document is a skill — frontmatter, the invocation choice, and router skills. Everything else about writing it is the universal reference in `SKILL.md`.

## Invocation

Two choices, trading the two loads:

- A **model-invoked** Skill keeps a trigger-rich `description` and allows implicit invocation in `agents/openai.yaml`, so the agent can reach it autonomously. You can still type its name: model invocation adds discovery without removing human invocation. The description is the Skill's top-level context pointer, so keep it precise enough to justify its standing context load.
- A **user-invoked** Skill keeps the required `name` and `description` frontmatter, but sets `policy.allow_implicit_invocation: false` in `agents/openai.yaml`. Only the human explicitly choosing the Skill should start it. This reduces accidental invocation, but it spends cognitive load because the person must remember that it exists.

Pick model-invocation only when the agent must reach the skill on its own, or another skill must. If it only ever fires by hand, make it user-invoked and pay no context load.

Shared reference that two user-invoked skills both need can live in neither — with no descriptions, neither can fire the other. Push it to a plain file outside the skill system: external reference any skill can point at.

## Splitting by invocation

The invocation cut of splitting (the sequence cut lives in `SKILL.md`): split off a model-invoked skill when you have a distinct leading word that should trigger it on its own — a trigger word you actually use in your prompts — or another skill must reach it. You pay context load for the new always-loaded description, so that independent reach has to be worth it.

## Router skills

When user-invoked skills multiply past what you can remember, that piled-up cognitive load is cured by a **router skill**: one user-invoked skill that names the others and when to reach for each, so the human has one skill to remember instead of many. It can only hint, never fire them: user-invoked skills have no description, so nothing but the human can reach them.

Keep going

One useful next step.

Plan a project and record the decisions