From dev
Write or update persistent domain specs from existing code. Reads implementation, produces specs/<domain>.md and updates specs/README.md index. Triggers on: "dev/specs", "write spec", "update specs", "spec this"
How this skill is triggered — by the user, by Claude, or both
Slash command
/dev:specsThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Writes persistent domain specifications from code reality. Specs describe stable system domains — not features, not chronological tasks. They survive implementation cycles and accumulate architectural knowledge over time.
Writes persistent domain specifications from code reality. Specs describe stable system domains — not features, not chronological tasks. They survive implementation cycles and accumulate architectural knowledge over time.
This skill is general purpose — it can be invoked standalone to spec any part of a codebase, or called by other skills (e.g. dev/done) as part of a larger flow.
Specs describe intent informed by reality. Code is truth, but specs capture the why and boundaries that code alone cannot express. When writing a spec, read the code first, then articulate the design it embodies — plus goals, non-goals, and invariants that aren't visible in the implementation.
Determine what domain this spec covers. A domain is a stable system boundary — not a feature, not a task, not a ticket.
Good domain names:
auth-system — enduring, covers auth as a concepttask-engine — a subsystem with stable interfacesdata-pipeline — an architectural seamBad domain names:
add-priority-filter — that's a feature, not a domainspec-003 — chronological numbering fragments knowledgephase-2-redesign — tied to a moment in timeIf the user provides a feature name, identify which domain(s) it belongs to.
Read specs/README.md if it exists. Determine whether:
This is the most important step. Read the actual implementation thoroughly:
Do not write a spec from memory or from a PRD alone. The code is the source of truth for what exists. The spec adds why it exists and what its boundaries are.
Use the spec-schema reference (loaded with this skill). Scale the spec to the domain:
Every spec must have at minimum:
specs/README.md is the control plane. Every spec must be registered here with:
If specs/README.md doesn't exist, create it. See the spec-schema reference for the index format.
Stage and commit spec changes:
docs: spec <domain> — [created|updated] [brief reason]
dev/doneWhen called as part of the done flow, you receive context about what was built (the squash merge diff). In this mode:
.dev/prd.md) provides intent context — but write the spec from code reality, not PRD aspirationsspecs/README.md every time a spec is created or its code location changesnpx claudepluginhub codethread/claude-code-plugins --plugin devGuides creation, editing, and verification of skills for AI coding agents using test-driven development with subagent scenarios. Use when authoring or debugging skills.