/ 目錄 / 演練場 / spec-flow
● 社群 echoVic ⚡ 即開即用

spec-flow

作者 echoVic · echoVic/spec-flow

Forces Claude Code through a 5-phase spec-driven workflow — Proposal, Requirements (EARS), Design, Tasks, Implementation — with living docs in .spec-flow/.

Spec-Flow is a skill that structures feature development as a gated pipeline. Each phase produces a Markdown artifact and pauses for your confirmation. Triggers include 'spec-flow', 'spec mode', 'need a plan', plus Chinese phrases '写个方案' and '做个规划'. Supports --fast (skip confirmations) and --skip-design flags.

為什麼要用

核心特性

即時演示

實際使用效果

spec-flow-skill.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "spec-flow-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/echoVic/spec-flow",
        "~/.claude/skills/spec-flow"
      ],
      "_inferred": true
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "spec-flow-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/echoVic/spec-flow",
        "~/.claude/skills/spec-flow"
      ],
      "_inferred": true
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "spec-flow-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/echoVic/spec-flow",
        "~/.claude/skills/spec-flow"
      ],
      "_inferred": true
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "spec-flow-skill": {
      "command": "git",
      "args": [
        "clone",
        "https://github.com/echoVic/spec-flow",
        "~/.claude/skills/spec-flow"
      ],
      "_inferred": true
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "spec-flow-skill",
      "command": "git",
      "args": [
        "clone",
        "https://github.com/echoVic/spec-flow",
        "~/.claude/skills/spec-flow"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "spec-flow-skill": {
      "command": {
        "path": "git",
        "args": [
          "clone",
          "https://github.com/echoVic/spec-flow",
          "~/.claude/skills/spec-flow"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add spec-flow-skill -- git clone https://github.com/echoVic/spec-flow ~/.claude/skills/spec-flow

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: spec-flow

Turn a vague feature idea into a documented spec and implementation

👤 Engineers pushing back against 'just start coding' ⏱ ~60 min intermediate

何時使用: PM handed you a one-liner and you'd rather spend 20 minutes writing a spec than 2 days writing the wrong code.

前置條件
  • Skill cloned to ~/.claude/skills/spec-flow — git clone https://github.com/echoVic/spec-flow ~/.claude/skills/spec-flow
步驟
  1. Invoke the workflow
    spec-flow: add multi-region failover to our billing service.✓ 已複製
    → Claude writes .spec-flow/proposal.md and waits for confirmation
  2. Confirm or edit each phase
    Proposal looks good — proceed to requirements.✓ 已複製
    → requirements.md appears with EARS-format statements
  3. Implement from the task list
    Start the implementation phase. Work through tasks.md top-to-bottom.✓ 已複製
    → Code changes that map 1:1 to task checkboxes

結果: A feature ships with the spec still alive in .spec-flow/ — future you can see why every decision happened.

注意事項
  • You're hacking a 10-minute fix and the skill adds 4 gates — Use --fast or just skip the skill for trivial work
搭配使用: github · filesystem

Reverse-engineer a spec for existing code before refactoring

👤 Engineers inheriting undocumented modules ⏱ ~45 min intermediate

何時使用: About to refactor something nobody wrote a spec for.

步驟
  1. Ask Spec-Flow to backfill
    spec-flow --skip-design: backfill proposal and requirements.md for the existing src/auth module.✓ 已複製
    → Clean EARS requirements extracted from actual code behavior
  2. Use the spec as refactor target
    Now design phase — how would we restructure while preserving these requirements?✓ 已複製
    → design.md that maps new architecture to existing requirements

結果: A refactor grounded in a written contract instead of tribal knowledge.

搭配使用: filesystem

組合

與其他 MCP 搭配,撬動十倍槓桿

spec-flow-skill + github

Commit .spec-flow/ artifacts alongside code so the spec lives in the repo history

After implementation, commit .spec-flow/ + src/ changes in one PR titled after the proposal.✓ 已複製
spec-flow-skill + planning-with-files

Spec-Flow drives phase structure; planning-with-files keeps cross-session progress memory

Use spec-flow for the phases and planning-with-files for progress.md tracking across days.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
proposal_phase feature description Start of a new feature 0
requirements_phase approved proposal After proposal confirmed 0
design_phase approved requirements After requirements confirmed; skippable with --skip-design 0
tasks_phase approved design Before implementation 0
implementation_phase approved tasks Final phase — actually build it 0

成本與限制

運行它的成本

API 配額
None
每次呼叫 Token 數
Each phase re-reads prior .spec-flow/ docs, so context grows across phases
費用
Free — skills are local files
提示
Use --fast on simple features; gates only earn their keep on 2+ day work.

安全

權限、密鑰、影響範圍

憑證儲存: No credentials — pure prompts
資料出站: None — .spec-flow/ stays in your working directory

故障排查

常見錯誤與修復

Skill not invoked — Claude codes without writing proposal.md

Use one of the trigger phrases exactly: 'spec-flow', 'spec mode', 'need a plan', '写个方案'.

驗證: ls ~/.claude/skills/spec-flow/SKILL.md
SKILL.md frontmatter wrong

Re-clone the repo; description is what drives auto-activation.

驗證: head ~/.claude/skills/spec-flow/SKILL.md
Wrong trigger keywords — Claude skips phases

Don't say '--fast' unintentionally. If you want full gates, omit flags and say 'spec-flow'.

替代方案

spec-flow 對比其他方案

替代方案何時用它替代權衡
planning-with-filesYou want durable memory across sessions rather than phase gatingDifferent axis — complementary, not competing
Freeform devFeature is 1-2 hours of workFaster, but no audit trail

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills