New: Earn 20% as an AgentAlley affiliate. Share your link and earn on every sale you refer. Join now New: Earn 20% as an affiliate. Join now

One-shot lifecycle command that chains init → baseline →

/hub:run — One-Shot Lifecycle

by alirezarezvani · MIT license · ★ 26,349 on GitHub · updated Aug 30

/hub:run — One-Shot Lifecycle cover

One-shot lifecycle command that chains init → baseline → spawn → eval → merge in a single invocation. Use when the user runs /hub:run or asks to execute a full AgentHub competition end-to-end.

---
name: "run"
description: "One-shot lifecycle command that chains init → baseline → spawn → eval → merge in a single invocation. Use when the user runs /hub:run or asks to execute a full AgentHub competition end-to-end."
command: /hub:run
---

# /hub:run — One-Shot Lifecycle

Run the full AgentHub lifecycle in one command: initialize, capture baseline, spawn agents, evaluate results, and merge the winner.

## Usage

```
/hub:run --task "Reduce p50 latency" --agents 3 \
  --eval "pytest bench.py --json" --metric p50_ms --direction lower \
  --template optimizer

/hub:run --task "Refactor auth module" --agents 2 --template refactorer

Overview

Run the full AgentHub lifecycle in one command: initialize, capture baseline, spawn agents, evaluate results, and merge the winner.

Manual install (npx, ZIP)
Claude Codenpx skills add alirezarezvani/claude-skills --skill run -g -a claude-code
Claude Code (manual)mkdir -p ~/.claude/skills && curl -sL https://codeload.github.com/alirezarezvani/claude-skills/tar.gz/19392f7a0826 \ | tar -xz -C ~/.claude/skills --strip-components=4 claude-skills-19392f7a0826/engineering/agenthub/skills/run
Windows (PowerShell)New-Item -ItemType Directory -Force "$HOME\.claude\skills" | Out-Null; Invoke-WebRequest "https://m.agentalley.io/zip/f5aac94cdf1cd3ce2611/run.zip" -OutFile "$env:TEMP\run.zip"; Expand-Archive "$env:TEMP\run.zip" -DestinationPath "$HOME\.claude\skills" -Force
Claude.ai / desktopDownload the ZIP and upload it under Settings → Capabilities → Skills.
Codex, Cursor, other agentsPoint them at SKILL.md. The other files are plain text.

Connects with Agent Alley MCP · agentalley.io/mcp

Files included

  • SKILL.md3.7 KB
Read the files here
alirezarezvani/19392f71 file
Shared references3SKILL.md reads these from elsewhere in the repo. Not in the ZIP.Get them on GitHub ↗
SKILL.md
Show the full text111 lines

/hub:run — One-Shot Lifecycle

Run the full AgentHub lifecycle in one command: initialize, capture baseline, spawn agents, evaluate results, and merge the winner.

Usage

/hub:run --task "Reduce p50 latency" --agents 3 \
  --eval "pytest bench.py --json" --metric p50_ms --direction lower \
  --template optimizer

/hub:run --task "Refactor auth module" --agents 2 --template refactorer

/hub:run --task "Cover untested utils" --agents 3 \
  --eval "pytest --cov=utils --cov-report=json" --metric coverage_pct --direction higher \
  --template test-writer

/hub:run --task "Write 3 email subject lines for spring sale campaign" --agents 3 --judge

Parameters

Parameter Required Description
--task Yes Task description for agents
--agents No Number of parallel agents (default: 3)
--eval No Eval command to measure results (skip for LLM judge mode)
--metric No Metric name to extract from eval output (required if --eval given)
--direction No lower or higher — which direction is better (required if --metric given)
--template No Agent template: optimizer, refactorer, test-writer, bug-fixer

What It Does

Execute these steps sequentially:

Step 1: Initialize

Run /hub:hub-init with the provided arguments:

python {skill_path}/scripts/hub_init.py \
  --task "{task}" --agents {N} \
  [--eval "{eval_cmd}"] [--metric {metric}] [--direction {direction}]

Display the session ID to the user.

Step 2: Capture Baseline

If --eval was provided:

  1. Run the eval command in the current working directory
  2. Extract the metric value from stdout
  3. Display: Baseline captured: {metric} = {value}
  4. Append baseline: {value} to .agenthub/sessions/{session-id}/config.yaml

If no --eval was provided, skip this step.

Step 3: Spawn Agents

Run /hub:spawn with the session ID.

If --template was provided, use the template dispatch prompt from ../agenthub/references/agent-templates.md instead of the default dispatch prompt. Pass the eval command, metric, and baseline to the template variables.

Launch all agents in a single message with multiple Agent tool calls (true parallelism).

Step 4: Wait and Monitor

After spawning, inform the user that agents are running. When all agents complete (Agent tool returns results):

  1. Display a brief summary of each agent's work
  2. Proceed to evaluation
Step 5: Evaluate

Run /hub:eval with the session ID:

  • If --eval was provided: metric-based ranking with result_ranker.py
  • If no --eval: LLM judge mode (coordinator reads diffs and ranks)

If baseline was captured, pass --baseline {value} to result_ranker.py so deltas are shown.

Display the ranked results table.

Step 6: Confirm and Merge

Present the results to the user and ask for confirmation:

Agent-2 is the winner (128ms, -52ms from baseline).
Merge agent-2's branch? [Y/n]

If confirmed, run /hub:merge. If declined, inform the user they can:

  • /hub:merge --agent agent-{N} to pick a different winner
  • /hub:eval --judge to re-evaluate with LLM judge
  • Inspect branches manually

Critical Rules

  • Sequential execution — each step depends on the previous
  • Stop on failure — if any step fails, report the error and stop
  • User confirms merge — never auto-merge without asking
  • Template is optional — without --template, agents use the default dispatch prompt from /hub:spawn
1---
2name: "run"
3description: "One-shot lifecycle command that chains init → baseline → spawn → eval → merge in a single invocation. Use when the user runs /hub:run or asks to execute a full AgentHub competition end-to-end."
4command: /hub:run
5---
6 
7# /hub:run — One-Shot Lifecycle
8 
9Run the full AgentHub lifecycle in one command: initialize, capture baseline, spawn agents, evaluate results, and merge the winner.
10 
11## Usage
12 
13```
14/hub:run --task "Reduce p50 latency" --agents 3 \
15 --eval "pytest bench.py --json" --metric p50_ms --direction lower \
16 --template optimizer
17 
18/hub:run --task "Refactor auth module" --agents 2 --template refactorer
19 
20/hub:run --task "Cover untested utils" --agents 3 \
21 --eval "pytest --cov=utils --cov-report=json" --metric coverage_pct --direction higher \
22 --template test-writer
23 
24/hub:run --task "Write 3 email subject lines for spring sale campaign" --agents 3 --judge
25```
26 
27## Parameters
28 
29| Parameter | Required | Description |
30|-----------|----------|-------------|
31| `--task` | Yes | Task description for agents |
32| `--agents` | No | Number of parallel agents (default: 3) |
33| `--eval` | No | Eval command to measure results (skip for LLM judge mode) |
34| `--metric` | No | Metric name to extract from eval output (required if `--eval` given) |
35| `--direction` | No | `lower` or `higher` — which direction is better (required if `--metric` given) |
36| `--template` | No | Agent template: `optimizer`, `refactorer`, `test-writer`, `bug-fixer` |
37 
38## What It Does
39 
40Execute these steps sequentially:
41 
42### Step 1: Initialize
43 
44Run `/hub:hub-init` with the provided arguments:
45 
46```bash
47python {skill_path}/scripts/hub_init.py \
48 --task "{task}" --agents {N} \
49 [--eval "{eval_cmd}"] [--metric {metric}] [--direction {direction}]
50```
51 
52Display the session ID to the user.
53 
54### Step 2: Capture Baseline
55 
56If `--eval` was provided:
57 
581. Run the eval command in the current working directory
592. Extract the metric value from stdout
603. Display: `Baseline captured: {metric} = {value}`
614. Append `baseline: {value}` to `.agenthub/sessions/{session-id}/config.yaml`
62 
63If no `--eval` was provided, skip this step.
64 
65### Step 3: Spawn Agents
66 
67Run `/hub:spawn` with the session ID.
68 
69If `--template` was provided, use the template dispatch prompt from `../agenthub/references/agent-templates.md` instead of the default dispatch prompt. Pass the eval command, metric, and baseline to the template variables.
70 
71Launch all agents in a single message with multiple Agent tool calls (true parallelism).
72 
73### Step 4: Wait and Monitor
74 
75After spawning, inform the user that agents are running. When all agents complete (Agent tool returns results):
76 
771. Display a brief summary of each agent's work
782. Proceed to evaluation
79 
80### Step 5: Evaluate
81 
82Run `/hub:eval` with the session ID:
83 
84- If `--eval` was provided: metric-based ranking with `result_ranker.py`
85- If no `--eval`: LLM judge mode (coordinator reads diffs and ranks)
86 
87If baseline was captured, pass `--baseline {value}` to `result_ranker.py` so deltas are shown.
88 
89Display the ranked results table.
90 
91### Step 6: Confirm and Merge
92 
93Present the results to the user and ask for confirmation:
94 
95```
96Agent-2 is the winner (128ms, -52ms from baseline).
97Merge agent-2's branch? [Y/n]
98```
99 
100If confirmed, run `/hub:merge`. If declined, inform the user they can:
101- `/hub:merge --agent agent-{N}` to pick a different winner
102- `/hub:eval --judge` to re-evaluate with LLM judge
103- Inspect branches manually
104 
105## Critical Rules
106 
107- **Sequential execution** — each step depends on the previous
108- **Stop on failure** — if any step fails, report the error and stop
109- **User confirms merge** — never auto-merge without asking
110- **Template is optional** — without `--template`, agents use the default dispatch prompt from `/hub:spawn`
111 
View all files on GitHub →

Details

Updated
Aug 30, 2026
License
MIT
Stars on the repo
★ 26,349
Checked
Source
alirezarezvani/claude-skills ↗
Creator
alirezarezvani · 363 listings
View creator

Similar skills

See all →
SkillExtract text, tables, metadataXberg Document Extractionxberg-io/xberg · by xberg-ioExtract text, tables, metadata, and images from 107 document formats (PDF, Office, images, HTML, email, archives, academic) using Xberg. Use when writing code that calls Xberg APIs in Python, Node.js/TypeScript, Rust, or CLI. Covers installation, extraction (sync/async), configuration (OCR, chunking, output format), batch processing, error handling, and plugins.★ 9.4k GitHub starsSkillMove code from one implementation to another functionCode migrationkucherenko/jscpd · by kucherenkoMove code from one implementation to another function by function, tests first and code second, and check two implementations of one app for parity, with jscpd --compare as the progress measure and a coverage map binding each function to its tests. Use when porting a library or app to another language or framework (Java to Kotlin, JavaScript to Rust, a Python library to TypeScript, an iOS app to Android), when asked what is left to port, or when comparing the Android and iOS versions of an app.★ 6.3k GitHub starsSkillManages Ahrefs API usage in Python using ahrefs-pythonOpenClaudia/openclaudia-skills · by OpenClaudiaManages Ahrefs API usage in Python using `ahrefs-python` library. Use when working with SEO / marketing related tasks or with data including backlinks, keywords, domain ratings, organic traffic, site audits, rank tracking, and brand monitoring. Covers `ahrefs-python` usage including AhrefsClient / AsyncAhrefsClient, typed request/response models, error handling, and all API sections.★ 705 GitHub starsMCPDocx LLM translatoradeudealfluence/adeu · by dealfluenceDocx ↔ LLM translator. Projects .docx office files to Markdown for editing. Projects edits back to OOXML as tracked changes (redlines). Python and Node.js implementations.★ 165 GitHub starsSkillCreate an Amazon-compliant white-background main imageAmazon White-Background Main Image · 亚马逊白底主图xianyu110/ecommerce-image-skills · by xianyu110Create an Amazon-compliant white-background main image (pure #FFFFFF background, product fills ≥85% of the frame, no text, props or watermark) from a product photo with GPT Image 2.5, then verify it with a Python check script. Use for Amazon/Walmart/eBay main images, 白底图, 白底主图, hero image, listing main photo.★ 92 GitHub starsMCPOfficial monorepo of SDKs, CLISendmux sdkSendmux/sendmux-sdk · by SendmuxOfficial monorepo of SDKs, CLI, and MCP servers for Sendmux email APIs across TypeScript, Python, Go, PHP, Rust, and Ruby.★ 65 GitHub stars

More from alirezarezvani

SkillResume a paused experiment/ar:ar-resume — Resume Experimentalirezarezvani/claude-skills · by alirezarezvaniResume a paused experiment. Checkout the experiment branch, read results history, continue iterating. Use when the user runs /ar:ar-resume or asks to pick up a previously started autoresearch experiment.★ 26.3k GitHub starsSkillShow experiment dashboard with results, active loops/ar:ar-status — Experiment Dashboardalirezarezvani/claude-skills · by alirezarezvaniShow experiment dashboard with results, active loops, and progress. Use when the user runs /ar:ar-status or asks how an autoresearch experiment is going.★ 26.3k GitHub starsSkillStart an autonomous experiment loop with user-selected/ar:loop — Autonomous Experiment Loopalirezarezvani/claude-skills · by alirezarezvaniStart an autonomous experiment loop with user-selected interval (10min, 1h, daily, weekly, monthly). Uses CronCreate for scheduling. Use when the user runs /ar:loop or asks to run an autoresearch experiment continuously on a schedule.★ 26.3k GitHub starsSkillRun a single experiment iteration/ar:run — Single Experiment Iterationalirezarezvani/claude-skills · by alirezarezvaniRun a single experiment iteration. Edit the target file, evaluate, keep or discard. Use when the user runs /ar:run or asks for one manual autoresearch iteration.★ 26.3k GitHub starsSkillSet up a new autoresearch experiment interactively/ar:setup — Create New Experimentalirezarezvani/claude-skills · by alirezarezvaniSet up a new autoresearch experiment interactively. Collects domain, target file, eval command, metric, direction, and evaluator. Use when the user runs /ar:setup or asks to start optimizing a file with the autoresearch loop.★ 26.3k GitHub starsSkill/cs:boardroom <brief/cs:boardroom — Multi-Role Boardroom Deliberationalirezarezvani/claude-skills · by alirezarezvani/cs:boardroom <brief> — 6-phase multi-role deliberation across the C-suite with Phase 2 isolation, critic pre-screen, and synthesis. Outputs a board memo. Use when a decision spans multiple executive domains — e.g. a pricing change touching finance, positioning, and product, or a raise-vs-cut runway call.★ 26.3k GitHub stars