hivemind

Orchestrate parallel opencode workers from Claude Code with worktree isolation and consensus aggregation.

25.3k|3.6k|Updated Oct 19, 2025
One-click install
npx skills add https://github.com/alirezarezvani/claude-skills --skill hivemind
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hivemind
Source: https://github.com/alirezarezvani/claude-skills/tree/main/engineering/hivemind
Command: npx skills add https://github.com/alirezarezvani/claude-skills --skill hivemind

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires opencode-ai, and includes scripts (resource) and assets (resource) components.

What problem does it solve?

Running every coding subtask through a premium model burns tokens on work that free models can handle. This Skill lets Claude Code act as an orchestrator that delegates grunt work to free opencode workers, cutting token costs while keeping review and merging under your control.

Core Features & Use Cases

  • Single worker delegation: Send one read-only question or small task to a free opencode worker via a hardened script that returns one compact JSON line with tokens, cost, and duration.
  • Parallel swarms with worktree isolation: Decompose a task into 2-5 independent subtasks, spawn scout/coder/tester workers in parallel against separate git worktrees, then review and merge diffs yourself.
  • Fleet templates and benchmarking: Use slash commands for review panels, research sweeps, migrations, and test fleets, plus a benchmark harness comparing Claude solo, opencode solo, and orchestrated swarm configs.
  • Use Case: You need a large diff reviewed. Run /review-panel to spawn four parallel lens reviewers (correctness, security, performance, style), aggregate their findings by consensus, and get a SHIP/FIX verdict at zero worker cost.

Quick Start

Ask the agent to delegate a task to a free opencode worker, for example: use /hive to route "review the changes in src/auth for security issues" to the right worker pattern.

Frequently Asked Questions about hivemind

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I delegate coding tasks to free AI models from Claude Code?

Invoke the oc-worker.mjs script with a task string, optionally specifying an agent (scout, coder, tester), model, and working directory. It returns one compact JSON line with the result, token usage, and cost, keeping raw opencode streams out of your context.

How do I run a parallel AI agent swarm on a coding task?

Decompose the task into 2-5 independent subtasks, create one git worktree per writing worker, then issue all worker invocations as parallel calls in one message. Review each diff yourself and merge approved branches; workers never share directories or merge their own work.

What are the prerequisites for using opencode workers?

You need Node.js 18 or later, the opencode CLI installed globally and on PATH, and an authenticated opencode account via opencode auth login. On Windows you must also set OPENCODE_GIT_BASH_PATH to your Git bash executable.

Does the free opencode model tier have limitations?

Free-tier models like opencode/mimo-v2.5-free can hit rate limits (HTTP 429) under heavy swarms, and worker output quality varies so diffs always need review. Pricing and availability are controlled by opencode and can change, so verify before relying on zero cost.

What happens when an opencode worker fails?

Retry the worker once against the same directory. If it still fails, the orchestrator performs that subtask inline and marks it orchestrator-sourced; if opencode is entirely down, abandon workers and complete the task directly.