skills/spec-writer/SKILL.md
Structured specification: user stories, acceptance criteria, scope.
npx skillsauth add notque/claude-code-toolkit spec-writerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Produce a structured SPEC.md before any design or implementation begins. This is Phase 0 of the feature lifecycle pipeline (spec --> design --> plan --> implement --> validate --> release). The spec defines WHAT to build and WHERE the boundaries are. It says nothing about HOW.
GATE: You have a clear understanding of the feature intent and target users before writing any stories.
Produce the spec with all 5 sections in order. Out-of-scope is MANDATORY and must contain minimum 3 items—without explicit exclusions, scope creep is invisible until too late. Every "while we're at it" addition started as an unwritten assumption.
Max 7 user stories. More than 7 means the feature is too broad. Decompose into multiple specs first. This constraint forces prioritization: which stories are essential vs. nice-to-have?
Acceptance criteria must be testable—no subjective language ("should feel fast", "user-friendly", "intuitive"). Every criterion must have a verifiable assertion. WHY: untestable criteria become opinion debates during review.
Spec says WHAT, not HOW—no code, no architecture, no database schemas, no implementation details. Those belong in the feature-lifecycle design phase.
Use this structure:
# Spec: [Feature Name]
## 1. User Stories
> Max 7 stories. Each has single responsibility.
- **US-1**: As a [role], I want [action] so that [benefit].
- **US-2**: As a [role], I want [action] so that [benefit].
## 2. Acceptance Criteria
> 2-5 criteria per story. All must be verifiable.
### US-1: [Story title]
- GIVEN [context] WHEN [action] THEN [result]
- GIVEN [context] WHEN [action] THEN [result]
### US-2: [Story title]
- GIVEN [context] WHEN [action] THEN [result]
## 3. Out of Scope
> Minimum 3 items. Each states WHY it is excluded.
This feature does NOT:
- [ ] Handle X (deferred to future work because Y)
- [ ] Support Y (explicitly excluded because Z)
- [ ] Replace Z (existing solution remains because W)
## 4. Risks & Assumptions
| Risk/Assumption | Impact | Mitigation |
|-----------------|--------|------------|
| Assumption could be wrong | What breaks | How to detect/recover |
| External dependency blocks | Delay estimate | Fallback plan |
## 5. Estimation
| Dimension | Assessment | Justification |
|-----------|------------|---------------|
| T-shirt size | S / M / L / XL | Why this size |
| Files changed | ~N files | Which areas of codebase |
| Testing complexity | Low / Medium / High | What makes testing easy or hard |
GATE: All 5 sections present. Out-of-scope has >= 3 items. Stories <= 7. All criteria use verifiable language.
.feature/ directory exists: save to .feature/SPEC.mdSPEC.md in project rootSpec saved to [path]. Run /feature-lifecycle to begin design exploration.
SPEC.md in project root, or .feature/SPEC.md if worktree is active| Error | Cause | Solution | |-------|-------|----------| | Cannot identify target users | Vague feature request | Ask user to describe who benefits and how | | More than 7 stories | Scope too broad | Decompose into multiple specs, one per coherent capability | | Cannot list 3 out-of-scope items | Scope not yet defined | Brainstorm adjacent features, related capabilities, and future enhancements that are NOT part of this work | | Acceptance criteria use subjective language | "fast", "easy", "intuitive" | Replace with measurable assertion: latency threshold, click count, error rate |
spec-writer (SPEC.md)
--> feature-lifecycle/design (reads stories + scope boundaries)
--> feature-lifecycle/plan (reads acceptance criteria for test requirements)
--> feature-lifecycle/implement
--> feature-lifecycle/validate (checks acceptance criteria as quality gates)
--> feature-lifecycle/release
documentation
Document translation: quick/normal/refined modes with chunked parallel subagents and glossary support.
development
AI image generation: Gemini and Nano Banana backends; single/series/batch workflows with prompt-to-disk.
testing
Unified voice content generation pipeline with mandatory validation and joy-check. 13-phase pipeline: LOAD, GROUND, STATS-CHECKPOINT, GENERATE, HOOK-GATE, VALIDATE, REFINE, VARIETY-GATE, JOY-CHECK, ANTI-AI, CLOSE-GATE, OUTPUT, CLEANUP. Use when writing articles, blog posts, or any content that uses a voice profile. Use for "write article", "blog post", "write in voice", "generate content", "draft article", "write about".
documentation
Critique-and-rewrite loop for voice fidelity validation.