Skip to content
Skills Library
Management & product · Planning

spec-driven-development

/spec-driven-development

当用户询问"我应该先写什么"、"如何明确需求"或"如何避免盲目编码"时调用此 skill。不适用于:纯信息查询、已有明确规格说明的场景、快速原型验证。关键 trigger 信号:规格说明、spec、需求明确化、先写什么、避免盲目编码。

Repository
agents ↗
Licence
MIT
Last repository change
28.08.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 28.08.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

当用户询问"我应该先写什么"、"如何明确需求"或"如何避免盲目编码"时调用此 skill。不适用于:纯信息查询、已有明确规格说明的场景、快速原型验证。关键 trigger 信号:规格说明、spec、需求明确化、先写什么、避免盲目编码。

Triggers from the description

我应该先写什么如何明确需求如何避免盲目编码
Original author description

当用户询问"我应该先写什么"、"如何明确需求"或"如何避免盲目编码"时调用此 skill。不适用于:纯信息查询、已有明确规格说明的场景、快速原型验证。关键 trigger 信号:规格说明、spec、需求明确化、先写什么、避免盲目编码。

How it works

  1. R (Reading) - 原文引用
  2. I (Interpretation) - 方法论骨架
  3. A1 (Past Application) - 书中作者用过的案例
  4. A2 (Future Trigger) - 用户在什么情境下会需要这个
  5. E (Execution) - 可执行步骤
  6. B (Boundary) - 什么时候不适用
Original SKILL.md headings · 75 lines, 188 words
SKILL.md preview
---
name: spec-driven-development
description: |
  当用户询问"我应该先写什么"、"如何明确需求"或"如何避免盲目编码"时调用此 skill。不适用于:纯信息查询、已有明确规格说明的场景、快速原型验证。关键 trigger 信号:规格说明、spec、需求明确化、先写什么、避免盲目编码。
source_book: Agent Skills Addy Osmani
source_project: addyosmani/agent-skills
source_chapter: Commands table / DEFINE phase
tags: [spec-driven, requirements, define-before-code]
related_skills: ["test-driven-development", "auto-build-mode"]
---

# SKILL.md - Spec-Driven Development(规格说明驱动开发)

## R (Reading) - 原文引用

> "DEFINE → PLAN → BUILD → VERIFY → REVIEW → SHIP"
> 
> "/spec | Define what to build | Spec before code"

## I (Interpretation) - 方法论骨架

**核心思想**:在写代码之前先定义规格说明(Spec before code)。这种"规格先行"的方法确保开发者明确知道要构建什么,避免盲目编码和需求蔓延。

**关键要素**:
1. **DEFINE 阶段**: 明确要构建什么,细化需求
2. **Spec before code**: 先写规格说明再写代码
3. **需求明确化**: 通过问题细化需求,分块展示设计供验证

## A1 (Past Application) - 书中作者用过的案例

Agent Skills 的 6 阶段开发生命周期中,DEFINE 是第一个阶段,对应 `/spec` 命令。Addy Osmani 强调"Spec before code"作为核心原则,确保 AI 编码助手在写代码之前先明确需求。

这种设计使得 AI agents 能够遵循标准化的工作流程,避免盲目编码和需求理解偏差。

## A2 (Future Trigger) - 用户在什么情境下会需要这个

**适用场景**:
- 用户不确定应该先写什么
- 用户需求模糊,需要明确化
- 用户想避免盲目编码和需求蔓延
- 用户想建立系统化的需求定义流程

**与相邻 skill 的区分**:
- 与 `test-driven-development` 的区别:spec-driven-development 关注**需求明确化**(写代码前),而 test-driven-development 关注**代码正确性验证**(写代码时)。两者互补:先明确需求,再测试驱动实现。
- 与 `auto-build-mode` 的区别:spec-driven-development 是手动定义规格,而 auto-build-mode 是自动生成计划并实现。前者更灵活,后者更高效。

## E (Execution) - 可执行步骤

1. **明确要构建什么**
   - 询问用户的核心需求和目标
   - 识别关键功能和边界条件
   - 明确验收标准
   - 完成标准: 核心需求、边界条件、验收标准三项全部记录且无缺项

2. **编写规格说明**
   - 描述功能需求
   - 定义接口和数据结构
   - 列出约束条件和非功能性需求
   - 完成标准: 规格说明文档含功能需求、接口/数据结构、约束与非功能需求四部分

3. **验证规格说明**
   - 与用户确认规格是否准确
   - 检查是否有遗漏或歧义
   - 确保规格可测试
   - 完成标准: 用户明确确认规格准确,每条需求均可映射为至少一个测试用例

4. **进入下一阶段**
   - 规格确认后进入 PLAN 阶段
   - 将规格分解为小且原子的任务
   - 开始测试驱动实现
   - 完成标准: 任务分解完成且每个任务可追溯到规格条目,首个失败测试就绪

## B (Boundary) - 什么时候不适用

**不适用场景**:
- 纯信息查询(如"这个 API 怎么用")
- 已有明确规格说明的场景
- 快速原型验证(不需要完整规格)
- 探索性编程(需求可能频繁变化)

**作者的盲点**:
- Addy Osmani 假设所有项目都需要完整规格说明,但实际上某些场景(如原型验证)可能不需要
- agent-skills 缺少对规格说明模板或最佳实践的具体指导
- 没有提到如何迭代更新规格说明以应对需求变化
Files in this package (3)
  • SKILL.md 4 KB
  • test-prompts.json 2 KB
  • test-results.md 1 KB

Versions

RepositoryScoreLicence
This page · natsummerance/agents90MIT
magnus919/agent-skills100MIT
lucasouzadev/agent-kit-skill100MIT
FrancoStino/opencode-skills-collection100MIT
DanielCryer/spec-workflow100MIT
ctoforaday/special-circumstances100MIT
krzysztofsurdy/code-virtuoso100MIT
rafidone/agent-skills100MIT
sickn33/agentic-awesome-skills100MIT

Database snapshot: 13.11.2026 · package version 73907b4264de (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 90spec-driven
    Guide spec-driven development workflow (Requirements → Design → Tasks → Implementation) with approval gates between phases. Use when user wants structured feature planning or says "use spec-driven" or "follow the spec process".
  • 90test-driven-development
    当用户询问"如何证明代码正确"、"测试应该什么时候写"或"如何确保代码质量"时调用此 skill。不适用于:纯理论讨论、不需要验证的场景、探索性编程。关键 trigger 信号:测试、TDD、证明、验证、RED-GREEN-REFACTOR、tests are proof。
  • 100spec-workflow
    This skill should be used when the user asks to "build a feature", "create a spec", "start spec-driven development", "run research phase", "generate requirements", "create design", "plan tasks", "implement spec", "check spec status", "triage a feature", "create an epic",…
  • 96write-spec
    Use when creating or changing the specification (<name>-spec.md) of an idea.
  • 90tiered-learning-path
    当用户询问"我应该从哪个项目开始"、"如何系统化提升编码技能"或"有没有适合初学者的项目"时调用此 skill。不适用于:纯信息查询、已有明确学习路径的用户、需要团队协作指导的场景。关键 trigger 信号:分级、难度级别、学习路径、初学者/中级/高级。
  • 90sdd
    Implements the Spec-Driven Development lifecycle (Intent, Requirements, Design, Tasks, Build) for structured feature development. Use when the user wants to scaffold a new feature spec, generate EARS requirements, create a technical design, break work into tasks, or check spec…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.