hivemind
Skill này làm gì
Skill này gửi các tác vụ thường ngày đến các agent worker opencode riêng biệt, có thể chạy song song. Skill dành cho lập trình viên muốn tiết kiệm lượt dùng AI chính cho công việc đơn giản và đã dùng opencode.
Khi nào nên dùng
- ✓Khi bạn muốn giao các tác vụ lập trình thường ngày cho worker miễn phí thay vì trợ lý chính.
- ✓Khi bạn muốn một nhóm gồm scout, coder và tester làm việc song song trên các bản sao mã riêng.
- ✓Khi bạn yêu cầu tạo một worker hoặc giao việc cho opencode.
Liên kết skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/hivemind/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn tạo một worker để dọn các import không dùng trong thư mục này.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent chính lên kế hoạch và xem lại công việc, còn các worker opencode thực hiện tác vụ. Worker có thể chạy trong các worktree git riêng, và mô hình mặc định chạy trên dịch vụ được host của opencode.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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 }
Câu hỏi thường gặp
Mã của tôi có rời khỏi máy không?
Có, theo mặc định. Mô hình mặc định chạy trên dịch vụ được host của opencode, nên prompt và tệp gửi cho worker sẽ được gửi đến đó.
Tôi cần chuẩn bị gì trước khi dùng?
Node.js, công cụ dòng lệnh opencode nằm trên PATH, và một tài khoản opencode mà bạn đã đăng nhập.
Tôi có thể dùng mô hình khác không?
Có. Bạn có thể ghi đè mô hình mặc định bằng một cờ bất cứ lúc nào.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9561
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-launcher-orchestrator
29kGiúp agent của bạn lên kế hoạch, xây dựng, kiểm thử và lên lịch một Claude managed agent trong tài khoản riêng, từng bước một, bắt đầu từ một mục tiêu rõ ràng.
grade-iterate
29kCho phép agent của bạn chấm kết quả một managed AI agent theo bảng tiêu chí và cải thiện qua số vòng cố định, nên không bao giờ lặp vô tận.
interview
29kCho phép agent của bạn phỏng vấn bạn về ý tưởng agent AI và biến câu trả lời thành một kế hoạch xây dựng đơn giản trước khi khởi chạy bất cứ điều gì.
run-without-you
29kGiúp agent của bạn thiết lập một managed AI agent chạy theo lịch hoặc khi có sự kiện xảy ra, với thời gian cron được kiểm tra trước khi khởi chạy.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.