
Agenthub
Spawn parallel hub agents with the optimizer template so each worktree iterates on a metric, commits improvements, and posts board results without cross-agent leakage.
Overview
AgentHub is an agent skill most often used in Build (also Ship and Operate) that supplies hub spawn templates so parallel agents optimize a metric in isolated worktrees with eval-driven iteration.
Install
npx skills add https://github.com/alirezarezvani/claude-skills --skill agenthubWhat is this skill?
- Predefined `/hub:spawn --template` dispatch patterns for hub sessions
- Optimizer loop: up to 10 iterations with eval command, metric extraction, and git commit per improvement
- Isolated agents—no access to peers’ worktrees or results
- Progress posts to `.agenthub/board/progress/` and final metrics to `results/`
- Rollback on non-improving iterations via `git checkout -- .` with tests must pass constraint
- Optimizer loop repeats up to 10 times per agent
- Rollback path after 3 consecutive iterations with no improvement suggests a new angle within the strategy
Adoption & trust: 528 installs on skills.sh; 17.5k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
You want several agents to improve the same target in parallel but ad-hoc prompts cause leaked context, messy git history, and no shared scoreboard.
Who is it for?
Repos already using hub spawn with eval commands and metrics who want a copy-paste optimizer dispatch contract.
Skip if: Single-thread debugging without eval metrics, work without git worktrees, or teams that do not run `/hub:spawn` style orchestration.
When should I use this skill?
Dispatching `/hub:spawn --template optimizer` (or related hub templates) for performance, quality, or metric-driven parallel agent work.
What do I get? / Deliverables
Spawning with the optimizer template yields board-tracked iterations, per-improvement commits, and a final result file with best metric and approach summary.
- Per-agent progress markdown under `.agenthub/board/progress/`
- Final result summary under `.agenthub/board/results/`
- Git commits for each accepted metric improvement
Recommended Skills
Journey fit
Spans multiple journey phases - primary shelf plus alternate fits below.
Primary shelf is Build because AgentHub defines how coding agents run in isolated worktrees during product and performance work. Agent-tooling is the right facet: dispatch prompts, session spawn templates, and board progress files are orchestration for multi-agent repos.
Where it fits
Spawn four optimizers with different strategies on bundle size using the same eval command.
Run latency-focused optimizer agents before release with baseline and direction metadata.
Post iteration progress to the board while tuning conversion-related copy with a defined metric.
How it compares
Use instead of one monolithic “make it faster” chat when you need isolated agents, explicit eval loops, and board-visible progress.
Common Questions / FAQ
Who is agenthub for?
Solo builders and small teams operating multi-agent hub sessions with measurable optimization or quality targets.
When should I use agenthub?
In Build when tuning performance or quality with parallel agents; in Ship when hardening before release with eval gates; in Operate when iterating on production-adjacent metrics in a controlled loop.
Is agenthub safe to install?
Check the Security Audits panel on this page; the optimizer template runs shell eval commands and git writes—scope agents and eval scripts carefully.
SKILL.md
READMESKILL.md - Agenthub
# Agent Templates Predefined dispatch prompt templates for `/hub:spawn --template <name>`. Each template defines the iteration pattern agents follow in their worktrees. ## optimizer **Use case:** Performance optimization, latency reduction, file size reduction, memory usage, content quality, conversion rate, research thoroughness. **Dispatch prompt:** ``` You are agent-{i} in hub session {session-id}. Your optimization strategy: {strategy} Target: {task} Eval command: {eval_cmd} Metric: {metric} (direction: {direction}) Baseline: {baseline} Follow this iteration loop (repeat up to 10 times): 1. Make ONE focused change to the target file(s) following your strategy 2. Run the eval command: {eval_cmd} 3. Extract the metric: {metric} 4. If improved over your previous best → git add . && git commit -m "improvement: {description}" 5. If NOT improved → git checkout -- . 6. Post progress update to .agenthub/board/progress/agent-{i}-iter-{n}.md Include: iteration number, metric value, delta from baseline, what you tried After all iterations, post your final metric to .agenthub/board/results/agent-{i}-result.md Include: best metric achieved, total improvement from baseline, approach summary, files changed. Constraints: - Do NOT access other agents' work or results - Commit early — each improvement is a separate commit - If 3 consecutive iterations show no improvement, try a different angle within your strategy - Always leave the code in a working state (tests must pass) ``` **Strategy assignment:** The coordinator assigns each agent a different strategy. For 3 agents optimizing latency, example strategies: - Agent 1: Caching — add memoization, HTTP caching headers, query result caching - Agent 2: Algorithm optimization — reduce complexity, better data structures, eliminate redundant work - Agent 3: I/O batching — batch database queries, parallel I/O, connection pooling **Cross-domain example** (3 agents writing landing page copy): - Agent 1: Benefit-led — open with the top 3 user benefits, feature details below - Agent 2: Social proof — lead with testimonials and case study stats, then features - Agent 3: Urgency/scarcity — limited-time offer framing, countdown CTA, FOMO triggers --- ## refactorer **Use case:** Code quality improvement, tech debt reduction, module restructuring. **Dispatch prompt:** ``` You are agent-{i} in hub session {session-id}. Your refactoring approach: {strategy} Target: {task} Test command: {eval_cmd} Follow this iteration loop: 1. Identify the next refactoring opportunity following your approach 2. Make the change — keep each change small and focused 3. Run the test suite: {eval_cmd} 4. If tests pass → git add . && git commit -m "refactor: {description}" 5. If tests fail → git checkout -- . and try a different approach 6. Post progress update to .agenthub/board/progress/agent-{i}-iter-{n}.md Include: what you refactored, tests status, lines changed Continue until no more refactoring opportunities exist for your approach, or 10 iterations. Post your final summary to .agenthub/board/results/agent-{i}-result.md Include: total changes, test results, code quality improvements, files touched. Constraints: - Do NOT access other agents' work or results - Every commit must leave tests green - Preserve public API contracts — no breaking changes - Prefer smaller, well-tested changes over large rewrites ``` **Strategy assignment:** Example strategies for 3 refactoring agents: - Agent 1: Extract and simplify — break large functions into smaller ones, reduce nesting - Agent 2: Type safety — add type annotations, replace Any types, fix type errors - Agent 3: DRY — eliminate duplication, extract shared utilities, consolidate patterns **Cross-domain example** (restructuring a research report): - Agent 1: Executive summary first — lead with conclusions, supporting data below - Agent 2: Narrative flow — problem → analysis → findings → recommendations arc - Agent 3: Visual-first — diagrams and data tab