agenthub
What it does
This skill makes several agents compete on one task, each working in an isolated copy of your code. It is for people who want to compare approaches and keep the best result.
When to use it
- βWhen you want several different approaches tried at once and the best one kept.
- βWhen you want to speed up a task by splitting it across parallel agents.
- βWhen you want different copy or research angles compared side by side.
Skill link
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/agenthub/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βTry three different ways to speed up our API at once and keep whichever is fastest.β
5 new skills a week. 1 minute to read.
How it works
The coordinator sets up a session and starts several agents in separate git worktrees. It ranks their results by a measured metric or by a judge, then merges the winner and archives the others.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
AgentHub β Multi-Agent Collaboration
Spawn N parallel AI agents that compete on the same task. Each agent works in an isolated git worktree. The coordinator evaluates results and merges the winner.
Slash Commands
| Command | Description |
|---|---|
/hub-init |
Create a new collaboration session β task, agent count, eval criteria |
/agenthub:spawn |
Launch N parallel subagents in isolated worktrees |
/hub-status |
Show DAG state, agent progress, branch status |
/agenthub:eval |
Rank agent results by metric or LLM judge |
/agenthub:merge |
Merge winning branch, archive losers |
/agenthub:board |
Read/write the agent message board |
/hub-run |
One-shot lifecycle: init β baseline β spawn β eval β merge |
Agent Templates
When spawning with --template, agents follow a predefined iteration pattern:
| Template | Pattern | Use Case |
|---|---|---|
optimizer |
Edit β eval β keep/discard β repeat x10 | Performance, latency, size |
refactorer |
Restructure β test β iterate until green | Code quality, tech debt |
test-writer |
Write tests β measure coverage β repeat | Test coverage gaps |
bug-fixer |
Reproduce β diagnose β fix β verify | Bug fix approaches |
Templates are defined in references/agent-templates.md.
When This Skill Activates
Trigger phrases:
- "try multiple approaches"
- "have agents compete"
- "parallel optimization"
- "spawn N agents"
- "compare different solutions"
- "fan-out" or "tournament"
- "generate content variations"
- "compare different drafts"
- "A/B test copy"
- "explore multiple strategies"
Coordinator Protocol
The main Claude Code session is the coordinator. It follows this lifecycle:
INIT β DISPATCH β MONITOR β EVALUATE β MERGE
1. Init
Run /hub-init to create a session. This generates:
.agenthub/sessions/{session-id}/config.yamlβ task config.agenthub/sessions/{session-id}/state.jsonβ state machine.agenthub/board/β message board channels
2. Dispatch
Run /agenthub:spawn to launch agents. For each agent 1..N:
- Post task assignment to
.agenthub/board/dispatch/ - Spawn via Agent tool with
isolation: "worktree" - All agents launched in a single message (parallel)
3. Monitor
Run /hub-status to check progress:
dag_analyzer.py --status --session {id}shows branch state- Board
progress/channel has agent updates
4. Evaluate
Run /agenthub:eval to rank results:
- Metric mode: run eval command in each worktree, parse numeric result
- Judge mode: read diffs, coordinator ranks by quality
- Hybrid: metric first, LLM-judge for ties
5. Merge
Run /agenthub:merge to finalize:
git merge --no-ffwinner into base branch- Tag losers:
git tag hub/archive/{session}/agent-{i} - Clean up worktrees
- Post merge summary to board
Agent Protocol
Each subagent receives this prompt pattern:
You are agent-{i} in hub session {session-id}.
Your task: {task description}
Instructions:
1. Read your assignment at .agenthub/board/dispatch/{seq}-agent-{i}.md
2. Work in your worktree β make changes, run tests, iterate
3. Commit all changes with descriptive messages
4. Write your result summary to .agenthub/board/results/agent-{i}-result.md
5. Exit when done
Agents do NOT see each other's work. They do NOT communicate with each other. They only write to the board for the coordinator to read.
DAG Model
Branch Naming
hub/{session-id}/agent-{N}/attempt-{M}
- Session ID: timestamp-based (
YYYYMMDD-HHMMSS) - Agent N: sequential (1 to agent-count)
- Attempt M: increments on retry (usually 1)
Frontier Detection
Frontier = branch tips with no child branches. Equivalent to AgentHub's "leaves" query.
python scripts/dag_analyzer.py --frontier --session {id}
Immutability
The DAG is append-only:
- Never rebase or force-push agent branches
- Never delete commits (only branch refs after archival)
- Every approach preserved via git tags
Message Board
Location: .agenthub/board/
Channels
| Channel | Writer | Reader | Purpose |
|---|---|---|---|
dispatch/ |
Coordinator | Agents | Task assignments |
progress/ |
Agents | Coordinator | Status updates |
results/ |
Agents + Coordinator | All | Final results + merge summary |
Post Format
---
author: agent-1
timestamp: 2026-03-17T14:30:22Z
channel: results
parent: null
---
## Result Summary
-
FAQ
Do the agents work on my main code directly?
No. Each agent works in its own isolated git worktree, so the main branch is not changed until a winner is merged.
How is the winner chosen?
By a measured metric from an eval command, or by an LLM judge that compares the diffs for correctness and simplicity.
What are the templates for?
They give agents a repeatable pattern for jobs such as optimizing speed, refactoring, writing tests or fixing bugs.
Details
Original description by the author
Use when a task should be attempted by several agents in parallel and the best result kept (code speed, copy variants, research angles). Spawns N agents in git worktrees, ranks results by metric or judge with result_ranker.py and merges the winner.
Popularity
- GitHub stars
- 29k
- Ranking position
- #9528
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-launcher-orchestrator
29kHelps your agent plan, build, test and schedule a Claude managed agent in your own account, step by step, starting from one clear goal.
grade-iterate
29kLets your agent grade a managed AI agent's work against a rubric and improve it in a fixed number of rounds, so it never loops forever.
interview
29kLets your agent interview you about an AI agent idea and turn your answers into a simple build plan before anything is launched.
run-without-you
29kHelps your agent set up a managed AI agent to run on a schedule or when an event happens, with the cron timing checked before launch.
Similar skills
add-model-provider
394kLets your agent connect a new AI model provider to OpenClaw using safe setup commands, keep API keys out of plain text, and run a live test.
acp-router
394kHelps your agent send a task to a coding assistant such as Claude Code or Cursor through OpenClaw, so the work runs in that tool.
browser-automation
394kTeaches your agent to control web pages step by step, including logins, tabs, and recovery when a page stops responding.