Multi-agent collaboration plugin that spawns N parallel subagents competing on the same task via git worktree isolation.

MITAuto-check passedAgent Workflows

Install Agenthub

skills CLI
$ npx skills add alirezarezvani/claude-skills --skill agenthub -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install alirezarezvani/claude-skills agenthub --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/alirezarezvani/claude-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/engineering/agenthub/skills/agenthub .claude/skills/agenthub && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
agenthub
GitHub stars
28k
Token cost
~2k tokens
SKILL.md length
698 words
Files
10 (incl. scripts, references)
Skills in repo
342
Repo updated
First seen
Licence
MIT

At a glance

Multi-agent collaboration plugin that spawns N parallel subagents competing on the same task via git worktree isolation.

  • Works in 5 steps: Init → Dispatch → Monitor → …
  • : user wants multiple approaches tried in parallel — code optimization
  • SKILL.md covers Slash Commands, Agent Templates, When This Skill Activates and Coordinator Protocol, plus 9 more sections
  • Runs Python scripts from its folder; calls git and python

What it does

Agenthub is an agent skill from alirezarezvani/claude-skills. Multi-agent collaboration plugin that spawns N parallel subagents competing on the same task via git worktree isolation. Agents work independently, results are evaluated by metric or LLM judge, and the best branch is merged. Use when: user wants multiple approaches tried in parallel — code optimization, content variation, research exploration, or any task that benefits from parallel competition. Requires: a git repo.

Its SKILL.md is about 2k tokens, which your agent loads only when the skill is triggered. The skill folder holds 11 other files, including scripts and reference files (for example `references/agent-templates.md`, `references/coordination-strategies.md` and `references/dag-patterns.md`).

It sits in Agent Workflows, covering LLM evaluation, Git worktrees and Subagents. It works with Git. The repository describes itself as: 380 Claude Code skills & agent skills & plugins (30+ Agents, 70+ custom commands, 380+ skills, customizable references, scripts)for Claude Code, Codex, Gemini CLI, Cursor, and 8… The licence is MIT.

When your agent uses it

  • : user wants multiple approaches tried in parallel — code optimization
  • Content variation
  • Research exploration
  • Any task that benefits from parallel competition

Example prompts

  • “/agenthub”

Requirements

  • Python 3

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Init
  2. Dispatch
  3. Monitor
  4. Evaluate
  5. Merge

What it can do on your machine

Read from SKILL.md and the folder at commit 19392f7. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 6 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • git
    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md. Its commands use git, which can reach the network depending on how they are called.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Agenthub loads about 2k tokens when it runs, and up to ~6.4k if it reads all its reference files. Until then it costs about 107 tokens; SKILL.md has 698 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~107
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~6.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from alirezarezvani/claude-skills at commit 19392f7, republished under its MIT licence (© alirezarezvani). 698 words, ~1,963 tokens.

Download SKILL.mdSave it as .claude/skills/agenthub/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
agenthub
description
Multi-agent collaboration plugin that spawns N parallel subagents competing on the same task via git worktree isolation. Agents work independently, results are evaluated by metric or LLM judge, and the best branch is merged. Use when: user wants multiple approaches tried in parallel — code optimization, content variation, research exploration, or any task that benefits from parallel competition. Requires: a git repo.
license
MIT
metadata.version
2.1.2
metadata.author
Alireza Rezvani
metadata.category
engineering
metadata.updated
2026-03-17

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

CommandDescription
/hub:hub-initCreate a new collaboration session — task, agent count, eval criteria
/hub:spawnLaunch N parallel subagents in isolated worktrees
/hub:hub-statusShow DAG state, agent progress, branch status
/hub:evalRank agent results by metric or LLM judge
/hub:mergeMerge winning branch, archive losers
/hub:boardRead/write the agent message board
/hub:runOne-shot lifecycle: init → baseline → spawn → eval → merge

Agent Templates

When spawning with --template, agents follow a predefined iteration pattern:

TemplatePatternUse Case
optimizerEdit → eval → keep/discard → repeat x10Performance, latency, size
refactorerRestructure → test → iterate until greenCode quality, tech debt
test-writerWrite tests → measure coverage → repeatTest coverage gaps
bug-fixerReproduce → diagnose → fix → verifyBug 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: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 /hub: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:hub-status to check progress:

  • dag_analyzer.py --status --session {id} shows branch state
  • Board progress/ channel has agent updates
4. Evaluate

Run /hub: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 /hub:merge to finalize:

  • git merge --no-ff winner 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.

bash
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
Show full SKILL.md (280 more words)Show less

Message Board

Location: .agenthub/board/

Channels
ChannelWriterReaderPurpose
dispatch/CoordinatorAgentsTask assignments
progress/AgentsCoordinatorStatus updates
results/Agents + CoordinatorAllFinal results + merge summary
Post Format
markdown
---
author: agent-1
timestamp: 2026-03-17T14:30:22Z
channel: results
parent: null
---

