Communitygithub.com

SamuelChien/mega-skills-collection

透過你的 Kanban 看板(Asana、GitHub Projects、Linear)協調自動化 AI 開發管線。管理多個 Claude Code worker 的調度、確定性品質閘門、對抗式審查、每項任務成本追蹤,以及崩潰-proof 管線執行。

mega-skills-collection 是什麼?

AgentFlow 能將你的 Kanban 看板轉變為完全自動化的 AI 開發管線。它將專案管理工具(Asana、GitHub Projects、Linear)視為分散式狀態機,任務在階段間流動,AI agent 透過留言讀寫狀態,人類則透過他們已經熟悉的介面進行干預。這項技能最顯著的優勢是即使用戶在手機上也能獲得完整的管線可觀測性、免費的崩潰復原(狀態存在於 PM 工具中,而非記憶體中),以及隨時可透過拖拽卡片進行人工干預。 AgentFlow 支援 7 階段的 Kanban 管線(待辦、研究、建置、審查、測試、整合、完成),並採用無狀態的協調器,每 15 分鐘透過 crontab 驅動一次掃描。它強制執行「確定性優先於機率性」的品質策略,在 AI 審查之前先運行 tsc、eslint 和測試,以低成本攔截大部分問題。此外,對抗式審查要求不同的 AI agent 列出 3 個問題才能通過。 使用者可以透過 `/spec-to-board` 將規格分解為任務,透過 `/sdlc-orchestrate` 調度任務,並同時執行多個 `/sdlc-worker`。成本追蹤按任務計算,並設有自動護欄。安全性功能包括自動還原、死 agent 檢測和優雅關機。此技能特別適合需要在多個 Claude Code worker 之間協調完整開發生命週期(建置、審查、測試、整合)的個人或團隊專案。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SamuelChien/mega-skills-collection/tree/HEAD/agentflow

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

AgentFlow

概述

AgentFlow 將你現有的 Kanban 看板轉變為一個完全自主的 AI 開發管線。它不需要建置自訂的協調基礎設施,而是將你的專案管理工具(Asana、GitHub Projects、Linear)視為一個分散式狀態機 —— 任務在各個階段之間流動,AI agent 透過留言讀取和寫入狀態,人類則透過他們已經在使用的同一介面進行干預。

結果是:你可以從手機上獲得完整的管線可觀測性、免費的崩潰復原(狀態存在於你的 PM 工具中,而非記憶體中),以及隨時可以透過拖拽卡片進行人工干預。

何時使用此技能

  • 當你需要協調多個 Claude Code worker 以完成完整的開發生命週期(建置、審查、測試、整合)時使用
  • 當你想要在 AI 審查 AI 生成的程式碼之前,先運行確定性品質閘門(tsc/eslint/tests)時使用
  • 當你需要從 Kanban 看板或手機上獲得完整的管線可視性時使用
  • 當你正在運行一個需要自主任務調度並附帶成本追蹤的個人或團隊專案時使用
  • 當你需要一個能夠在會話重啟後仍然存活、崩潰-proof 的管線協調時使用

核心概念

7 階段 Kanban 管線

任務流經:待辦 (Backlog)、研究 (Research)、建置 (Build)、審查 (Review)、測試 (Test)、整合 (Integrate)、完成 (Done)。每個階段都有特定的閘門。Kanban 看板本身就是協調層 —— 無需獨立資料庫、無需訊息佇列、無需自訂基礎設施。

無狀態協調器

一個由 crontab 驅動的一次性掃描每 15 分鐘運行一次。無需常駐程式、無需會話依賴。如果它崩潰了,下一次掃描會從上次中斷的地方繼續,因為所有狀態都存在於你的 PM 工具中。

確定性優先於機率性

在進行任何 AI 審查之前,先運行硬性閘門(tsc + eslint + tests),以接近零的成本捕獲大約 60% 的問題。AI 審查在其後進行,作為第二層。

對抗式審查

一個不同的 AI agent 審查程式碼,並且必須列出 3 個錯誤才能決定通過。這可以防止橡皮圖章式的批准。

傳遞優先級調度

優先建置能解除最多下游工作阻塞的任務,自動計算關鍵路徑。

技能 / 命令

/spec-to-board

將 SPEC.md 分解為 Kanban 看板上的原子任務,並映射依賴關係。

/sdlc-orchestrate

根據傳遞優先級和衝突檢測將任務調度給 worker。作為 crontab 掃描運行。

/sdlc-worker --slot <N>

在一個終端機插槽中運行 worker,負責接取任務、建置程式碼並建立 PR。建議同時運行 3-4 個 worker。

/sdlc-health

即時管線狀態儀表板,顯示每個任務的當前階段、指派 agent、重試次數和累計成本。

/sdlc-stop

優雅關機:活躍的 worker 完成當前任務,未啟動的任務返回待辦事項。

逐步指南

1. 撰寫你的規格

為你的專案建立一個 SPEC.md,描述你想要建置的內容。

2. 分解為任務

claude -p "/spec-to-board"

這會讀取你的 SPEC.md,將其分解為原子任務,映射依賴關係,並在你的 Kanban 看板上建立這些任務。

3. 啟動 Worker

開啟 3-4 個終端機視窗,每個作為一個 worker 插槽:

# 終端機 2 — 建置者
claude -p "/sdlc-worker --slot T2"

# 終端機 3 — 建置者
claude -p "/sdlc-worker --slot T3"

# 終端機 4 — 審查者
claude -p "/sdlc-worker --slot T4"

# 終端機 5 — 測試者
claude -p "/sdlc-worker --slot T5"

4. 啟動協調器

# 添加到 crontab(每 15 分鐘運行一次)
crontab -e
# 添加:*/15 * * * * ~/.claude/sdlc/agentflow-cron.sh >> /tmp/agentflow-orchestrate.log 2>&1

5. 監控與干預

在你的手機上打開 Kanban 看板。觀察任務流經管線。將任何卡片拖到「需要人工」以進行干預。運行 /sdlc-health 以查看終端機儀表板。

6. 停止管線

claude -p "/sdlc-stop"

品質閘門

每個階段在晉級前都會執行特定的閘門:

  • 建置到審查:tsc + eslint + npm test 都必須通過(確定性)
  • 審查到測試:對抗式審查者必須列出 3 個問題才能通過
  • 測試到整合:新檔案的覆蓋率門檻為 80%
  • 整合到完成:合併後在 main 分支上運行完整測試套件;失敗時自動還原

成本追蹤

按任務進行成本追蹤,並設定階段上限(Sonnet 預設):

  • 研究:約 $0.10
  • 建置:約 $0.40
  • 審查:約 $0.10
  • 測試:約 $0.05
  • 整合:約 $0.03

自動護欄:在 $3/$8 時發出警告,在 $10/$20(Sonnet/Opus)時強制停止並升級給人類。

安全性與復原

  • 自動還原:整合失敗會觸發 git revert(新提交,絕不強制推送)
  • 阻塞的任務:經過 2 次失敗嘗試後,任務會升級給人工審查
  • 死 agent 檢測:每 5 分鐘一次心跳,超過 10 分鐘超時則重新指派
  • 優雅關機:/sdlc-stop 會清空 worker,將未啟動的任務返回待辦事項
  • 範圍蔓延檢測:將 PR 的 diff 檔案與預測檔案列表進行比較
  • 規格漂移檢測:SHA-256 雜湊比較可在迭代中捕捉需求變更

安裝

# 複製儲存庫
git clone https://github.com/UrRhb/agentflow.git

