LLM Skills
~/catalogue/debugging et maintenance//SKILL

Agenthub

/SKILL

Collaboration multi-agent plugin qui génère N sous-agents parallèles rivalisant sur la même tâche grâce à l'isolation de l'arborescence Git.

alirezarezvanialirezarezvani
23.3k
20 juin 2026
MIT License
// contenu du skill

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

author: Alireza Rezvani

category: engineering

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:initCreate a new collaboration session — task, agent count, eval criteria
/hub:spawnLaunch N parallel subagents in isolated worktrees
/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: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: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

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
// source originale publique
alirezarezvani/claude-skills
/.gemini/skills/agenthub/SKILL.md
Licence : MIT License
Projet indépendant, non affilié à Anthropic. Ce skill reste la propriété de son auteur original.
// installer ce skill
Collez cette commande dans votre terminal à la racine de votre projet :
mkdir -p .claude/commands && curl -o ".claude/commands/SKILL.md" "https://raw.githubusercontent.com/alirezarezvani/claude-skills/main/.gemini/skills/agenthub/SKILL.md"
Ensuite dans Claude Code, tapez /SKILL pour l'activer.
open_in_newVoir la source originale
// sauvegarder
Sauvegarde disponible après connexion.
loginSe connecter pour sauvegarder
// informations
Étoiles 23.3k
LicenceMIT License
Mis à jour20 juin 2026
Format.md
AccèsGratuit
// similaires

Skills Debugging et maintenance

Voir toutarrow_forward