Communitygithub.com

claude-devfleet

编排多智能体编码任务:通过 Claude DevFleet 规划项目、在隔离工作树中分发并行智能体、监控进度并读取结构化报告。适用于在隔离工作树中并行分发编码智能体并跟踪其报告的场景。

claude-devfleet 是什么?

Claude DevFleet 是一个多智能体编排技能,允许开发者同时分发多个 Claude Code 智能体处理编码任务。每个智能体在隔离的 Git 工作树中运行,拥有完整的工具集。该技能通过一个独立项目(https://github.com/LEC-AI/claude-devfleet)提供,并通过 MCP 协议连接。基本工作流程包括:使用 `plan_project` 将提示分解为包含依赖关系的任务 DAG(有向无环图),向用户展示计划并获得批准,然后通过 `dispatch_mission` 启动第一个任务;后续任务会随着依赖完成而自动调度(如果设置了 `auto_dispatch=true`)。DevFleet 默认最多支持 3 个并发智能体(可通过 `DEVFLEET_MAX_AGENTS` 配置),当所有插槽占满时,任务会排队等待。完成后,可通过 `get_report` 获取结构化报告,包含文件更改、测试、错误和下一步建议。该技能特别适合并行编码、模块化项目开发以及需在隔离环境中安全并行执行的任务。

兼容平台✓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 工作树中运行,拥有完整工具集。

设置

DevFleet 服务器是一个独立的项目,不与 ECC 捆绑。请先从其仓库安装并运行:https://github.com/LEC-AI/claude-devfleet

然后通过 MCP 连接正在运行的实例:

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

首次使用前,验证监听端口 18801 的进程是否为你安装的 DevFleet 二进制文件(关于本地 MCP 服务器,请参阅 SECURITY.md)。

工作原理

用户 → "构建一个带认证和测试的 REST API"
  ↓
plan_project(prompt) → project_id + 任务 DAG
  ↓
向用户展示计划 → 获得批准
  ↓
dispatch_mission(M1) → 智能体 1 在工作树中启动
  ↓
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)。对于长时间运行的任务,建议改为每 30-60 秒使用 get_mission_status 轮询,以便用户看到进度更新。

工作流程:规划 → 分发 → 监控 → 报告

  1. 规划:调用 plan_project(prompt="...") → 返回 project_id 及包含 depends_on 依赖链和 auto_dispatch=true 的任务列表。
  2. 展示计划:向用户展示任务标题、类型和依赖链。
  3. 分发:对根任务(depends_on 为空)调用 dispatch_mission(mission_id=<第一个任务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 工作树中运行,并在完成时自动合并。如果发生合并冲突,更改会保留在智能体的工作树分支上,供手动解决。
  • 手动创建任务时,如果要让任务在依赖完成时自动触发,务必设置 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.

相关技能