agentleFS
sdwurg180507280211sdwurg180507280211/my-skills/skills/spec-mode/SKILL.md

spec-mode

Skill1 starsChanged 38 days agoMITView on GitHub

Specification-driven development for complex features. Triggers when user mentions "spec", "specification", "规范", or asks to plan a complex feature. Use for multi-file changes, architectural decisions, or when requirements need clarification before implementation.

1 other project uses a version of this.

Adopted by

Most recently taken up by

The file

Show its rules and text

We split this skill into the rules it gives an agent

13 rules. About 0 are common, 9 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Ask clarifying questions about the feature

    line 37
  2. Distinctive:

    Write user stories in format: "作为[角色],我希望[功能],以便[价值]"

    line 38
  3. Distinctive:

    Create terminology glossary if needed

    line 41
  4. Very specific:

    Goal: Create design.md and tasks.md

    line 70
  5. Distinctive:

    Consider trade-offs and alternatives

    line 75
  6. Very specific:

    Use TaskCreate tool to create trackable tasks from tasks.md

    line 135
  7. Very specific:

    Update task status with TaskUpdate as you progress

    line 137
  8. Distinctive:

    Test incrementally as you build

    line 138
  9. Distinctive:

    Verify against acceptance criteria

    line 140
  10. Very specific:

    When starting implementation, convert tasks.md into trackable tasks:

    line 158
  11. Distinctive:

    Use clear section headers matching the template

    line 175
  12. Distinctive:

    Write in Chinese for requirements and design (match project language)

    line 176
  13. Distinctive:

    Ask questions early rather than making assumptions

    line 178

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Spec Mode - Structured Development

This skill creates structured specification documents following the .kiro/specs/ format used in the project.

When to Use

Trigger this skill when:

  • User mentions "spec", "specification", "规范"
  • Complex features spanning multiple files
  • Architectural changes requiring design approval
  • Requirements need clarification before coding
  • User asks to "plan" or "design" before implementing

Spec Directory Structure

Each spec is a directory under .kiro/specs/<feature-name>/ containing:

.kiro/specs/<feature-name>/
├── requirements.md    # 需求文档(用户故事 + 验收标准)
├── design.md         # 设计文档(架构、技术选型、字段设计)
├── tasks.md          # 任务清单(checkbox 格式)
└── *.md              # 其他实现文档(可选)

Three-Phase Workflow

Phase 1: Requirements Gathering

Goal: Create requirements.md

  1. Ask clarifying questions about the feature
  2. Write user stories in format: "作为[角色],我希望[功能],以便[价值]"
  3. Define acceptance criteria using WHEN/THEN/SHALL format
  4. Identify edge cases and constraints
  5. Create terminology glossary if needed

Output Template:

# 需求文档

## 简介
[功能概述,1-2段]

## 术语表
- **Term**: Definition

## 需求

### 需求 1: [功能名称]

**用户故事:** 作为[角色],我希望[功能],以便[价值]。

#### 验收标准

1. WHEN [条件] THEN System SHALL [行为]
2. THE System SHALL [要求]
3. IF [条件] THEN System SHALL [行为]

Phase 2: Design & Planning

Goal: Create design.md and tasks.md

  1. Propose technical approach and architecture
  2. Define data models and API contracts
  3. List specific files to create/modify
  4. Consider trade-offs and alternatives
  5. Break down into granular tasks
  6. Get user approval before proceeding

design.md Template:

# 设计文档

## 概述
[设计目标、技术选型]

## 核心设计目标
1. **目标1**: 说明
2. **目标2**: 说明

## 技术选型
| 层级 | 技术 | 说明 |
|------|------|------|
| 前端 | Vue 3 | ... |
| 后端 | Spring Boot | ... |

## 架构设计
[组件图、流程图、数据流]

## 数据模型
[实体定义、字段说明]

## API 设计
[接口列表、请求/响应格式]

## 涉及文件清单
| 文件 | 修改类型 | 说明 |
|------|---------|------|

tasks.md Template:

# 任务清单

## 1. 后端开发
- [ ] 1.1 创建数据模型
- [ ] 1.2 实现 Service 层
- [ ] 1.3 实现 Controller 层

## 2. 前端开发
- [ ] 2.1 创建 API 接口
- [ ] 2.2 实现核心组件
- [ ] 2.3 集成路由

## 3. 测试
- [ ] 3.1 单元测试
- [ ] 3.2 集成测试

Phase 3: Implementation

Goal: Execute tasks and update progress

  1. Use TaskCreate tool to create trackable tasks from tasks.md
  2. Execute approved design systematically
  3. Update task status with TaskUpdate as you progress
  4. Test incrementally as you build
  5. Document significant decisions
  6. Verify against acceptance criteria

Implementation Flow:

1. Read tasks.md
2. Create tasks using TaskCreate tool
3. For each task:
   - TaskUpdate(status: in_progress)
   - Implement the task
   - Test the implementation
   - TaskUpdate(status: completed)
4. Verify all acceptance criteria met

Tool Integration

Use TaskCreate for Task Tracking

When starting implementation, convert tasks.md into trackable tasks:

// Example: Create task from tasks.md
TaskCreate({
  subject: "创建数据模型",
  description: "创建 AdvancedSearchRequest.java, FieldMetadata.java 等 DTO 类",
  activeForm: "创建数据模型中"
})

Use EnterPlanMode for Complex Planning

For very complex features, use EnterPlanMode tool to get dedicated planning assistance before creating the spec.

Communication Style

  • Use clear section headers matching the template
  • Write in Chinese for requirements and design (match project language)
  • Be concise but thorough
  • Ask questions early rather than making assumptions
  • Present options when multiple approaches are valid
  • Confirm understanding before moving to next phase

Example Trigger Phrases

  • "Let's spec out this feature first"
  • "I need to plan a complex change"
  • "Can you help me design this before coding?"
  • "写一个规范文档"
  • "创建一个 spec"

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.