/will-wright-eng-skills:agent-specification [<path-to-specification-or-system.md>]from will-wright-eng-skills
Write or review the specification of an agent, or of a system of several agents, through a question/answer session. Chooses the arrangement first (one agent, pipeline, orchestrator or blackboard), then settles one SPECIFICATION.md per agent and, when there is more than one agent, a SYSTEM.md that states how they are joined. Works in a fresh repo or against one role of a system that already exists. Takes an optional path to a specification or system document to review. Use when defining, scoping or reviewing an agent or a multi-agent system, choosing between agent patterns, writing an agent's SPECIFICATION.md, or giving each role of an existing agent system a written scope.
Ships in will-wright-eng-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Settle what an agent is before any of it is built: its one job, what it will not do, and the limits that hold when nobody is watching. When the work needs several agents, settle how they are arranged and joined as well.
This skill writes documents. It does not scaffold, and it writes no code except the one test described in phase 5, and that only on a yes.
SPECIFICATION.md, one per agent. A plain markdown document with eleven sections. It is the agent's scope for the people who own it, and it is written to be loaded as the agent's instructions: plain statements of the situation, addressed to the agent where it gives direction.SYSTEM.md, only when there is more than one agent. It names the arrangement, lists the agents, and states every handoff between them and the limits on the system as a whole.Propose where each document goes and confirm it before writing:
| Situation | Default paths |
|---|---|
| One agent, fresh repo | SPECIFICATION.md in the repo root |
| Several agents | SYSTEM.md in the repo root, agents/<name>/SPECIFICATION.md for each |
| A role in a system that already exists | wherever that repo keeps its role prompts or design documents; ask |
Never overwrite an existing document unasked. If one is already at the path, say so and ask whether to review it or start again.
If the path does not exist or is not one of these documents, say so and stop. Do not fall back to the session without asking.
When the repo already holds the agents' code, read it before asking anything. The roles, their tools, their triggers and their limits are facts, and the user should be confirming what you found, not reciting it.
The content is the user's statement of intent. This skill questions it and helps word it; it does not decide it.
Start by asking for the job in one sentence. Then work down this list and stop at the first yes:
Read PATTERNS.md before proposing an answer. It says what each arrangement is, what its documents must state, and how it fails.
One agent is the default, and the user has to argue their way out of it. Splitting earns its cost only when parts need very different instructions or tools, when parts can run at the same time, or when each part should be tested on its own. Hold to one agent when speed and cost matter more than structure, and above all when the user cannot yet say what each agent would own. Ask for that list of owners before accepting a split; if it cannot be written, the answer is one agent.
When two arrangements seem to apply, one contains the other. Describe the outer one in SYSTEM.md and treat the inner group as a single agent within it, with a system document of its own.
Record the choice, and the reason the next simpler arrangement was not enough, in the system document's Arrangement section. That reason is what a later reader needs when the system has grown special cases and someone asks whether it is still the right shape.
Skip this phase for one agent.
SYSTEM.md has one ## section for each of these:
| Section | What to get | The constraint |
|---|---|---|
| Name | short name of the system | lowercase letters, digits and dashes |
| Job | what the system does for whoever asks | one sentence |
| Non-goals | what the system as a whole will not do | at least two |
| Arrangement | pipeline, orchestrator or blackboard | exactly one, with the reason the simpler one was not enough |
| Agents | every agent, with its job and what it alone owns | no two agents own the same thing; every agent owns something; no agent's job can succeed only by undoing another's |
| Handoffs | every place work passes from one agent to another | each has a sender, a receiver, what is passed, and the check plain code makes on it before the receiver sees it: its form, how old it may be, and whether it makes sense |
| Shared state | anything more than one agent reads, writes or calls: a board, a queue, an API | for each item, who may write it, what a valid write looks like, and how often one agent may touch it; "none" is an answer |
| Limits | what bounds one request across all agents | a hop limit, one budget tracked in one place and sized on the hardest real requests, and the fallback answer given when either runs out: short and safe, not half-finished work |
| Escalation | when the system stops and asks a person | concrete conditions, including what happens at the hop limit |
| Log | what is recorded | every message between agents, with enough to replay a failed request |
A request is one unit of work entering the system: one item in the queue, one tick of the timer, one question from a person. A hop is one handoff.
Each arrangement adds requirements to Agents, Handoffs and Shared state. They are listed in PATTERNS.md; ask for them in this phase.
The checks on handoffs, the limits, the caps on shared state and the log are guardrails, and a guardrail is plain code outside the agents. For each one, ask where that code will live. "The agent will check it" is not an answer, because the agent is the thing being checked.
One document per agent, each with one ## section for each of these:
| Section | What to get | The constraint |
|---|---|---|
| Name | short name | lowercase letters, digits and dashes; one agent, one name |
| Job | what it does, ongoing | one sentence, one verb, no "and" |
| Non-goals | what it will not do | at least two, drawn from things the user might later be tempted to add |
| Trigger | what starts it | exactly one |
| Workspace | where it works | one directory or repo; its tools touch nothing outside it |
| Output | what it produces | exactly one |
| Tools | what it may call | at most 6, each with a one-line purpose; no general shell tool |
| Done check | how one run's success is decided | a shell command whose exit code answers it; not a judgment |
| Budget | limit per run | tokens, wall time and steps, all three |
| Memory | what carries between runs | at least one named document, each with a one-line purpose and a rule for what gets dropped |
| Escalation | when it stops and asks | concrete conditions |
Ask what a run with nothing to do looks like. The right answer is nearly always "exit quickly and cheaply"; an agent that invents work when idle is the most common way these go wrong.
Several sections are no longer free choices. Derive them from the system document and have the user confirm them:
Write each specification so it stands alone. The agent is given its own document, not the system's, so what it needs to know about its neighbours has to be said in its own sections.
The host system usually fixes some of what a specification would otherwise decide: the daemon starts the role, the workspace is the system's, the budget is shared. Keep all eleven sections and record those as facts, naming where the system sets them ("Started by the scheduler when a new item is queued; see src/scheduler.ts"). A section left out reads as a boundary nobody thought about.
Where the code allows more than the constraint does, such as nine tools or no done check, do not shrink the specification to match the table or the table to match the code. Record what the code does, state it as a departure with its reason, and ask whether the user wants it kept or changed.
If the user means to build the agent on pi-durable-template, fetch the template first. Its src/definition.ts holds the section headings its check command requires and the forms its values take, and docs/SPECIFICATION.example.md shows the tone. Where they differ from the table above, follow the template and tell the user what differed.
The template accepts fewer answers than the table does, and the specification should give them in those forms:
remember and escalate, are built in. They do not count toward the 6 and their names cannot be reused. remember replaces a memory document with its full new text, so a document shrinks only if the specification tells the agent what to leave out.The template builds one agent and knows nothing of a system. PATTERNS.md says what joining several of them takes.
Judge every document against its constraints. The common failures are about scope, and only reading finds them.
For each agent:
For a system, also:
Report findings as a short list: what passes, what fails and why, and a proposed fix for each failure. Edit a document only after the user agrees.
A departure from a constraint is allowed when the user wants it. State it and its reason in the section it belongs to, so it is visible later. One or two are fine. A document that needs many is probably describing the wrong arrangement, and it is more useful to say so.
Only when the agents' code already exists.
For every limit a document states (tools, budget, trigger, hop limit, who may write shared state and how often, where each agent may write), find where the code enforces it and list the pairs for the user. Three outcomes are worth reporting:
Then offer a test that fails when a document and the code disagree: it reads the specification's tool list and budget and compares them with the values the role is registered with. Without that test the two drift apart within weeks and the document becomes a description of an earlier system. Write it only on a yes, in the repo's own test style.
Tell the user, briefly:
A specification written for pi-durable-template is built by the new-pi-durable-agent skill, one agent per run of that skill, in a fresh repo. That skill reads SPECIFICATION.md only; SYSTEM.md stays with the people who own the system.
What SKILL.md sets; muted values are Claude Code's defaults
Generated from the plugin's indexed repository (will-wright-eng/skills) — no native marketplace selected
npx claudepluginhub p/will-wright-eng-will-wright-eng-skills21 skills in this plugin
/annealDecompose a god module into stable and volatile pieces whose boundaries match how the code actually changes. Locates hotspots with the hc CLI (decay-weighted churn × complexity quadrants), autopsies the chosen file along three evidence axes (symbol co-change, consumer slices, internal references), interviews through each proposed seam one at a time, and delivers a strangler-fig migration plan with a measurable hc baseline. Use when a file is a "god module" or "god file", one file soaks up every change, a module needs splitting, or the user wants to isolate hot code or reduce churn concentration./assess-test-suiteAssess a project's test suite against the verification practice in "How the Claude Code team thinks about verification" — classifies every test on two axes (scope unit/integration/E2E × oracle interaction/example/snapshot/property/differential) plus health tags (flaky, slow, cannot-fail, not agent-runnable), maps user-facing features to E2E coverage, then proposes a ranked refactor toward E2E, property and differential tests, closing with a short note on what the refactor does to CI/CD runtime. Writes the assessment only on confirmation and never edits tests. Use when the user wants to "assess the test suite", "audit our tests", know "are our tests any good" or "which tests are worth writing", plan a test strategy or test refactor, deal with too many mocks or unit tests or with flaky tests, or make a test suite a reliable feedback loop for coding agents.Other plugins' skills for the same job