Communitygithub.com

claude-devfleet

透過 Claude DevFleet 協調多代理程式編碼任務——規劃專案、在隔離工作目錄中派遣並行代理、監控進度並閱讀結構化報告。適用於在隔離的 git worktree 中派遣多個並行編碼代理並追蹤其報告的場景。

claude-devfleet 是什麼?

Claude DevFleet 是一個多代理協調系統,允許您派遣多個獨立的 Claude Code 實例同時執行編碼任務。每個代理在隔離的 git worktree 中運行,擁有完整的工具鏈並在完成後自動合併程式碼。使用者可以通過其 MCP 伺服器(執行於 localhost:18801)與 DevFleet 互動,處理從專案規劃到最終報告的完整工作流程。系統支援自動排程工作——您可以定義帶有依賴鏈的任務(「任務」),並設定自動派遣功能,讓任務在依賴條件滿足時自動啟動。開發者可以平行規劃、派遣、監控多個任務,並以結構化格式收集結果,包括更改的檔案、執行的測試、發生的錯誤以及ゴール的下一步行動。預設最多可同時運行 3 個代理(可通過 `DEVFLEET_MAX_AGENTS` 配置),當所有插槽滿載時,啟用自動派遣的任務會排入任務監控佇列,並在插槽空出時自動啟動。支援的平台包括任何能執行 MCP 且能存取 DevFleet 伺服器的 Claude 實例。系統採用有向無環圖(DAG)管理任務依賴關係,禁止循環依賴,並在發生合併衝突時將變更保留在代理的工作分支上以便手動解決。整體而言,DevFleet 將繁雜的多代理平行開發工作流轉化為可追蹤、可控制的結構化流程,特別適合大型專案的平行開發需求。

相容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/affaan-m/everything-claude-code/tree/main/skills/claude-devfleet

在你喜歡的 AI 中提問

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

說明文件

Claude DevFleet 多代理協調系統

使用時機

當您需要派遣多個 Claude Code 代理並行處理編碼任務時使用此技能。每個代理在隔離的 git worktree 中執行,且擁有完整的工具集。

設定

DevFleet 伺服器是一個獨立的專案,並未隨 ECC 一起捆綁。請先從其儲存庫安裝並執行:https://github.com/LEC-AI/claude-devfleet

然後透過 MCP 連接到執行中的實例:

claude mcp add devfleet --transport http http://localhost:18801/mcp

首次使用前,請確認監聽在連接埠 18801 的處理程序是您安裝的 DevFleet 二進位檔案(請參閱關於 localhost MCP 伺服器的 SECURITY.md 文件)。

運作方式

使用者 → "建立一個包含認證和測試的 REST API"
  ↓
plan_project(prompt) → project_id + 任務 DAG
  ↓
向使用者顯示計劃 → 獲得批准
  ↓
dispatch_mission(M1) → 代理 1 在 worktree 中啟動
  ↓
M1 完成 → 自動合併 → 自動派遣 M2(depends_on M1)
  ↓
M2 完成 → 自動合併
  ↓
get_report(M2) → files_changed, what_done, errors, next_steps
  ↓
向使用者回報結果

工具

工具用途
plan_project(prompt)AI 將描述分解為具有連鎖任務的專案
create_project(name, path?, description?)手動建立專案,回傳 project_id
create_mission(project_id, title, prompt, depends_on?, auto_dispatch?)新增任務。depends_on 是任務 ID 字串陣列(例如 ["abc-123"])。設定 auto_dispatch=true 可在依賴條件滿足時自動啟動。
dispatch_mission(mission_id, model?, max_turns?)為一個任務啟動代理
cancel_mission(mission_id)停止執行中的代理
wait_for_mission(mission_id, timeout_seconds?)阻塞直到任務完成(參閱下方注意事項)
get_mission_status(mission_id)檢查任務進度(不阻塞)
get_report(mission_id)讀取結構化報告(更改的檔案、測試情況、錯誤、後續步驟)
get_dashboard()系統概覽:執行中的代理、統計資料、近期活動
list_projects()瀏覽所有專案
list_missions(project_id, status?)列出專案中的任務

