Slash Commands
Powerful slash commands for spec-driven development in Claude Code.
ck init
in your project to install the slash commands.
/spec:create
Create a new structured specification with a 3-phase workflow.
/spec:create [feature-description]
The 3-Phase Workflow
Phase 1: Requirements
Claude generates
requirements.md
with:
- User stories and acceptance criteria
- EARS notation requirements (WHEN... THE SYSTEM SHALL...)
- Non-functional requirements
- Constraints and out-of-scope items
Approval Gate: Claude presents requirements using ExitPlanMode. You review and approve before proceeding to design.
Phase 2: Design
Claude creates
design.md
with:
- Architecture overview and component analysis
- Data models and interfaces
- Component specifications
- Testing strategy and performance considerations
Approval Gate: Another ExitPlanMode checkpoint. Review the design before task breakdown.
Phase 3: Tasks
Claude generates
tasks.md
with:
- Specific implementation tasks
- Clear acceptance criteria for each task
- Task dependencies and complexity estimates
- Testing checklist
Final Approval: Review the task breakdown. Once approved, you're ready to implement!
Examples
# Create a new feature spec
/spec:create user-authentication
# Create a spec for a specific component
/spec:create email-notification-system
# Evolve an existing spec
/spec:create improved-authentication-v2
Evolution Support
When creating a spec that evolves from an existing one, Claude automatically:
- Finds and reads the original spec
- Includes a "Specification Heritage" section
- Updates the original spec's status to "EVOLVED"
-
Creates an
evolution.mddocumenting the transition - Preserves what worked, explains what changed
/spec:implement
Implement tasks from a specification with context loading and TodoWrite tracking.
/spec:implement [spec-directory]
What It Does
- Loads Spec Context: Reads requirements.md, design.md, and tasks.md to understand the complete specification.
- Creates TodoWrite Tasks: Converts spec tasks into a tracked todo list.
- Guides Implementation: Works through tasks systematically, following test-driven development practices.
- Verifies Acceptance: Checks that all acceptance criteria are met before marking tasks complete.
- Updates Spec: Marks tasks as complete in tasks.md as you progress.
Examples
# Implement a specific spec
/spec:implement .claude/specs/user-authentication
# Continue working on a partially completed spec
/spec:implement .claude/specs/email-notifications
Hook Integration
If you have the
spec_task_context
hook configured, it will automatically inject spec context when you
use file editing tools (Write, Edit). This reminds Claude of:
- Which spec task you're working on
- Acceptance criteria to verify
- How to update tasks.md when complete
/spec:review
Review a specification for completeness, quality, and alignment with methodology.
/spec:review [spec-directory]
Review Criteria
Requirements
- All requirements use EARS notation
- Edge cases covered
- Acceptance criteria clear and testable
- Non-functional requirements defined
Design
- Architecture is sound
- Data models are complete
- Testing strategy defined
- Performance considered
Tasks
- Tasks are specific and actionable
- Dependencies are clear
- Acceptance criteria match requirements
- Complexity is estimated
Example
/spec:review .claude/specs/user-authentication
Output
The review provides a detailed report with:
- ✅ What's good and complete
- ⚠️ Potential issues or gaps
- 💡 Suggestions for improvement
- 📝 Recommended next steps
Integration with TodoWrite
All slash commands work seamlessly with Claude's TodoWrite tool:
-
/spec:createcreates todos for each phase -
/spec:implementloads spec tasks into TodoWrite - Claude updates todo status as you work
- Tasks are marked complete only when all acceptance criteria pass
Best Practices
✅ Do
- Review and approve each phase before proceeding
- Ask questions if requirements aren't clear
- Request changes to the spec before implementation
- Use descriptive spec names (feature-focused)
-
Run
/spec:reviewbefore implementing
❌ Don't
- Skip approval gates - they catch issues early
- Implement without a complete spec
- Modify requirements during implementation
- Mark tasks complete if acceptance criteria fail
- Delete old specs - mark them as EVOLVED instead