## Result Summary

- **Approach**: Replaced O(n²) sort with hash map
- **Files changed**: 3
- **Metric**: 142ms (baseline: 180ms, delta: -38ms)
- **Confidence**: High — all tests pass
Board Rules
  • Append-only: never edit or delete posts
  • Unique filenames: {seq:03d}-{author}-{timestamp}.md
  • YAML frontmatter required on all posts

Evaluation Modes

Metric-Based

Best for: benchmarks, test pass rates, file sizes, response times.

bash
python scripts/result_ranker.py --session {id} \
  --eval-cmd "pytest bench.py --json" \
  --metric p50_ms --direction lower

The ranker runs the eval command in each agent's worktree directory and parses the metric from stdout.

LLM Judge

Best for: code quality, readability, architecture decisions.

The coordinator reads each agent's diff (git diff base...agent-branch) and ranks by:

  1. Correctness (does it solve the task?)
  2. Simplicity (fewer lines changed preferred)
  3. Quality (clean execution, good structure)
Hybrid

Run metric first. If top agents are within 10% of each other, use LLM judge to break ties.

Session Lifecycle

init → running → evaluating → merged
                            → archived (if no winner)

State transitions managed by session_manager.py:

FromToTrigger
initrunning/hub:spawn completes
runningevaluatingAll agents return
evaluatingmerged/hub:merge completes
evaluatingarchivedNo winner / all failed

Proactive Triggers

The coordinator should act when:

SignalAction
All agents crashedPost failure summary, suggest retry with different constraints
No improvement over baselineArchive session, suggest different approaches
Orphan worktrees detectedRun session_manager.py --cleanup {id}
Session stuck in runningCheck board for progress, consider timeout

Installation

bash
# Copy to your Claude Code skills directory
cp -r engineering/agenthub ~/.claude/skills/agenthub

# Or install via ClawHub
clawhub install agenthub

Scripts

ScriptPurpose
hub_init.pyInitialize .agenthub/ structure and session
dag_analyzer.pyFrontier detection, DAG graph, branch status
board_manager.pyMessage board CRUD (channels, posts, threads)
result_ranker.pyRank agents by metric or diff quality
session_manager.pySession state machine and cleanup
  • autoresearch-agent — Single-agent optimization loop (use AgentHub when you want N agents competing)
  • self-improving-agent — Self-modifying agent (use AgentHub when you want external competition)
  • git-worktree-manager — Git worktree utilities (AgentHub uses worktrees internally)

© alirezarezvani, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts, references) in engineering/agenthub/skills/agenthub of alirezarezvani/claude-skills.

  • SKILL.md
  • references/agent-templates.md
  • references/coordination-strategies.md
  • references/dag-patterns.md
  • scripts/board_manager.py
  • scripts/dag_analyzer.py
  • scripts/dry_run.py
  • scripts/hub_init.py
  • scripts/result_ranker.py
  • scripts/session_manager.py

Open the folder on GitHubat commit 19392f7

Compare with similar skills

Agenthub next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Agenthub compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Agenthub this skillalirezarezvani/claude-skills28k—~2kAutomated safety check: PassMIT
Qwen Code Team CoordinatorQwenLM/qwen-code28k—~994Automated safety check: PassApache-2.0
ClawTeam Multi-Agent Swarmwin4r/ClawTeam-OpenClaw1.5k1 repos~2.9kAutomated safety check: PassMIT
Clawteamwin4r/ClawTeam-OpenClaw1.5k—~3.1kAutomated safety check: PassMIT
Puppetmaster Agent Orchestrationprofessorpalmer/Puppetmaster467—~3.2kAutomated safety check: PassMIT
O2 Review Loopopenobserve/openobserve22k—~3.7kAutomated safety check: PassAGPL-3.0

Similar skills

  • Leads a small team of Qwen Code teammates: read-only investigators work in parallel, then one writer pinned to a git worktree makes the changes.

    28k GitHub stars~994 tokensUpdated today
    Agent WorkflowsAuto-check passed
  • ClawTeam Multi-Agent Swarm

    win4r/ClawTeam-OpenClaw

    Launches a swarm of specialist Hermes agents in git-worktree-isolated tmux windows with a kanban board and file-based inboxes, using built-in templates like hedge-fund and code-review.

    1.5k GitHub starsUsed in 1 repo~2.9k tokens
    Agent WorkflowsAuto-check passed
  • Clawteam

    win4r/ClawTeam-OpenClaw

    Multi-agent swarm orchestration. An agent skill from win4r/ClawTeam-OpenClaw.

    1.5k GitHub stars~3.1k tokensUpdated 3 mo ago
    Agent WorkflowsAuto-check passed
  • Puppetmaster Agent Orchestration

    professorpalmer/Puppetmaster

    Operates and supervises Puppetmaster, a multi-agent orchestrator, through its MCP tools or CLI, picking the right verb for edits, reviews, audits and long-running jobs.

    467 GitHub stars~3.2k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • O2 Review Loop

    openobserve/openobserve

    Splits a change into planner, coder and independent reviewer roles: you confirm a spec, a subagent implements it, and a separate reviewer checks each round's local WIP commit.

    22k GitHub stars~3.7k tokensUpdated today
    Agent WorkflowsAuto-check passed
  • Agtx Task Sweep

    fynnfluegge/agtx

    Breaks a conversation's results into feature-level tasks and pushes them to the agtx kanban board, where each task gets its own worktree and agent session.

    1.7k GitHub stars~1.7k tokensUpdated 6 days ago
    Agent WorkflowsAuto-check passed

