/hub:hub-init — Create New Session

Create a new AgentHub collaboration session with task, agent count, and evaluation criteria.

How to use it

Claude Code
  1. Run the line below. It pulls the whole folder into ~/.claude/skills/hub-init, including the files SKILL.md points to.
  2. Describe your job in plain words. Claude Code follows the skill from there.
Claude Code — installs the whole folder, not just SKILL.md
npx degit alirezarezvani/claude-skills/engineering/agenthub/skills/hub-init#main ~/.claude/skills/hub-init

For one project only, change the path to .claude/skills/hub-init. This skill also uses bench.py, result_ranker.py — copying SKILL.md alone won't be enough. See the folder on GitHub.

Claude (web or desktop app)
  1. On this page open ⋯ → Download .md.
  2. Save it as SKILL.md in a folder, zip the folder, then Customize → Skills → + → Create skill → Upload a skill.
  3. Pick the file and Save. Claude shows the name and description and runs a security scan.
  4. Check the skill is switched on.
  5. Start a new chat and describe your job in plain words. The AI follows the skill from there.
ChatGPT or another app
  1. ChatGPT: make a Project and paste it into Instructions.
  2. Neither? Paste it at the top of a new chat — it works for that chat.
Not working?
  • Check which app you pasted it into — the steps above name the right one.
  • Some skills need the paid tier of Claude or ChatGPT.
Step-by-step guide with screenshots · Ask in the forum

Paste into Claude, ChatGPT or Cursor.

Source of /hub:hub-init — Create New Session

Show the full text90 lines
namedescriptioncommand
hub-initCreate 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./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:

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
1---
2name: "hub-init"
3description: "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."
4command: /hub:hub-init
5---
6 
7# /hub:hub-init — Create New Session
8 
9Initialize an AgentHub collaboration session. Creates the `.agenthub/` directory structure, generates a session ID, and configures evaluation criteria.
10 
11## Usage
12 
13```
14/hub:hub-init # Interactive mode
15/hub:hub-init --task "Optimize API" --agents 3 --eval "pytest bench.py" --metric p50_ms --direction lower
16/hub:hub-init --task "Refactor auth" --agents 2 # No eval (LLM judge mode)
17```
18 
19## What It Does
20 
21### If arguments provided
22 
23Pass them to the init script:
24 
25```bash
26python {skill_path}/scripts/hub_init.py \
27 --task "{task}" --agents {N} \
28 [--eval "{eval_cmd}"] [--metric {metric}] [--direction {direction}] \
29 [--base-branch {branch}]
30```
31 
32### If no arguments (interactive mode)
33 
34Collect each parameter:
35 
361. **Task** — What should the agents do? (required)
372. **Agent count** — How many parallel agents? (default: 3)
383. **Eval command** — Command to measure results (optional — skip for LLM judge mode)
394. **Metric name** — What metric to extract from eval output (required if eval command given)
405. **Direction** — Is lower or higher better? (required if metric given)
416. **Base branch** — Branch to fork from (default: current branch)
42 
43### Output
44 
45```
46AgentHub session initialized
47 Session ID: 20260317-143022
48 Task: Optimize API response time below 100ms
49 Agents: 3
50 Eval: pytest bench.py --json
51 Metric: p50_ms (lower is better)
52 Base branch: dev
53 State: init
54 
55Next step: Run /hub:spawn to launch 3 agents
56```
57 
58For content or research tasks (no eval command → LLM judge mode):
59 
60```
61AgentHub session initialized
62 Session ID: 20260317-151200
63 Task: Draft 3 competing taglines for product launch
64 Agents: 3
65 Eval: LLM judge (no eval command)
66 Base branch: dev
67 State: init
68 
69Next step: Run /hub:spawn to launch 3 agents
70```
71 
72## Baseline Capture
73 
74If `--eval` was provided, capture a baseline measurement after session creation:
75 
761. Run the eval command in the current working directory
772. Extract the metric value from stdout
783. Append `baseline: {value}` to `.agenthub/sessions/{session-id}/config.yaml`
794. Display: `Baseline captured: {metric} = {value}`
80 
81This 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.
82 
83## After Init
84 
85Tell the user:
86- Session created with ID `{session-id}`
87- Baseline metric (if captured)
88- Next step: `/hub:spawn` to launch agents
89- Or `/hub:spawn {session-id}` if multiple sessions exist
90 

Discussion