關於 wait_for_mission 的注意事項: 此呼叫會阻塞對話,最多持續 timeout_seconds 秒(預設 600)。對於長時間執行的任務,建議改用 get_mission_status 每 30–60 秒輪詢,以便使用者看到進度更新。

工作流程:規劃 → 派遣 → 監控 → 報告

  1. 規劃:呼叫 plan_project(prompt="...") → 回傳 project_id 以及包含 depends_on 鏈和 auto_dispatch=true 的任務清單。
  2. 顯示計劃:向使用者呈現任務標題、類型和依賴鏈。
  3. 派遣:對根任務(depends_on 為空的任務)呼叫 dispatch_mission(mission_id=<first_mission_id>)。其餘任務會隨著依賴任務完成而自動派遣(因為 plan_project 對它們設定了 auto_dispatch=true)。
  4. 監控:呼叫 get_mission_status(mission_id=...) 或 get_dashboard() 檢查進度。
  5. 報告:任務完成時呼叫 get_report(mission_id=...)。向使用者分享重點。

並行數量

DevFleet 預設最多同時運行 3 個代理(可透過 DEVFLEET_MAX_AGENTS 配置)。當所有插槽滿載時,啟用 auto_dispatch=true 的任務會排入任務監控佇列,並在插槽空出時自動派遣。請檢查 get_dashboard() 以了解目前插槽使用情況。

範例

全自動:規劃與啟動

  1. plan_project(prompt="...") → 顯示包含任務及其依賴關係的計劃。
  2. 派遣第一個任務(depends_on 為空的任務)。
  3. 其餘任務會隨著依賴項解析而自動派遣(它們已設定 auto_dispatch=true)。
  4. 回覆使用者時附上專案 ID 和任務數量,讓使用者知道已啟動了什麼。
  5. 定期使用 get_mission_status 或 get_dashboard() 輪詢,直到所有任務達到終止狀態(completed、failed 或 cancelled)。
  6. 對每個終止狀態的任務執行 get_report(mission_id=...) — 總結成功事項,並指出失敗的錯誤與後續步驟。

手動:逐步控制

  1. create_project(name="我的專案") → 回傳 project_id。
  2. 為第一個(根)任務建立 create_mission(project_id=project_id, title="...", prompt="...", auto_dispatch=true) → 取得 root_mission_id。 為每個後續任務建立 create_mission(project_id=project_id, title="...", prompt="...", auto_dispatch=true, depends_on=["<root_mission_id>"])。
  3. 對第一個任務執行 dispatch_mission(mission_id=...) 以啟動任務鏈。
  4. 完成後執行 get_report(mission_id=...)。

順序執行並含審查

  1. create_project(name="...") → 取得 project_id。
  2. create_mission(project_id=project_id, title="實作功能", prompt="...") → 取得 impl_mission_id。
  3. dispatch_mission(mission_id=impl_mission_id),然後使用 get_mission_status 輪詢直到完成。
  4. get_report(mission_id=impl_mission_id) 以審查結果。
  5. create_mission(project_id=project_id, title="審查", prompt="...", depends_on=[impl_mission_id], auto_dispatch=true) — 由於依賴項已滿足,任務會自動啟動。

使用指南

  • 在派遣之前,務必先與使用者確認計劃,除非使用者已表示可以繼續。
  • 在報告狀態時,請包含任務標題和 ID。
  • 如果一個任務失敗,請在重試之前先閱讀其報告。
  • 在大量派遣前,請檢查 get_dashboard() 以了解代理插槽可用性。
  • 任務依賴關係形成一個 DAG(有向無環圖)——請勿建立循環依賴。
  • 每個代理在隔離的 git worktree 中執行,並在完成時自動合併。如果發生合併衝突,變更會保留在代理的工作分支上,以便手動解決。
  • 手動建立任務時,如果希望任務在依賴項完成時自動觸發,請務必設定 auto_dispatch=true。缺少此旗標時,任務會保持為 draft 狀態。

Individual skills in this repo

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

