hivemind
它能做什么
它会把日常任务发送给独立的 opencode 工作智能体,这些智能体可以并行运行。适合希望在简单工作上节省主要 AI 用量,并且已经在使用 opencode 的开发者。
适用场景
- ✓当你希望把日常编码任务委派给免费的工作者,而不是主要助手时。
- ✓当你希望侦察、编码和测试三个角色在代码的不同副本上并行工作时。
- ✓当你要求启动工作者或把任务委派给 opencode 时。
技能链接
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/hivemind/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我想启动一个工作者,清理这个文件夹里未使用的导入。”
每周 5 个新技能,1 分钟读完。
工作原理
你的主智能体负责规划和审查工作,opencode 工作者负责执行任务。工作者可以在独立的 git worktree 中运行,默认模型运行在 opencode 的托管服务上。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Hivemind: Claude Code as Orchestrator, opencode as Free Worker Swarm
Claude Code = brain (plans, reviews, merges). opencode = disposable workers on free models
(opencode/mimo-v2.5-free default; verified $0.00 per run).
Prerequisites (external dependency)
This skill is a thin orchestration layer over opencode, a third-party CLI. It is not bundled — install and authenticate it yourself first:
| Requirement | Notes |
|---|---|
| Node.js >= 18 | The scripts use fetch and node:timers/promises. |
opencode CLI on PATH |
npm i -g opencode-ai (or the installer opencode documents). |
| An authenticated opencode account | opencode auth login. Workers run as your account. |
Default model opencode/mimo-v2.5-free |
A free tier offered by opencode, not by Anthropic. Availability, rate limits, and pricing are opencode's to change — override with --model at any time. |
Windows only: OPENCODE_GIT_BASH_PATH |
Point at C:\Program Files\Git\bin\bash.exe, set persistently. |
Data flow (read before installing)
Hivemind is opt-in and ships outside every domain bundle. By default your code
leaves your machine: the default model, opencode/mimo-v2.5-free, runs on
opencode's hosted service, so each worker sends its prompt, plus any files or diffs
you give it, to opencode's endpoints. Nothing on the worker side calls the Anthropic
API.
To keep code local, point --model at a model served on your own machine (for
example an Ollama or LM Studio provider configured in your opencode config). With a
hosted model, delegate only code you are allowed to send to that provider, and never
delegate secrets.
Setup
- Put this skill folder wherever your agent loads skills from (e.g.
~/.claude/skills/hivemind). - Export
HIVEMIND_HOMEpointing at that folder — the bundled slash commands use it:export HIVEMIND_HOME="$HOME/.claude/skills/hivemind" - Copy the bundled assets into place:
assets/commands/*.md->~/.claude/commands/(the/hive,/oc,/swarm, ... entry points)assets/agents/*.md->~/.config/opencode/agent/(the scout / coder / tester worker personas)
Both copies are optional: everything the commands do can be driven by invoking
scripts/oc-worker.mjs directly, and any opencode agent name works with --agent.
Runtime state (.runs/*.jsonl) is written inside this folder and is gitignored.
Components
| Path (relative to this skill dir) | Purpose |
|---|---|
scripts/oc-worker.mjs |
ONLY sanctioned way to invoke a worker. Hardened join point. |
scripts/oc-status.mjs |
Fleet progress from run logs (oc-status.mjs <run-id>) |
scripts/oc-aggregate.mjs |
Dedupe/synthesize N worker outputs; consensus findings first |
scripts/bench/run-bench.mjs |
Benchmark configs A (claude solo), B (opencode solo), C (orchestrated swarm) |
scripts/bench/grader-prompt.md |
Blind grading rubric (max 12 pts + PASS/FAIL gate) |
scripts/oc-verify.mjs |
Fan a worker's claims to a verifier on a DIFFERENT model; returns counts + needs_review |
assets/commands/ |
Slash-command entry points to copy into ~/.claude/commands/ |
assets/agents/ |
scout / coder / tester / verifier agent definitions for opencode |
Slash commands (ship in assets/commands/, copy to ~/.claude/commands/):
/hive <task>- AUTO-ROUTER. Classifies task -> single worker, generic swarm, or template. Default entry point; prefer this over manual routing./oc <task>- single worker delegation/swarm <task>- generic parallel swarm/review-panel <diff>- 4-lens parallel review (correctness/security/performance/style) + consensus aggregation/research-sweep <question>- 3-5 parallel research angles, synthesized/migration <task>- batched per-worktree migration workers + sequenced merge/test-fleet <target>- partitioned parallel test runs with safety checks
Worker agents (ship in assets/agents/, copy to ~/.config/opencode/agent/):
- scout - read-only research (no write/edit/bash)
- coder - implements one subtask in its worktree
- tester - runs tests only, never edits source
Invocation contract
node "<skill-dir>\scripts\oc-worker.mjs" [--agent scout|coder|tester] [--dir <path>] [--model <p/m>] [--timeout 900] [--run <id> --label <name>] [--json] "TASK TEXT"
Returns exactly ONE compact JSON line:
{ ok, result, tokens:{total,input,output,cache}, cost_usd, duration_ms, label, agent, model }
常见问题
我的代码会离开我的电脑吗?
默认会。默认模型运行在 opencode 的托管服务上,因此发送给工作者的提示和文件会传到那里。
使用前我需要准备什么?
需要 Node.js、在 PATH 中可用的 opencode 命令行工具,以及一个已登录的 opencode 账户。
我可以使用其他模型吗?
可以。你可以随时用参数覆盖默认模型。
详情
作者的原始描述
Use when delegating grunt work to free opencode workers instead of spending Claude tokens: one worker or a scout, coder and tester swarm in worktrees. Triggers on 'spawn a worker', 'swarm', 'delegate to opencode' or /oc.
热度
- GitHub 星标
- 29k
- 排名
- #9561
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-launcher-orchestrator
29k帮你的智能体从一个清晰的目标出发,逐步规划、构建、测试并定时运行你自己账户中的 Claude 托管智能体。
grade-iterate
29k让你的智能体按评分标准为托管 AI 智能体的工作打分,并在固定的轮次内改进,因此它永远不会无限循环。
interview
29k让你的智能体就一个 AI 智能体的想法对你进行访谈,并在任何上线之前,把你的回答整理成一份简单的构建计划。
run-without-you
29k帮你的智能体设置托管 AI 智能体,使其按计划或在某个事件发生时运行,并在启动前检查定时设置。