Generate a specification file from user input/requirements. Use when user says "generate spec", "create spec", "write spec", "spec from requirements", or provides feature requirements and asks to create a spec. (user)
This skill inherits all available tools. When active, it can use any tool Claude has access to.
Transform user input (requirements, ideas, feature requests) into a structured specification file.
This skill activates when:
Accept various forms of input:
Use --context or -c to specify files to read as background context:
generate spec -c docs/requirements.md from: ユーザー認証
generate spec -c design/*.md -c notes.txt from: 決済機能
generate spec --context existing-api.yaml from: API拡張
The skill will:
Generate specs/[feature-name]/spec.md with structured content.
Extract from user input:
If input is too vague, ask about:
Create a structured spec file following this template:
# [Feature Name] Specification
## Overview
[Brief description of the feature]
## Purpose
[What problem this solves, business value]
## Scope
### In Scope
- [Feature 1]
- [Feature 2]
### Out of Scope
- [Excluded item 1]
- [Excluded item 2]
## Functional Requirements
### 1. [Feature/Endpoint Name]
**Endpoint**: `METHOD /api/path`
**Request**:
```json
{
"field": "type (constraints, required/optional)"
}
Response (2xx):
{
"data": {},
"meta": {}
}
Validation:
| HTTP | Code | Condition |
|---|---|---|
| 400 | ERROR_CODE | [condition] |
| Input | Expected |
|---|---|
| [case] | [behavior] |
Given [precondition] When [action] Then [expected result]
### Step 4: Write File
1. Create directory `specs/[feature-name]/`
2. Write `spec.md`
3. Report completion
## Precision Levels
The `--precision` or `-p` flag controls spec detail level:
| Level | Detail |
|-------|--------|
| 10-30% | Overview, scope, basic requirements only |
| 40-60% | + API design, validation rules |
| 70-80% | + Edge cases, error codes |
| 90-100% | + Detailed acceptance criteria, test scenarios |
**Default**: 70%
### Usage Examples
generate spec from: ユーザー認証機能が欲しい generate spec -p 30 from: 簡単な TODO アプリ generate spec --precision 100 from: [detailed requirements]
### Precision 30% Output (Quick)
```markdown
# Feature Specification
## Overview
[1-2 sentences]
## Scope
### In Scope
- [3-5 bullet points]
### Out of Scope
- [2-3 bullet points]
## Key Requirements
- [5-10 bullet points of main features]
Full template with:
Full template plus:
generate-spec-docs skill after to create Japanese documentationspec-review skill