accessibility

Design, implement, and audit inclusive digital products using WCAG 2.2 Level AA. Use when building or auditing UI that must meet WCAG 2.2 Level AA, or when reviewing a change for keyboard, contrast, or screen-reader support.

affaan-m/claude-api

Anthropic Claude API patterns for Python and TypeScript. Covers Messages API, streaming, tool use, vision, extended thinking, batches, prompt caching, and Claude Agent SDK. Use when building applications with the Claude API or Anthropic SDKs.

affaan-m/everything-claude-code

End-to-end marketing campaign planning and execution. Covers audience research, positioning, campaign angle definition, landing page copy, email sequences, social posts, ad copy, short-form video scripts, and content calendars. Use as the orchestration layer for multi-channel product launches. Use when planning or executing a multi-channel product launch, or producing landing page, email, social, or ad copy.

affaan-m/everything-claude-code

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/everything-claude-code-conventions

Development conventions and patterns for everything-claude-code. JavaScript project with conventional commits.

affaan-m/frontend-design

Create distinctive, production-grade frontend interfaces with high design quality. Use when the user asks to build web components, pages, or applications and the visual direction matters as much as the code quality.

affaan-m/gget

gget CLI and Python workflow for quick genomic database queries, sequence lookup, BLAST-style searches, enrichment checks, and reproducible bioinformatics evidence logs.

affaan-m/literature-review

Systematic literature-review workflow for academic, biomedical, technical, and scientific topics, including search planning, source screening, synthesis, citation checks, and evidence logging.

affaan-m/motion-ui

Production-ready UI motion system for React/Next.js. Use when implementing animations, transitions, or motion patterns.

affaan-m/project-guidelines-example

Example project-specific skill template based on a real production application.

affaan-m/pubmed-database

Direct PubMed and NCBI E-utilities search workflows for biomedical literature, MeSH queries, PMID lookup, citation retrieval, and API-backed literature monitoring.

affaan-m/scholar-evaluation

Structured scholarly-work evaluation for papers, proposals, literature reviews, methods sections, evidence quality, citation support, and research-writing feedback.

affaan-m/uspto-database

USPTO patent and trademark data workflow for official record lookup, PatentSearch queries, TSDR checks, assignment data, and reproducible IP research logs.

agent-architecture-audit

Full-stack diagnostic for agent and LLM applications. Audits the 12-layer agent stack for wrapper regression, memory pollution, tool discipline failures, hidden repair loops, and rendering corruption. Produces severity-ranked findings with code-first fixes. Essential for developers building agent applications, autonomous loops, or any LLM-powered feature. Use when an agent or LLM feature misbehaves and the failing layer is unknown, or before shipping an agent stack.

agent-eval

Head-to-head comparison of coding agents (Claude Code, Aider, Codex, etc.) on custom tasks with pass rate, cost, time, and consistency metrics. Use when choosing between coding agents, or when a change to an agent setup needs measured pass rate, cost, and time rather than an impression.

agent-harness-construction

Design and optimize AI agent action spaces, tool definitions, and observation formatting for higher completion rates. Use when defining or revising an agent

agentic-engineering

Operate as an agentic engineer using eval-first execution, decomposition, and cost-aware model routing. Use when planning or executing engineering work that agents will carry out end to end.

agentic-os

Build persistent multi-agent operating systems on Claude Code. Covers kernel architecture, specialist agents, slash commands, file-based memory, scheduled automation, and state management without external databases. Use when building a persistent multi-agent system on Claude Code with its own memory, commands, and scheduling.

agent-introspection-debugging

Structured self-debugging workflow for AI agent failures using capture, diagnosis, contained recovery, and introspection reports. Use when an agent run fails and you need a reproducible diagnosis instead of a retry.

agent-payment-x402

Add x402 payment execution to AI agents with per-task budgets, spending controls, and non-custodial wallets. Supports Base through agentwallet-sdk and X Layer through OKX Payments / OKX Agent Payments Protocol. Use when an agent must pay for something itself and needs per-task budgets, spending controls, and a non-custodial wallet.

相關技能