Agent skill

run

One-shot lifecycle command that chains init → baseline → spawn → eval → merge in a single invocation.

Stars 8,805
Forks 1,070

Install this agent skill to your Project

npx add-skill https://github.com/alirezarezvani/claude-skills/tree/main/engineering/agenthub/skills/run

SKILL.md

/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:init with the provided arguments:

bash
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 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

Expand your agent's capabilities with these related and highly-rated skills.

alirezarezvani/claude-skills

business-growth-skills

4 business growth agent skills and plugins for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw. Customer success (health scoring, churn), sales engineer (RFP), revenue operations (pipeline, GTM), contract & proposal writer. Python tools (stdlib-only).

8,805 1,070
Explore
alirezarezvani/claude-skills

contract-and-proposal-writer

Contract & Proposal Writer

8,805 1,070
Explore
alirezarezvani/claude-skills

sales-engineer

Analyzes RFP/RFI responses for coverage gaps, builds competitive feature comparison matrices, and plans proof-of-concept (POC) engagements for pre-sales engineering. Use when responding to RFPs, bids, or proposal requests; comparing product features against competitors; planning or scoring a customer POC or sales demo; preparing a technical proposal; or performing win/loss competitor analysis. Handles tasks described as 'RFP response', 'bid response', 'proposal response', 'competitor comparison', 'feature matrix', 'POC planning', 'sales demo prep', or 'pre-sales engineering'.

8,805 1,070
Explore
alirezarezvani/claude-skills

customer-success-manager

Monitors customer health, predicts churn risk, and identifies expansion opportunities using weighted scoring models for SaaS customer success. Use when analyzing customer accounts, reviewing retention metrics, scoring at-risk customers, or when the user mentions churn, customer health scores, upsell opportunities, expansion revenue, retention analysis, or customer analytics. Runs three Python CLI tools to produce deterministic health scores, churn risk tiers, and prioritized expansion recommendations across Enterprise, Mid-Market, and SMB segments.

8,805 1,070
Explore
alirezarezvani/claude-skills

revenue-operations

Analyzes sales pipeline health, revenue forecasting accuracy, and go-to-market efficiency metrics for SaaS revenue optimization. Use when analyzing sales pipeline coverage, forecasting revenue, evaluating go-to-market performance, reviewing sales metrics, assessing pipeline analysis, tracking forecast accuracy with MAPE, calculating GTM efficiency, or measuring sales efficiency and unit economics for SaaS teams.

8,805 1,070
Explore
alirezarezvani/claude-skills

marketing-skills

42 marketing agent skills and plugins for Claude Code, Codex, Gemini CLI, Cursor, OpenClaw, and 6 more coding agents. 7 pods: content, SEO, CRO, channels, growth, intelligence, sales. Foundation context + orchestration router. 27 Python tools (stdlib-only).

8,805 1,070
Explore

Didn't find tool you were looking for?

Be as detailed as possible for better results