基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tjboudreaux/cc-engineering-skills --skill eng-spec-driven命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
| name | eng-spec-driven |
| description | Spec-driven development workflow for planning before coding with Factory |
Expert guidance for planning and documenting before implementation.
┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ 1. Gather │ ──▶ │ 2. Analyze │ ──▶ │ 3. Specify │ ──▶ │ 4. Implement│
│ Requirements│ │ Risks │ │ & Approve │ │ (TDD) │
└─────────────┘ └─────────────┘ └─────────────┘ └─────────────┘
Use thinking-socratic skill to clarify requirements:
Questions to Ask:
Output:
## Requirements Summary
### Problem Statement
[Clear description of the problem]
### Users/Stakeholders
- Primary: [who]
- Secondary: [who]
### Success Criteria
1. [Measurable outcome]
2. [Measurable outcome]
### Constraints
- Technical: [constraints]
- Timeline: [deadline]
- Dependencies: [systems]
Use thinking-pre-mortem skill to identify risks:
Pre-Mortem Exercise:
"Imagine this feature has failed spectacularly. What went wrong?"
Risk Categories:
Output:
## Risk Analysis
### High Priority Risks
| Risk | Impact | Likelihood | Mitigation |
|------|--------|------------|------------|
| [risk] | High | Medium | [strategy] |
### Assumptions
1. [assumption to validate]
2. [assumption to validate]
### Open Questions
1. [question needing answer]
Spec Document Structure:
# Feature: [Name]
## Overview
[1-2 paragraph summary]
## Requirements
- [REQ-1] [Description]
- [REQ-2] [Description]
## Technical Design
### Architecture
[Diagram or description of component interactions]
### API Design
POST /api/resource Request: { "field": "value" } Response: { "id": "123", "field": "value" }
### Database Schema
```sql
CREATE TABLE resource (
id SERIAL PRIMARY KEY,
field VARCHAR(255) NOT NULL,
created_at TIMESTAMP DEFAULT NOW()
);
| Milestone | Date |
|---|---|
| Spec approved | [date] |
| Implementation complete | [date] |
| QA complete | [date] |
| Production release | [date] |
### Phase 4: Review & Approve
Use `ExitSpecMode` tool to present spec for approval:
The spec is ready for review. Key decisions:
Options to consider:
Recommendation: Option A because [reason]
### Phase 5: Implement with TDD
After approval, use `eng-tdd` skill:
1. **Red**: Write failing test
2. **Green**: Write minimal code to pass
3. **Refactor**: Improve code quality
## Spec Templates
### API Endpoint Spec
```markdown
# API: [Endpoint Name]
## Endpoint
`POST /api/v1/resources`
## Purpose
[What this endpoint does]
## Authentication
- Required: Yes
- Method: Bearer token
## Request
### Headers
| Header | Required | Description |
|--------|----------|-------------|
| Authorization | Yes | Bearer {token} |
| Content-Type | Yes | application/json |
### Body
```json
{
"name": "string (required, 1-100 chars)",
"description": "string (optional, max 500 chars)",
"category_id": "integer (required)"
}
{
"id": 123,
"name": "Resource Name",
"description": "Description",
"category_id": 1,
"created_at": "2024-01-15T12:00:00Z"
}
| Code | Description |
|---|---|
| 400 | Invalid request body |
| 401 | Unauthorized |
| 404 | Category not found |
| 422 | Validation error |
### Database Migration Spec
```markdown
# Migration: [Name]
## Purpose
[Why this migration is needed]
## Changes
### New Tables
```sql
CREATE TABLE feature_flags (
id SERIAL PRIMARY KEY,
name VARCHAR(100) UNIQUE NOT NULL,
enabled BOOLEAN DEFAULT false,
created_at TIMESTAMP DEFAULT NOW()
);
ALTER TABLE users
ADD COLUMN last_login_at TIMESTAMP;
CREATE INDEX idx_users_last_login ON users(last_login_at);
UPDATE users SET last_login_at = created_at WHERE last_login_at IS NULL;
ALTER TABLE users DROP COLUMN last_login_at;
DROP TABLE feature_flags;
### Feature Spec
```markdown
# Feature: [Name]
## User Story
As a [user type]
I want to [action]
So that [benefit]
## Acceptance Criteria
- [ ] Given [context], when [action], then [outcome]
- [ ] Given [context], when [action], then [outcome]
## UI/UX
[Mockup link or description]
## Technical Approach
### Frontend
- Components: [list]
- State management: [approach]
- API calls: [list]
### Backend
- Endpoints: [list]
- Services: [list]
- Models: [list]
### Database
- Tables affected: [list]
- New migrations: [list]
## Dependencies
- [ ] [Dependency 1]
- [ ] [Dependency 2]
## Out of Scope
- [What's NOT included]
## Before Writing Spec
1. **Clarify with Socratic Method** (thinking-socratic)
- What assumptions am I making?
- What would happen if this failed?
- Who else needs to be involved?
2. **Identify Risks** (thinking-pre-mortem)
- What could go wrong?
- What are we overlooking?
3. **Consider Second-Order Effects** (thinking-second-order)
- How will this affect other systems?
- What behavior will this incentivize?
4. **Debias Your Thinking** (thinking-debiasing)
- Am I anchored to one solution?
- Am I overconfident?
# Enter spec mode for a feature
/spec Add user authentication
# Factory will:
# 1. Activate spec mode
# 2. Use thinking skills to clarify requirements
# 3. Draft specification
# 4. Present with ExitSpecMode for approval