/trace:specfrom trace
Guides substantial work through an interview-driven planning phase, explicit acceptance criteria, and verified implementation. Use for multi-file changes that need a written plan before coding.
Ships in trace. 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.
None: SKILL.md is the whole skill.
Use Claude Code’s Read, Glob, Write, and Edit tools for file operations. Use AskUserQuestion for closed choices and normal chat for open questions. Invoke referenced skills with the Skill tool. Resolve script paths from this installed skill; respect the session’s permissions.
You are running the spec path of TRACE: substantial work that earns a written plan before implementation. The approved plan is the contract for implementation and verification. If the developer asks only for a plan, finish after presenting it; do not infer permission to implement.
First, locate the work.
/trace:spec with no surrounding description), ask one open question: "What do you want to build?" Do not propose options or infer candidates from the repo. Wait for the developer's answer.Once you have a described scope, briefly confirm it warrants the spec path. If it's small (one file, one line, a typo, a config tweak), suggest they skip the skill and do the work directly — the direct path is correct for contained changes.
If the work is genuinely substantial, proceed.
Use EnterPlanMode when available. If the session cannot enter plan mode, conduct the interview in chat and wait for explicit approval before implementation.
Look for house rules first. Before the first question, take a short look for rules that already cover this work:
AGENTS.md files in the scope and in the folders the change touchesTell the developer in a few lines what you found, with paths. Follow it in the plan. If the plan breaks a rule or a pattern, say so and ask. If you found nothing, say so in one line. A short search is enough. This is not an audit.
Interview the developer until you understand:
The plan is the contract the work is verified against, so it must state the acceptance criteria and verification approach explicitly — written into the plan, not just discussed.
Run the interview like this:
When you have enough, read authoring-rules.md, then draft the complete plan. Re-check it before presenting. Before approval, write only the plan preview; do not edit implementation files.
Save the complete plan to the plan file allowed by the current session. If no plan file is provided, use a uniquely named Markdown file under ~/.claude/plans/ when permitted. Run the viewer command below before presenting the plan. Use ExitPlanMode when available to present the same plan for approval. Otherwise ask for explicit approval in chat. Do not treat preview creation or browser opening as approval.
Run node "${CLAUDE_SKILL_DIR}/../../scripts/viewer-open.js" plan "<absolute-plan-file>". Include the returned URL with the plan. If saving or opening is unavailable, present the complete plan in chat and explain the limitation. Respect a disabled viewer. Never claim a preview opened when the command failed.
On requested revisions, update the same plan file and present the revision for approval. Implement the approved content only. If the developer rejects or aborts the plan, stop without implementation.
Open with core user stories. Right after the plan's context, add a ## Core user stories section: one bullet per outcome, phrased As a <role>, I want <capability>, so that <consequence> — e.g. "As an on-call engineer, I want the failed job's payload in the alert, so that I can retry it without opening the database." For internal work the role is still real — a developer, an on-call engineer, a CI pipeline. Tie each acceptance criterion back to a story; a criterion no story needs is scope creep, a story no criterion verifies is unfinished planning. Skip the section only when the change has no behavioural outcome at all (pure rename, dependency bump).
Diagram the structure, prose the intent. Where the shape of the change carries the meaning, put a mermaid diagram in the plan instead of describing the shape in sentences:
sequenceDiagram with the role as an actorflowchartsequenceDiagramstateDiagram-v2erDiagramPrefer the user-journey sequence diagram when a story spans more than one interaction — it shows what the role experiences, not just what the code does. Skip the diagram when the change is linear or single-file — a diagram restating a bullet list is noise.
Once the developer approves the plan, implement the work. The approved plan is the contract — refer back to its acceptance criteria as you go. If implementation reveals something the plan didn't anticipate (a constraint, a missing dependency, a wrong assumption), pause and discuss with the developer; re-agree the plan before continuing.
Do not silently expand scope. If the work needs to grow beyond the plan, that's a decision for the developer, not for the agent mid-implementation.
When implementation feels complete, walk the plan's acceptance criteria one by one. Mark each met, unverified, or not met. "Met" requires evidence — never claim it without one. Evidence depends on the criterion's type:
RateLimiter registered on every route in routes/api.ts", "old JWT_TTL key removed"): a file/line citation is enough — quote the lines inline.Then:
Scan the decisions made during planning for one that looks architecturally significant — it affects the system's structure, a non-functional characteristic, a foundational dependency, a public interface, or a construction technique reused across the codebase, and there was a real choice between alternatives. If none does, skip this phase silently; most substantial work still produces no ADR.
If one might qualify, offer it using the question control: Record an ADR / Skip. On Record an ADR, invoke /trace:adr through the Skill tool — it owns the full gate, the template, numbering, and the write, and has the planning decision in context. It may still decline the decision as too small; that's the correct outcome. Don't write the ADR yourself. On Skip, continue.
Once the work is verified, tell the developer:
The work is verified against the acceptance criteria. Run
/trace:distilwhen you're ready to capture any durable knowledge from this change into the project's permanent context.
Do not run distillation yourself.
When to use: When the developer is starting substantial work — adding a feature, building or implementing something new, refactoring across multiple files, or anything with acceptance criteria they can't hold in their head. Trigger on phrases like "let's add", "I want to build", "we need to implement", "help me refactor", or any request describing scope that sounds like more than a single-file change. Not for one-line fixes, typos, config tweaks, or contained edits — those go through the direct path. Phase 1 establishes the scope (asking the developer if the invocation didn't include one) and confirms it warrants the spec path, so it is safe to trigger on borderline or bare invocations; the developer can redirect to the direct path.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Other plugins' skills for the same job
11 skills in this plugin
/adrRecord an architecture decision as a lightweight, immutable ADR in the scope's docs folder. Owns the ADR template, numbering, and write. Invokable directly for a direct-path decision, or by /trace:spec at handoff./agents-md-setupSet up or review the project's AGENTS.md through an interactive interview with the developer/commit-messageDraft a single commit's message — imperative-mood title plus a short why body, optional decision bullets, plain text (no markdown). Use when the developer explicitly asks for a commit message, asks to fix a message before amending, or asks the agent to perform the commit on their behalf./context-graphMeasure context weight per directory: AGENTS.md chains, @ imports, gotchas, on-demand docs./distilEvaluate recent changes and propose updates to the project's permanent context (AGENTS.md or the scope's docs folder) when something durable was learned/doctorValidate a TRACE-adopted scope against TRACE's own conventions — doc structure, marker pairs, AGENTS.md spec, ADR numbering and immutability, working-note banners, relative links — then guide the fixes. Owns the resolution flow for ADR number collisions left by merged branches. Useful after merges, before releases, or whenever the structure feels off.npx claudepluginhub axakon/trace --plugin trace