hub-init
它能做什么
这项技能设置一个新会话,让多个智能体尝试同一任务。适合希望以清晰规则开始并行智能体竞赛的人。
适用场景
- ✓当你想开始多个智能体之间的新竞赛的时候。
- ✓当你有一项任务,并想决定让多少智能体去尝试的时候。
- ✓当你想在智能体开始工作之前确定结果如何评判的时候。
技能链接
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/hub-init/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请启动一个 AgentHub 会话,用两个智能体重构我们的认证模块,不设指标,由 LLM 评委选出获胜者。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会创建会话文件夹,生成会话 ID,并保存任务、智能体数量和评估设置。如果你没有提供细节,它会依次询问每一项。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
/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-init # Interactive mode
/hub-init --task "Optimize API" --agents 3 --eval "pytest bench.py" --metric p50_ms --direction lower
/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:
- Task — What should the agents do? (required)
- Agent count — How many parallel agents? (default: 3)
- Eval command — Command to measure results (optional — skip for LLM judge mode)
- Metric name — What metric to extract from eval output (required if eval command given)
- Direction — Is lower or higher better? (required if metric given)
- 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 /agenthub: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 /agenthub:spawn to launch 3 agents
Baseline Capture
If --eval was provided, capture a baseline measurement after session creation:
- Run the eval command in the current working directory
- Extract the metric value from stdout
- Append
baseline: {value}to.agenthub/sessions/{session-id}/config.yaml - 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:
/agenthub:spawnto launch agents - Or
/agenthub:spawn {session-id}if multiple sessions exist
常见问题
如果我没有评测命令怎么办?
你可以跳过,会话将使用 LLM 评委模式选出获胜者。
默认的智能体数量是多少?
三个,除非你选择其他数量。
它使用哪个基础分支?
当前分支,除非你选择另一个。
详情
作者的原始描述
Use for /hub-init, or to start an AgentHub competition: task, agent count and evaluation criteria.
热度
- GitHub 星标
- 29k
- 排名
- #9531
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
agent-launcher-orchestrator
29k帮你的智能体从一个清晰的目标出发,逐步规划、构建、测试并定时运行你自己账户中的 Claude 托管智能体。
grade-iterate
29k让你的智能体按评分标准为托管 AI 智能体的工作打分,并在固定的轮次内改进,因此它永远不会无限循环。
interview
29k让你的智能体就一个 AI 智能体的想法对你进行访谈,并在任何上线之前,把你的回答整理成一份简单的构建计划。
run-without-you
29k帮你的智能体设置托管 AI 智能体,使其按计划或在某个事件发生时运行,并在启动前检查定时设置。