# 將技能和提示詞複製到你的 Claude Code 設定檔
cp -r agentflow/skills/* ~/.claude/skills/
cp -r agentflow/prompts/* ~/.claude/sdlc/prompts/
cp agentflow/conventions.md ~/.claude/sdlc/conventions.md

或者作為 Claude Code 插件安裝:

/plugin marketplace add UrRhb/agentflow
/plugin install agentflow

最佳實踐

  • 應做:在運行 /spec-to-board 之前撰寫清晰的 SPEC.md
  • 應做:對於典型專案,從 3-4 個 worker 開始
  • 應做:從你的 Kanban 看板進行監控,並在需要時將卡片拖到「需要人工」
  • 應做:定期檢閱 LEARNINGS.md —— 它會捕捉常見的失敗模式
  • 不應做:跳過確定性品質閘門 —— 它們能以低成本捕捉大多數問題
  • 不應做:強制推送到 main 分支 —— AgentFlow 使用 git revert 來確保安全
  • 不應做:運行超過專案並行能力支援的 worker 數量

故障排除

問題:Worker 似乎卡住或已死

症狀: 任務卡片在 15 分鐘以上沒有移動,沒有新的留言 解決方案: 協調器會透過心跳檢測死 agent,並在 10 分鐘後重新指派。如果問題持續,請運行 /sdlc-health 檢查狀態,並手動將卡片拖回待辦事項。

問題:成本護欄被觸發

症狀: 任務被移動到「需要人工」並帶有 COST:CRITICAL 標籤 解決方案: 檢閱任務的留言線程以了解累積的上下文。決定是增加預算、簡化任務,還是將其拆分為更小的部分。

問題:合併後整合測試失敗

症狀: 任務從 main 分支自動還原 解決方案: 自動還原可維持 main 分支的穩定性。檢查任務留言中的重試上下文,其中記錄了已嘗試和失敗的內容。下一個被指派的 worker 將使用此上下文。

相關技能

  • @brainstorming - 在 AgentFlow 之前使用,以設計你的 SPEC.md
  • @writing-plans - 補充規格撰寫以進行任務分解
  • @test-driven-development - 與 AgentFlow 的品質閘門配合良好
  • @subagent-driven-development - 多 agent 協調的另一種方法

其他資源

限制

  • 僅在任務明確符合上述範圍時使用此技能。
  • 請勿將輸出視為環境特定驗證、測試或專家審查的替代品。
  • 如果缺少所需的輸入、權限、安全邊界或成功標準,請停止並要求澄清。

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

SamuelChien/mega-skills-collection

Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

SamuelChien/mega-skills-collection

Arquitecto de Soluciones Principal y Consultor Tecnológico de Andru.ia. Diagnostica y traza la hoja de ruta óptima para proyectos de IA en español.

SamuelChien/mega-skills-collection

Ingeniero de Sistemas de Andru.ia. Diseña, redacta y despliega nuevas habilidades (skills) dentro del repositorio siguiendo el Estándar de Diamante.

SamuelChien/mega-skills-collection

Estratega de Inteligencia de Dominio de Andru.ia. Analiza el nicho específico de un proyecto para inyectar conocimientos, regulaciones y estándares únicos del sector. Actívalo tras definir el nicho.

SamuelChien/mega-skills-collection

2D game development principles. Sprites, tilemaps, physics, camera.

SamuelChien/mega-skills-collection

3D game development principles. Rendering, shaders, physics, cameras.

SamuelChien/mega-skills-collection

Expert in building 3D experiences for the web - Three.js, React Three Fiber, Spline, WebGL, and interactive 3D scenes. Covers product configurators, 3D portfolios, immersive websites, and bringing depth to web experiences.

SamuelChien/mega-skills-collection

Accessibility audit skill for scanning, fixing, and verifying WCAG 2.2 Level A and AA compliance across React, Next.js, Vue, Angular, Svelte, and plain HTML codebases. Use when auditing accessibility, fixing a11y violations, checking color contrast, generating compliance reports, or integrating accessibility checks into CI/CD pipelines.

SamuelChien/mega-skills-collection

Ab Test Analyzer - Auto-activating skill for Data Analytics. Triggers on: ab test analyzer, ab test analyzer Part of the Data Analytics skill category.

SamuelChien/mega-skills-collection

A B Test Config Creator - Auto-activating skill for ML Deployment. Triggers on: a b test config creator, a b test config creator Part of the ML Deployment skill category.

SamuelChien/mega-skills-collection

When the user wants to plan, design, or implement an A/B test or experiment. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "conversion experiment," "statistical significance," or "test this." For tracking implementation, see analytics-tracking.

SamuelChien/mega-skills-collection

Acceptance Criteria Creator - Auto-activating skill for Enterprise Workflows. Triggers on: acceptance criteria creator, acceptance criteria creator Part of the Enterprise Workflows skill category.

SamuelChien/mega-skills-collection

Use when a coding task should be driven end-to-end from issue intake through implementation, review, deployment, and acceptance verification with minimal human re-intervention.

SamuelChien/mega-skills-collection

Accessibility Audit Runner - Auto-activating skill for Frontend Development. Triggers on: accessibility audit runner, accessibility audit runner Part of the Frontend Development skill category.

SamuelChien/mega-skills-collection

You are an accessibility expert specializing in WCAG compliance, inclusive design, and assistive technology compatibility. Conduct audits, identify barriers, and provide remediation guidance.

SamuelChien/mega-skills-collection

Web accessibility patterns for WCAG 2.2 compliance including ARIA, keyboard navigation, screen readers, and testing

SamuelChien/mega-skills-collection

Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed, or change policy for the Discord channel.

SamuelChien/mega-skills-collection

Create unified specification packages across Business, Development, and Design teams. Staged elaboration (L0 Vision → L1 Requirements → L2 Team Detail → L3 Acceptance Criteria) to build shared understanding. Does not write code.

SamuelChien/mega-skills-collection

Research a company or person and get actionable sales intel. Works standalone with web search, supercharged when you connect enrichment tools or your CRM. Trigger with "research [company]", "look up [person]", "intel on [prospect]", "who is [name] at [company]", or "tell me about [company]".

SamuelChien/mega-skills-collection

Validate messaging consistency across website, GitHub repos, and local documentation generating read-only discrepancy reports. Use when checking content alignment or finding mixed messaging. Trigger with phrases like "check consistency", "validate documentation", or "audit messaging".

相關技能