/prd-to-spec
Transform a PRD into a technical SPEC document — architecture, API design, data model, error handling, and implementation contracts. Triggers on: prd-to-spec, prd to spec, prd转spec, 需求转设计, 需求转规格, generate spec from prd, design from prd, 技术方案, 设计方案.
$ npx -y skills add smallnest/goal-workflow --skill prd-to-spec --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
- Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
- You can call itInvoke it directly when you want it.
- Slash command
/prd-to-spec
Context preview
The summary Claude sees to decide when to auto-load this skill.
Transform a PRD into a technical SPEC document — architecture, API design, data model, error handling, and implementation contracts. Triggers on: prd-to-spec, prd to spec, prd转spec, 需求转设计, 需求转规格, generate spec from prd, design from prd, 技术方案, 设计方案.
SKILL.md
prd-to-spec.SKILL.mdname: prd-to-spec
description: "Transform a PRD into a technical SPEC document — architecture, API design, data model, error handling, and implementation contracts. Triggers on: prd-to-spec, prd to spec, prd转spec, 需求转设计, 需求转规格, generate spec from prd, design from prd, 技术方案, 设计方案."
user-invocable: true
prd-to-spec — PRD to Technical Specification
Transform a Product Requirements Document (PRD) into a detailed technical SPEC that an engineer or AI agent can implement against. The PRD says *what* to build; the SPEC says *how* to build it.
---
When to Use
- A `/prd` has been generated and you need to bridge the gap to implementation
- You want architecture decisions documented before coding starts
- Multiple developers/agents will implement the feature and need a shared contract
- You need to validate technical feasibility before committing to a PRD
- You want to catch design issues early — before code is written
---
The Job
1. **Locate PRD** — find or receive the PRD document 2. **Analyze context (optional)** — if a codebase exists, scan it to understand current architecture, patterns, and constraints 3. **Ask clarifying questions** — resolve technical ambiguities (max 3-5 questions) 4. **Generate SPEC** — produce a structured technical specification 5. **Review** — present to user for feedback and iteration 6. **Save** — write final SPEC to agreed location
---
Step 1: Locate PRD
Find the input PRD in one of these ways:
Provide the PRD to convert:
A. File path (e.g., tasks/prd-priority-system.md)
B. GitHub Issue URL
C. Paste PRD content directly
D. Auto-detect: scan tasks/ directory for recent PRDs
If auto-detecting, list available PRDs and let the user choose:
Found PRDs in tasks/:
1. tasks/prd-priority-system.md (2024-03-15)
2. tasks/prd-user-auth.md (2024-03-10)
Which PRD should I convert? [1/2]
---
Step 2: Analyze Context (Optional)
**Skip this step if no codebase exists yet** (greenfield project). In that case, the SPEC will propose architecture from scratch based on the PRD requirements and clarifying questions.
If a codebase exists, scan it to understand:
- **Existing architecture** — how the current system is structured
- **Tech stack** — languages, frameworks, libraries already in use
- **Patterns** — naming conventions, file organization, error handling approach
- **Database** — current schema, migration tool, ORM
- **API style** — REST/GraphQL/gRPC, authentication method, response format
- **Testing** — test framework, coverage patterns, test utilities
This ensures the SPEC aligns with the existing system rather than proposing incompatible solutions.
---
Step 3: Clarifying Questions
Ask only when the PRD leaves technical decisions ambiguous. Focus on:
- **Architecture choices** — where does this feature live? New service or extend existing?
- **Data storage** — new table? Extend existing? Cache strategy?
- **API design** — new endpoints? Extend existing? Breaking changes?
- **Dependencies** — any new libraries needed? Version constraints?
- **Performance** — expected load? Latency requirements? Batch size limits?
Format:
Technical questions before I generate the SPEC:
1. Where should the priority logic live?
A. Extend existing TaskService
B. New PriorityService
C. Inline in controller
D. Let me decide based on the codebase
2. Database migration approach?
A. Add column to existing tasks table
B. New priority table with FK
C. JSON field on tasks
D. Let me decide based on current schema
3. API versioning concern?
A. Add to existing v1 endpoints
B. New v2 endpoints
C. No versioning needed
If user selects "let me decide" options, make the best choice based on codebase analysis and document the rationale in the SPEC.
---
Step 4: SPEC Document Structure
# SPEC: [Feature Name]
> Technical specification derived from: [PRD filename/link]
> Generated: [date] | Target branch: [branch] | Commit: [short-hash]
## 1. Summary
### 1.1 What This SPEC Covers
[One paragraph: what feature this specifies and the scope of implementation]
### 1.2 PRD Reference
- Source: [path or URL to PRD]
- User Stories covered: [US-001, US-002, ...]
- Functional Requirements covered: [FR-1, FR-2, ...]
### 1.3 Design Decisions Summary
| Decision | Choice | Rationale |
|----------|--------|-----------|
| ... | ... | ... |
---
## 2. Architecture
### 2.1 System Context
[Where this feature fits in the overall system — diagram or description]
### 2.2 Component Design
[New components/modules introduced, their responsibilities, and boundaries]
### 2.3 Module Interactions
[How new components interact with existing ones — sequence or data flow]
### 2.4 File Structure
[New files to create and existing files to modify]
src/ ├── services/ │ └── priority.service.ts [NEW] ├── controllers/ │ └── task.controller.ts [MODIFY: add priority endpoints] ├── models/ │ └── priority.model.ts [NEW] └── migrations/ └── 20240315_add_priority.ts [NEW]
---
## 3. Data Model
### 3.1 Schema Changes
[New tables, columns, indexes — with SQL or ORM notation]
### 3.2 Entity Definitions
[TypeScript interfaces / Go structs / Python dataclasses for new entities]
### 3.3 Relationships
[How new entities relate to existing ones — FK, embedded, reference]
### 3.4 Migration Plan
[Migration steps, backward compatibility, rollback strategy]
---
## 4. API Design
### 4.1 Endpoints
| Method | Path | Description | Auth | Request | Response |
|--------|------|-------------|------|---------|----------|
| ... | ... | ... | ... | ... | ... |
### 4.2 Request/Response Schemas
[Detailed shapes with field types, validation rules, and examples]
### 4.3 Error Responses
[Error codes, messages, and HTTP status codes for each failure mode]
### 4.4 Breaking Changes
[Any backward-incompatible changes and migration path for consumers]
---
## 5. Business Logic
### 5.1 Core Algorithms
[Step-by-step logi
Read more
name: prd-to-spec description: "Transform a PRD into a technical SPEC document — architecture, API design, data model, error handling, and implementation contracts. Triggers on: prd-to-spec, prd to spec, prd转spec, 需求转设计, 需求转规格, generate spec from prd, design from prd, 技术方案, 设计方案." user-invocable: true
prd-to-spec — PRD to Technical Specification
Transform a Product Requirements Document (PRD) into a detailed technical SPEC that an engineer or AI agent can implement against. The PRD says *what* to build; the SPEC says *how* to build it.
---
When to Use
- A `/prd` has been generated and you need to bridge the gap to implementation
- You want architecture decisions documented before coding starts
- Multiple developers/agents will implement the feature and need a shared contract
- You need to validate technical feasibility before committing to a PRD
- You want to catch design issues early — before code is written
---
The Job
1. **Locate PRD** — find or receive the PRD document 2. **Analyze context (optional)** — if a codebase exists, scan it to understand current architecture, patterns, and constraints 3. **Ask clarifying questions** — resolve technical ambiguities (max 3-5 questions) 4. **Generate SPEC** — produce a structured technical specification 5. **Review** — present to user for feedback and iteration 6. **Save** — write final SPEC to agreed location
---
Step 1: Locate PRD
Find the input PRD in one of these ways:
Provide the PRD to convert: A. File path (e.g., tasks/prd-priority-system.md) B. GitHub Issue URL C. Paste PRD content directly D. Auto-detect: scan tasks/ directory for recent PRDs
If auto-detecting, list available PRDs and let the user choose:
Found PRDs in tasks/: 1. tasks/prd-priority-system.md (2024-03-15) 2. tasks/prd-user-auth.md (2024-03-10) Which PRD should I convert? [1/2]
---
Step 2: Analyze Context (Optional)
**Skip this step if no codebase exists yet** (greenfield project). In that case, the SPEC will propose architecture from scratch based on the PRD requirements and clarifying questions.
If a codebase exists, scan it to understand:
- **Existing architecture** — how the current system is structured
- **Tech stack** — languages, frameworks, libraries already in use
- **Patterns** — naming conventions, file organization, error handling approach
- **Database** — current schema, migration tool, ORM
- **API style** — REST/GraphQL/gRPC, authentication method, response format
- **Testing** — test framework, coverage patterns, test utilities
This ensures the SPEC aligns with the existing system rather than proposing incompatible solutions.
---
Step 3: Clarifying Questions
Ask only when the PRD leaves technical decisions ambiguous. Focus on:
- **Architecture choices** — where does this feature live? New service or extend existing?
- **Data storage** — new table? Extend existing? Cache strategy?
- **API design** — new endpoints? Extend existing? Breaking changes?
- **Dependencies** — any new libraries needed? Version constraints?
- **Performance** — expected load? Latency requirements? Batch size limits?
Format:
Technical questions before I generate the SPEC: 1. Where should the priority logic live? A. Extend existing TaskService B. New PriorityService C. Inline in controller D. Let me decide based on the codebase 2. Database migration approach? A. Add column to existing tasks table B. New priority table with FK C. JSON field on tasks D. Let me decide based on current schema 3. API versioning concern? A. Add to existing v1 endpoints B. New v2 endpoints C. No versioning needed
If user selects "let me decide" options, make the best choice based on codebase analysis and document the rationale in the SPEC.
---
Step 4: SPEC Document Structure
# SPEC: [Feature Name] > Technical specification derived from: [PRD filename/link] > Generated: [date] | Target branch: [branch] | Commit: [short-hash] ## 1. Summary ### 1.1 What This SPEC Covers [One paragraph: what feature this specifies and the scope of implementation] ### 1.2 PRD Reference - Source: [path or URL to PRD] - User Stories covered: [US-001, US-002, ...] - Functional Requirements covered: [FR-1, FR-2, ...] ### 1.3 Design Decisions Summary | Decision | Choice | Rationale | |----------|--------|-----------| | ... | ... | ... | --- ## 2. Architecture ### 2.1 System Context [Where this feature fits in the overall system — diagram or description] ### 2.2 Component Design [New components/modules introduced, their responsibilities, and boundaries] ### 2.3 Module Interactions [How new components interact with existing ones — sequence or data flow] ### 2.4 File Structure [New files to create and existing files to modify]
src/ ├── services/ │ └── priority.service.ts [NEW] ├── controllers/ │ └── task.controller.ts [MODIFY: add priority endpoints] ├── models/ │ └── priority.model.ts [NEW] └── migrations/ └── 20240315_add_priority.ts [NEW]
--- ## 3. Data Model ### 3.1 Schema Changes [New tables, columns, indexes — with SQL or ORM notation] ### 3.2 Entity Definitions [TypeScript interfaces / Go structs / Python dataclasses for new entities] ### 3.3 Relationships [How new entities relate to existing ones — FK, embedded, reference] ### 3.4 Migration Plan [Migration steps, backward compatibility, rollback strategy] --- ## 4. API Design ### 4.1 Endpoints | Method | Path | Description | Auth | Request | Response | |--------|------|-------------|------|---------|----------| | ... | ... | ... | ... | ... | ... | ### 4.2 Request/Response Schemas [Detailed shapes with field types, validation rules, and examples] ### 4.3 Error Responses [Error codes, messages, and HTTP status codes for each failure mode] ### 4.4 Breaking Changes [Any backward-incompatible changes and migration path for consumers] --- ## 5. Business Logic ### 5.1 Core Algorithms [Step-by-step logi
An AI-driven development workflow — from PRD to shipped code, all within Claude Code.
Other skills on goal-workflow-skills.
- /article-icons
Illustrate an article (Markdown, HTML, etc.) with animated-style icons from itshover.com/icons. Fetches icons as clean inline SVG and places them at section headings, key concepts, lists, and callouts. Triggers on: /article-icons, 配图, 给文章配图标, add icons to article, illustrate
Open skill - /code-to-spec
Reverse-engineer a SPEC document from an existing project. Analyzes code, config, tests, and structure to produce a comprehensive specification. Triggers on: code-to-spec, reverse spec, generate spec, 逆向规格, 生成规格文档, 生成设计文档, 生成设计方案, extract spec, document this project, what does
Open skill - /graph
Graph engineering for parallel task execution: convert a task, PRD, SPEC, or issue set into a dependency graph (DAG), layer it into supersteps, then implement each independent node concurrently with subagents — each node runs /goal → /review-it → /ship-it in an isolated git
Open skill - /humanize-it
对指定文档进行去 AI 味的改写。自动选择最合适的人性化策略(humanizer-zh / humanize-chinese / technical-writing), 迭代改写直到效果达标或迭代 42 次为止。适用于中文文本的去 AI 化处理,包括通用文章、技术文档、学术论文等。 Use when user says: "humanize this", "去AI味", "降AIGC", "人性化改写", "改成人话", "去除AI痕迹", "humanize document", "make text human-like", "去机器味",
Open skill - /insight-diagram
为任意项目生成 UML 图、架构图和流程图。分析代码库后让用户选择要生成的图表类型,使用 architecture-diagram skill 渲染为 HTML+SVG,保存到 docs/ 目录。适用于任何软件项目的文档可视化。
Open skill - /listenhub-tts
使用 ListenHub API 将文本转换为语音(TTS)。支持三种模式:快速合成(/v1/tts)、 多角色脚本(/v1/speech)、长文本流式合成(/v1/flow-speech/episodes)。 音色未指定时自动获取音色列表供用户选择,默认使用 chat-girl-105-cn(晓曼)。 Use when user says: "tts", "text to speech", "语音合成", "文字转语音", "朗读", "生成语音", "生成音频", "转音频", "text to audio"
Open skill