More from alirezarezvani/claude-skills

All 342 skills in this repo
  • Agile Product Owner

    alirezarezvani/claude-skills

    Writes INVEST-checked user stories with acceptance criteria, splits epics, plans sprints from velocity and ranks the backlog with a weighted score.

    28k GitHub starsUsed in 3 repos~3.2k tokens
    Auto-check passed
  • Product Strategist

    alirezarezvani/claude-skills

    OKR cascade toolkit for product leaders: generates aligned company-to-team OKRs from five strategy types and scores how well they line up.

    28k GitHub starsUsed in 2 repos~1.8k tokens
    Auto-check passed
  • App Store Optimization

    alirezarezvani/claude-skills

    App Store Optimization (ASO) toolkit for researching keywords, analyzing competitor rankings, generating metadata suggestions, and improving app visibility on Apple App Store and Google Play Store.

    28k GitHub starsUsed in 1 repo~4.2k tokens
    Auto-check passed
  • AWS Solution Architect

    alirezarezvani/claude-skills

    Design AWS architectures for startups using serverless patterns and IaC templates.

    28k GitHub starsUsed in 1 repo~2.5k tokens
    Auto-check passed
  • Campaign Analytics

    alirezarezvani/claude-skills

    Calculates attribution, funnel and ROI figures for marketing campaigns with three Python scripts that need only the standard library.

    28k GitHub starsUsed in 1 repo~2.1k tokens
    Auto-check passed
  • Code to PRD

    alirezarezvani/claude-skills

    Reverse-engineers a frontend, backend or fullstack codebase into a product requirements document with per-page docs, an enum dictionary and an API inventory.

    28k GitHub starsUsed in 1 repo~4.9k tokens
    Auto-check passed

Works with

Questions about Agenthub

What does Agenthub do?

Multi-agent collaboration plugin that spawns N parallel subagents competing on the same task via git worktree isolation. Agenthub is an agent skill from alirezarezvani/claude-skills. Multi-agent collaboration plugin that spawns N parallel subagents competing on the same task via git worktree isolation.

When should I use Agenthub?

Agenthub fits situations like: : user wants multiple approaches tried in parallel — code optimization; content variation; research exploration; any task that benefits from parallel competition.

How do I install Agenthub in Claude Code?

Run `npx skills add alirezarezvani/claude-skills --skill agenthub -a claude-code`. Or copy the skill folder (engineering/agenthub/skills/agenthub in alirezarezvani/claude-skills) into .claude/skills/agenthub in your project. Claude Code loads it when a task matches its description.

How do I install Agenthub in Codex?

Run `npx skills add alirezarezvani/claude-skills --skill agenthub -a codex`. Or copy the skill folder (engineering/agenthub/skills/agenthub in alirezarezvani/claude-skills) into .agents/skills/agenthub in your project. Codex loads it when a task matches its description.

Can I use Agenthub in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add alirezarezvani/claude-skills --skill agenthub -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/agenthub, .gemini/skills/agenthub, .github/skills/agenthub and .opencode/skills/agenthub in your project.

What does Agenthub need to run?

Going by SKILL.md and its folder, Agenthub needs Python for the scripts in its folder and the command-line tools its instructions call (git and python). Our summary lists: Python 3.

Does Agenthub access the network?

SKILL.md contains no URLs. Its commands use git, which can reach the network depending on how they are called. This is read from the text; nothing was executed.

Is Agenthub safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Agenthub use?

Agenthub is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Agenthub use?

About 2k tokens (SKILL.md is roughly 7.9k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 4.5k tokens, read only when the agent opens those files.

What are the alternatives to Agenthub?

Skills that share tags, products or a category with Agenthub: Qwen Code Team Coordinator (QwenLM/qwen-code, 28k stars), ClawTeam Multi-Agent Swarm (win4r/ClawTeam-OpenClaw, 1.5k stars), Clawteam (win4r/ClawTeam-OpenClaw, 1.5k stars) and Puppetmaster Agent Orchestration (professorpalmer/Puppetmaster, 467 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Agenthub?

alirezarezvani (a GitHub user) maintains it in alirezarezvani/claude-skills, which has 27,829 GitHub stars. The repository holds 342 skills in this directory. The repository was last updated on August 30, 2026.

Source: alirezarezvani/claude-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.