Installation
OpenClaw Setup (Recommended)
OpenClaw is the primary platform for this skill. It uses workspace-based prompt injection with automatic skill loading.
Via ClawdHub (recommended):
CODEBLOCK0
Manual:
CODEBLOCK1
Technical Specification Design Skill
1. Input Contract
Accepts the following input types:
- 1. Complete PRD document
- Brief requirements description (may be incomplete)
- Existing technical specification (for optimization/review)
2. Available Resources
Core Templates
Component design | Designing individual components|
|
requirements_analysis_template.md | Requirements analysis | Breaking down requirements |
Examples
Complete spec example |
Scripts
Validate skill structure |
python scripts/validate.py |
3. Output Contract
Output must be Markdown and strictly include the following structure (may be trimmed by mode):
Standard Structure
- 1. Requirements Clarification (if needed)
- Requirements Analysis (the trifecta)
- Technical Specification Design
- Component/Module Design
- Technology Selection Comparison (if applicable)
- Risk and Boundary Analysis
- Pending Questions
4. Mode System (Auto-selected)
Mode A: Requirements Clarification Mode
Trigger conditions:
- - Insufficient input information
- Key uncertainties exist
Output:
- - Only output "Requirements Clarification Questions"
- Do not proceed with any design work
Mode B: Lightweight Specification Mode
Trigger conditions:
- - Simple features
- Implementation path is relatively clear
Output:
- - Simplified requirements analysis
- Core specification design
- Brief component breakdown
Mode C: Full Technical Specification Mode (Default)
Trigger conditions:
- - Medium to large requirements
- Involves architecture/component design/technology selection
Output complete structure
5. Execution Flow (Must Follow Strictly)
Step 1: Requirements Completeness Check
Check for missing information:
- - User goals
- Requirements context
- Inputs and outputs
- Constraints
- Edge cases
If missing:
→ Enter Mode A, output only clarification questions
Step 2: Requirements Analysis (The Trifecta)
1. Feature Breakdown
Format:
Product requirement → Page/Module → Change points
2. Use Case Analysis
Describe complete user paths (cross-page)
3. Page Operation Specification
Format:
Action + Condition + Object + Behavior
Step 3: Technical Specification Design
Include:
- - Architecture breakdown (frontend/backend/services)
- Data flow design
- State management
- Core processes (pseudocode acceptable)
Step 4: Component/Module Design
Requirements:
- - Must drill down to component/module level
- Clear responsibility boundaries
- Describe dependencies
Step 5: Technology Selection Comparison (If Multiple Options)
Must use table format:
| Approach | Description | Pros | Cons | Use Cases |
Step 6: Risk and Boundary Analysis
Must include:
- - Edge cases
- Performance concerns
- Scalability
- Exception handling
Step 7: Output Pending Questions
List all issues still requiring product/business confirmation
6. Output Constraints (Mandatory)
Prohibited
- - ❌ Output runnable code (JS / TS / Java / SQL, etc.)
- ❌ Skip requirements analysis and write specs directly
- ❌ Make assumptions based on "common cases"
- ❌ Use vague language (e.g., "maybe", "typically")
Required
- - ✅ Use structured expression
- ✅ Use pseudocode for process descriptions
- ✅ All changes must map to components/modules
- ✅ Explicit boundaries and exceptions
7. Technology Research Guidelines
When multiple approaches exist, must use comparison tables—plain text descriptions are not allowed.
8. Red Flags (Must Stop)
If any of these thoughts occur, must stop and return to the process:
- - "Just write a rough spec first"
- "Handle it the common way"
- "Design while coding"
- "This requirement is simple, no analysis needed"
9. Quick Checklist
Before output, must confirm:
- - [ ] Requirements clarified
- [ ] Trifecta complete
- [ ] Component design included
- [ ] Pseudocode used
- [ ] Edge cases analyzed
- [ ] Pending questions documented
10. Examples (Few-shot)
Example 1: Ambiguous Requirements (Mode A)
Input:
"Build a comment feature"
Output:
- - Do comments support replies?
- Is pagination needed?
- Is liking/upvoting needed?
- Is moderation required?
Example 2: Simple Requirements (Mode B)
Input:
"Show success message after form submission"
Output:
- - Brief feature breakdown
- State transitions
- Toast/notification component design
Example 3: Complex Requirements (Mode C)
Input:
"Design an admin system with multi-role permissions"
Output:
Complete technical specification structure (including technology comparison)
Core Principles (Summary)
The essence of technical specifications: eliminate uncertainty before coding.
安装
OpenClaw 设置(推荐)
OpenClaw 是该技能的主要平台。它使用基于工作区的提示注入,并支持自动技能加载。
通过 ClawdHub(推荐):
bash
clawdhub install technical-spec-design
手动安装:
bash
git clone https://github.com/wjszxli/technical-spec-design ~/.openclaw/skills/technical-spec-design
技术规格设计技能
1. 输入契约
接受以下输入类型:
- 1. 完整的 PRD 文档
- 简短的需求描述(可能不完整)
- 现有的技术规格(用于优化/评审)
2. 可用资源
核心模板
组件设计 | 设计单个组件|
|
requirementsanalysis_template.md | 需求分析 | 拆解需求 |
示例
完整规格示例 |
脚本
验证技能结构 | python scripts/validate.py |
3. 输出契约
输出必须为 Markdown 格式,并严格包含以下结构(可根据模式裁剪):
标准结构
- 1. 需求澄清(如有需要)
- 需求分析(三要素)
- 技术规格设计
- 组件/模块设计
- 技术选型对比(如适用)
- 风险与边界分析
- 待定问题
4. 模式系统(自动选择)
模式 A:需求澄清模式
触发条件:
输出:
模式 B:轻量规格模式
触发条件:
输出:
模式 C:完整技术规格模式(默认)
触发条件:
输出完整结构
5. 执行流程(必须严格遵循)
步骤 1:需求完整性检查
检查缺失信息:
如果缺失:
→ 进入模式 A,仅输出澄清问题
步骤 2:需求分析(三要素)
1. 功能拆解
格式:
产品需求 → 页面/模块 → 变更点
2. 用例分析
描述完整的用户路径(跨页面)
3. 页面操作规范
格式:
动作 + 条件 + 对象 + 行为
步骤 3:技术规格设计
包括:
- - 架构拆解(前端/后端/服务)
- 数据流设计
- 状态管理
- 核心流程(可使用伪代码)
步骤 4:组件/模块设计
要求:
- - 必须细化到组件/模块级别
- 明确的职责边界
- 描述依赖关系
步骤 5:技术选型对比(如有多个选项)
必须使用表格格式:
| 方案 | 描述 | 优点 | 缺点 | 适用场景 |
步骤 6:风险与边界分析
必须包括:
步骤 7:输出待定问题
列出所有仍需产品/业务确认的问题
6. 输出约束(强制要求)
禁止
- - ❌ 输出可运行代码(JS / TS / Java / SQL 等)
- ❌ 跳过需求分析直接编写规格
- ❌ 基于“常见情况”做假设
- ❌ 使用模糊语言(如“可能”、“通常”)
必须
- - ✅ 使用结构化表达
- ✅ 使用伪代码描述流程
- ✅ 所有变更必须映射到组件/模块
- ✅ 明确的边界和异常情况
7. 技术调研指南
当存在多种方案时,必须使用对比表格——不允许纯文本描述。
8. 危险信号(必须停止)
如果出现以下任何想法,必须停止并返回流程:
- - “先写个粗略的规格”
- “按常规方式处理”
- “边编码边设计”
- “这个需求很简单,不需要分析”
9. 快速检查清单
输出前,必须确认:
- - [ ] 需求已澄清
- [ ] 三要素已完成
- [ ] 组件设计已包含
- [ ] 使用了伪代码
- [ ] 边界情况已分析
- [ ] 待定问题已记录
10. 示例(少样本)
示例 1:模糊需求(模式 A)
输入:
“构建一个评论功能”
输出:
- - 评论是否支持回复?
- 是否需要分页?
- 是否需要点赞/顶?
- 是否需要审核?
示例 2:简单需求(模式 B)
输入:
“表单提交后显示成功消息”
输出:
示例 3:复杂需求(模式 C)
输入:
“设计一个具有多角色权限的管理系统”
输出:
完整的技术规格结构(包括技术对比)
核心原则(总结)
技术规格的本质:在编码之前消除不确定性。