跳到正文
Skillpedia
智能体29k · #9531

hub-init

它能做什么

这项技能设置一个新会话,让多个智能体尝试同一任务。适合希望以清晰规则开始并行智能体竞赛的人。

适用场景

  • ✓当你想开始多个智能体之间的新竞赛的时候。
  • ✓当你有一项任务,并想决定让多少智能体去尝试的时候。
  • ✓当你想在智能体开始工作之前确定结果如何评判的时候。

技能链接

https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/hub-init/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/hub-init/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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:

  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 /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:

  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: /agenthub:spawn to 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.

repo: alirezarezvani/claude-skills

热度

GitHub 星标
29k
排名
#9531
许可证
MIT
更新时间
2026/11/2

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能