Skip to content
Development
Command

/spec

**"Give structure before writing code"** - Fully compliant with Kiro's spec-driven development

From plugin
claude-code-cookbook
1.1k39 skills9 agents39 commands8 MCP
Install
> /plugin marketplace add wasabeef/claude-code-cookbook

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/spec

Context preview

What this command does when you run it.

**"Give structure before writing code"** - Fully compliant with Kiro's spec-driven development

Command definition

spec.md

Create detailed specifications with spec-driven development

**"Give structure before writing code"** - Fully compliant with Kiro's spec-driven development

Unlike traditional code generation tools, it realizes Kiro's specification-driven development focused on bringing structure to development chaos. From minimal requirement input, it progressively develops from detailed product manager-level specifications to implementable designs, ensuring consistent quality from **prototype to production**.

Usage

# Request Spec Mode from Claude (minimal requirement input)
"Create a spec for [feature description]"

# Kiro's step-by-step development:
# 1. Simple requirements → Automatic generation of detailed user stories
# 2. Structured requirement descriptions using EARS notation
# 3. Refinement of specifications through step-by-step dialogue
# 4. Generation of 3 independent files:
#    - requirements.md: Requirement definitions using EARS notation
#    - design.md: Design including Mermaid diagrams and TypeScript interfaces
#    - tasks.md: Implementation plan with automatic application of best practices

Proven Results (Kiro Track Record)

**Secure File Sharing App in 2 Days**

"Create a spec for a file sharing system (with encryption)"
→ Production-level encrypted file sharing application completed in 2 days
→ Automatic application of security best practices
→ No additional prompts needed

**Game Development in One Night (For Beginners)**

"Create a spec for a 2D puzzle game"
→ Open source developer with no game development experience
→ Game completed in one night
→ Kiro handles implementation logic, allowing developers to focus on creativity

**Weekend Prototype→Production**

"Create a spec for an EC site product management system"
→ Concept to working prototype in one weekend
→ Consistent quality from prototype to production
→ Structured approach through spec-driven development

Basic Examples

# Create spec for new feature (minimal input)
"Product review system
- Star rating functionality
- Comment posting
- Image upload"

# Create spec for system feature
"User authentication
- OAuth support
- Multi-factor authentication"

# Create spec for API feature
"Payment system API
- Stripe integration
- Security-focused"

Collaboration with Claude

# Complex feature spec
"Create a spec for chat functionality including WebSocket, real-time notifications, and history management"

# Database integration feature spec
"Create a spec for EC site inventory management functionality including product addition, inventory updates, and alert functionality"

# Frontend feature spec
"Create a spec for a React dashboard including graph display, filtering, and export functionality"

# Backend feature spec
"Create a spec for a RESTful API including authentication, validation, and logging"

Features of Spec Mode

**Step-by-Step Dialogue Workflow**

  • Fully reproduces Kiro's original value of step-by-step discussion
  • Refines specifications collaboratively with users at each phase
  • Generates files through question resolution, option discussion, and approval processes

**Three Phases of Interactive Development**

  • **Phase 1**: Requirements Discovery → Discussion → Approval → `requirements.md` generation
  • **Phase 2**: Design Exploration → Discussion → Approval → `design.md` generation
  • **Phase 3**: Implementation Planning → Discussion → Approval → `tasks.md` generation

**Dynamic Specification Development**

  • Resolves requirement ambiguities through dialogue
  • Presents and discusses technical options
  • Explains trade-offs and confirms decisions

Detailed Examples

# Complex system feature
"Create a spec for an online payment system including Stripe integration, security, and error handling"

# Frontend feature
"Create a spec for a React component including state management, property design, and testing"

# Backend feature
"Create a spec for a GraphQL API including schema design, resolvers, and authentication"

# DevOps feature
"Create a spec for a CI/CD pipeline including test automation, deployment, and monitoring"

Phase-by-Phase Dialogue Workflow

Phase 1: Requirements Discovery & Discussion

**1. Automatic Expansion from Minimal Input (Kiro Style)**

User: "User management system
- Login functionality
- Profile editing
- Administrator permissions"

Claude: "I'll generate detailed user stories from your requirements.
Is this understanding correct?

Automatically generated user stories:
- User registration and authentication (OAuth compatible)
- Profile management (avatar, settings)
- Permission management (RBAC)
- Password reset functionality
- Security audit logs

I've added some details you didn't mention. Anything else we need?"

**2. Structured Requirements Description Using EARS Notation**

Claude: "Let me structure this using EARS notation:

Here are the requirements in EARS format:

WHEN a user attempts to log in
GIVEN they enter the correct email address and password
THEN the system shall confirm authentication
AND redirect to the dashboard on success

WHILE a user is on the profile editing screen
THE SYSTEM SHALL perform real-time validation
AND display a preview of changes

WHERE access is attempted to a feature requiring administrator privileges
IS when the system shall check permission levels
AND deny access if insufficient"

**3. Automatic Completion of Edge Cases and Security Requirements**

Claude: "Following best practices, I've also thought of these:

Security requirements (auto-added):
- Brute force protection
- Session management and timeouts
- CSRF and XSS protection
- Password strength rules

Edge cases (auto-detected):
- Multiple login handling
- Account lockout
- Data consistency during migration
- High traffic handling

Do these look good?"

**5. Phase 1 Completion and Approval**

Claude: "Requirements phase done.
Should I create requirem
Read more
Ships withclaude-code-cookbook

A collection of commands, roles, and automation scripts for Claude Code. Automate your workflow without unnecessary confirmations, allowing you to focus on what matters.

Get the whole plugin

Other commands on claude-code-cookbook.