Skip to main content
skill

hub-init — Claude Code skill: what it does, how to install

This skill creates an AgentHub session for parallel agents and defines how their results are judged. Use it when one task needs competing agent runs.

Install into Claude Code · Plugin marketplace All methods and platforms ↓
/plugin marketplace add alirezarezvani/claude-skills
/plugin install agenthub@claude-code-skills
Open on GitHub

What hub-init does

hub-init creates the .agenthub/ directory structure, generates a session ID, and stores the setup for an AgentHub collaboration session. The task is required. You can set the agent count, base branch, evaluation command, metric name, and whether higher or lower values win.

When --eval is present, the skill runs that command in the current working directory, reads the metric from stdout, and writes a baseline to .agenthub/sessions/{session-id}/config.yaml. A failed baseline command only produces a warning, so session creation continues. Without --eval, the session uses LLM judge mode.

You can answer the setup questions interactively or run python {skill_path}/scripts/hub_init.py with the session options. After initialization, the skill points to /hub:spawn; pass the session ID there when several sessions exist.

What it helps with

  • create a session for parallel agents
  • set how many agents run on a task
  • store measurable evaluation criteria
  • capture a baseline before agent execution
  • compare content without an evaluation command

Example prompts for the agent

  • Run /hub:hub-init and create a session for an authentication refactor.
  • Initialize a session for API optimization with 3 agents, pytest bench.py as the evaluation command, p50_ms as the metric, and lower as the better direction.
  • Create a session without --eval so an LLM judge can compare the results.

How to install hub-init

1Plugin marketplace

/plugin marketplace add alirezarezvani/claude-skills
/plugin install agenthub@claude-code-skills

This installs the whole agenthub plugin with all its skills

2Skills CLI (Vercel)

npx skills add alirezarezvani/claude-skills --skill hub-init -a claude-code

3Manually: put the files in place

~/.claude/skills/hub-init/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/hub-init/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about hub-init

How do I install hub-init in Claude Code?

Add the marketplace with /plugin marketplace add alirezarezvani/claude-skills, then install the plugin with /plugin install agenthub@claude-code-skills.

What does hub-init do?

It creates an AgentHub session, the .agenthub/ structure, and the configuration used for parallel agents. With --eval, it also records the metric baseline.

Can hub-init work without an evaluation command?

Yes. Omitting --eval selects LLM judge mode. Supplying it makes the skill run the command and extract a baseline metric in the current working directory.

Source text

SKILL.md · MIT
---
name: "hub-init"
description: "Create a new AgentHub collaboration session with task, agent count, and evaluation criteria. Use when the user runs /hub:hub-init or asks to start a multi-agent competition on a task."
metadata:
  command: /hub:hub-init
---

# /hub:hub-init — Create New Session

Initialize an AgentHub collaboration session. Creates the `.agenthub/` directory structure, generates a session ID, and configures evaluation criteria.

## Usage

```
/hub:hub-init                                                    # Interactive mode
/hub:hub-init --task "Optimize API" --agents 3 --eval "pytest bench.py" --metric p50_ms --direction lower
/hub:hub-init --task "Refactor auth" --agents 2                  # No eval (LLM judge mode)
```

## What It Does

### If arguments provided

Pass them to the init script:

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

### If no arguments (interactive mode)

Collect each parameter:

1. **Task** — What should the agents do? (required)
2. **Agent count** — How many parallel agents? (default: 3)
3. **Eval command** — Command to measure results (optional — skip for LLM judge mode)
4. **Metric name** — What metric to extract from eval output (required if eval command given)
5. **Direction** — Is lower or higher better? (required if metric given)
6. **Base branch** — Branch to fork from (default: current branch)

### Output

```
AgentHub session initialized
  Session ID: 20260317-143022
  Task: Optimize API response time below 100ms
  Agents: 3
  Eval: pytest bench.py --json
  Metric: p50_ms (lower is better)
  Base branch: dev
  State: init

Next step: Run /hub:spawn to launch 3 agents
```

For content or research tasks (no eval command → LLM judge mode):

```
AgentHub session initialized
  Session ID: 20260317-151200
  Task: Draft 3 competing taglines for product launch
  Agents: 3
  Eval: LLM judge (no eval command)
  Base branch: dev
  State: init

Next step: Run /hub:spawn to launch 3 agents
```

## Baseline Capture

If `--eval` was provided, capture a baseline measurement after session creation:

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

This baseline is used by `result_ranker.py --baseline` during evaluation to show deltas. If the eval command fails at this stage, warn the user but continue — baseline is optional.

## After Init

Tell the user:
- Session created with ID `{session-id}`
- Baseline metric (if captured)
- Next step: `/hub:spawn` to launch agents
- Or `/hub:spawn {session-id}` if multiple sessions exist

© Alireza Rezvani · MIT · alirezarezvani/claude-skills

Similar skills

All skills for Agent setup: memory, context, orchestration →

From the same set476

The whole set →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor