Creates comprehensive Design Docs optimized for AI-driven development. Use when starting a new feature, documenting technical solutions, or before executing development tasks...
This skill guides the creation of comprehensive Design Docs optimized for AI agents (especially Claude Code CLI) and human developers. It produces concise, information-dense documentation that serves as the "memory" and "guide" for development without hallucination.
Use this skill when:
The AI conducts an iterative interview to gather all necessary information:
Initial Scope Question
Iterative Deep Dive (2-3 questions per block)
Context & Purpose:
Terminology & Concepts:
Integrations & Dependencies:
CRITICAL - Solution Phases:
Detailed Solution:
Data Flow:
Validation Before Generation
Generate the Design Doc using strictly this template:
# [Feature Name] - Design Doc
## 1. Context
> [1-2 paragraph summary: WHAT is the feature and WHY it's being built]
## 2. Glossary
| Term | Description |
|:-----|:------------|
| [Term] | [Clear definition] |
## 3. Integrations and APIs
| API / Service | Usage Description | Key Methods/Endpoints |
|:--------------|:------------------|:----------------------|
| [e.g., Stripe /v1/customers] | [To create users] | [POST /create] |
## 4. Detailed Solution
*Group tasks logically (e.g., Setup, Client Integration, Subscriptions, Extras)*
| Phase | Task | Detailed Behavior Description (Business Rules) | Status |
|:------|:-----|:----------------------------------------------|:-------|
| **Setup** | Configure Credentials | Obtain API keys and save in environment variables. | `DEFINED` |
| **Client Integration** | Customer Creation | When registering user, create Customer in API X and save ID in database. | `DEFINED` |
| **[Category]** | [Task Name] | [Input ā Processing ā Output] | `UNDEFINED` |
## 5. Data Flow (Step-by-Step)
1. **[Actor]** initiates [Action]
2. **[System]** verifies [Condition]
3. **[System]** executes [Operation]
4. **[System]** returns [Result]
5. **[Actor]** receives [Feedback]
## 6. Technical Considerations
- Performance requirements
- Security considerations
- Error handling strategy
- Scalability concerns
## 7. Success Criteria
- [ ] [Measurable criterion 1]
- [ ] [Measurable criterion 2]
- [ ] [Measurable criterion 3]
The skill should create a .md file in the /docs/features/[feature-name] folder with the naming convention: design-doc-[feature-name].md
Be Iterative: Don't rush to generate. Gather complete information first.
Focus on Behavior: In the Detailed Solution section, describe WHAT happens, not HOW to code it.
Group Intelligently: Tasks should be grouped by logical implementation phases, not by technical layers.
Be Specific: Avoid vague descriptions like "handle errors" ā Instead: "If API returns 429, retry with exponential backoff (max 3 attempts)"
Think in Workflows: Data flow should read like a movie script - clear actors and actions.
Status Tracking: Use DEFINED, UNDEFINED, IN_PROGRESS, COMPLETED for task status.
# Start the design doc creation process
User: "Create a design doc for user authentication with OAuth"
Claude Code: [Follows discovery phase with targeted questions]
# After gathering information
Claude Code: [Generates design-doc-oauth-authentication.md]
# User can then reference this in subsequent tasks
User: "Implement the tasks from the design doc in order"
ā Generating the document without sufficient detail ā Mixing implementation details (code) with design decisions ā Creating tasks that are too granular (aim for 30min-2hr chunks) ā Forgetting to group tasks into logical phases ā Using vague business rules ("validate input" vs "validate email format: RFC 5322 compliant")