Web Analytics

claude-orchestration

⭐ 197 stars Simplified Chinese by mbruhler

🎭 Claude Code 的编排插件

_类似 Claude Code 中的 N8N_

如果你喜欢这个项目,请考虑 ⭐ 支持!

多智能体工作流编排。 链接 AI 代理,使用自然语言或声明式语法自动化复杂任务。

Claude Code License


安装

1. 添加插件市场

首先,将编排市场添加到你的 Claude Code:

/plugin marketplace add mbruhler/claude-orchestration

2. 安装插件

/plugin install orchestration@mbruhler
或使用交互式菜单:

/plugin

然后选择 "浏览插件" → 找到 orchestration安装

3. 验证安装

检查插件是否已安装:

/help
你应该能看到类似 /orchestration:menu/orchestration:init 等编排命令。


快速开始

0. 导入你的自定义代理(可选)

/orchestration:init

~/.claude/agents/ 导入您的自定义代理到编排插件中。

示例:

/orchestration:init
→ Select agents to import
→ Agents become available as expert-code-implementer, etc. and the plugin can create workflows using them

1. 自然语言

"Create a workflow that fetches 10 Reddit posts about startups,
analyzes competition, and shows a ratings table"

该插件:

2. 直接语法

# Parallel bug investigation
[
  Explore:"Find related code":code ||
  general-purpose:"Check recent changes":changes ||
  general-purpose:"Search similar issues":similar
] ->
general-purpose:"Identify root cause from {code}, {changes}, {similar}":analysis ->
@review:"Approve fix?" ->
general-purpose:"Implement fix and run tests":fix ->
general-purpose:"Commit changes with detailed message"

3. 模板

"Use the TDD implementation template"


核心功能

流程控制

# Sequential
step1 -> step2 -> step3

Parallel

[task1 || task2 || task3]

Conditional

test -> (if passed)~> deploy -> (if failed)~> rollback

自动化临时脚本

自动创建用于以下用途的 Python/Node.js 脚本:

手动检查点

build:"Compile app" ->
@review:"Check output. Continue?" ->
deploy:"Deploy to production"

视觉进度

╔════════════════════════════════════╗
║  TDD Implementation                ║
╠════════════════════════════════════╣
║    [Write Test] ●                  ║
║         │                          ║
║    [Implement] ○                   ║
║         │                          ║
║    [@Review] ○                     ║
╠════════════════════════════════════╣
║ Status: Writing test...            ║
╚════════════════════════════════════╝


语法参考

| 语法 | 含义 | 示例 | |--------|---------|---------| | -> | 顺序 | step1 -> step2 | | || | 并行 | [step1 \|\| step2] | | ~> | 条件 | (if passed)~> next | | @label | 检查点 | @review-code | | :var | 捕获输出 | analyze:"task":result | | {var} | 使用变量 | "Process {result}" | | $agent | 临时代理 | $scanner:"Scan" |


内置代理

---

示例

Reddit 启动分析器

general-purpose:"Create Python PRAW script to fetch 10 r/startups posts.
                 Return JSON with title, url, description":posts ->

[ general-purpose:"Research competition for post {posts[0]}":a1 || general-purpose:"Research competition for post {posts[1]}":a2 || # ... parallel analyses ] ->

general-purpose:"Rate ideas (1-10) on competition, market, feasibility. Create markdown table":ratings ->

@review:"Review {ratings}. Ban any?" ->

general-purpose:"Generate top 3 opportunities summary"

TDD 实现

# RED: Write failing test
general-purpose:"Write failing test for the feature":test ->
general-purpose:"Run test suite - verify it fails":red_result ->
@review-coverage:"Test coverage sufficient?" ->

GREEN: Minimal implementation

general-purpose:"Write minimal code to pass the test":impl -> general-purpose:"Run test suite - verify it passes":green_result -> @review:"Code quality OK?" ->

REFACTOR: Clean up

general-purpose:"Refactor code and add documentation":refactored -> general-purpose:"Final test run and commit"

错误调查

# Parallel investigation
[
  Explore:"Find error pattern in codebase":code ||
  general-purpose:"Analyze error logs":logs ||
  general-purpose:"Check recent commits":commits ||
  general-purpose:"Search for similar bugs":known
] ->

Diagnosis

general-purpose:"Identify root cause from {code}, {logs}, {commits}, {known}":cause -> @review:"Diagnosis correct?" ->

Fix with testing

general-purpose:"Write regression test for the bug":test -> general-purpose:"Implement fix":fix ->

Verification

[ general-purpose:"Run regression test" || general-purpose:"Run full test suite" || general-purpose:"Perform smoke test" ] ->

@review:"Approve deployment?" -> general-purpose:"Commit with detailed bug fix message"


Project Structure

orchestration/
├── skills/              # Auto-activating skills
│   ├── creating-workflows/
│   ├── executing-workflows/
│   ├── managing-agents/
│   ├── managing-temp-scripts/
│   ├── designing-syntax/
│   ├── debugging-workflows/
│   └── using-templates/
├── agents/              # Permanent agents
├── temp-agents/         # Ephemeral (auto-cleaned)
├── temp-scripts/        # Generated scripts
├── examples/            # Templates (.flow)
└── docs/                # Documentation


高级

独立执行

# Headless (no checkpoints)
claude -p "Execute @examples/tdd-implementation.flow"

With parameters

claude -p "/orchestration:run $(cat workflow.flow)" \ --output-format json

代理推广

Workflow complete!

Temp agents: security-scanner, api-wrapper

Save as permanent? [Save all] [Save security-scanner] [Delete all]

模板参数

---
name: api-integration
parameters:
  
  • API_URL: "https://api.example.com"
  • NUM_ITEMS: 10
---

workflow: | general-purpose:"Fetch {{NUM_ITEMS}} from {{API_URL}}":data -> general-purpose:"Format results":output


故障排除

工作流挂起 → 检查点需要用户响应,或在无头模式下移除

临时脚本失败 → 检查 temp-scripts/ 目录中的生成文件 → 验证 API 凭证和依赖项

找不到代理 → 内置:精确名称(Explore,通用) → 插件:使用 orchestration: 前缀 → 临时:使用 $ 前缀

星标历史

星标历史图表


支持

---

MIT 许可证 | 为 Claude Code 社区构建

--- Tranlated By Open Ai Tx | Last indexed: 2026-03-04 ---