Chuyển đến nội dung
Skillpedia
Agent29k · #9532

hub-run

Skill này làm gì

Skill này chạy toàn bộ quy trình nhiều agent trong một lần. Skill dành cho những ai muốn nhiều agent thử một nhiệm vụ và kết quả tốt nhất được gộp tự động.

Khi nào nên dùng

  • ✓Khi bạn muốn chạy trọn một cuộc thi mà không phải đi qua từng bước.
  • ✓Khi bạn muốn một nhiệm vụ nhiều agent hoàn thành với ít thiết lập thủ công hơn.
  • ✓Khi bạn cần một quy trình cố định từ đầu đến khi gộp cho một nhiệm vụ đo được.

Liên kết skill

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

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/hub-run/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Giảm độ trễ p50 của chúng tôi với ba agent, dùng mẫu optimizer, và gộp agent nhanh nhất.”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent khởi tạo phiên, ghi lại đường cơ sở, khởi chạy các agent, đánh giá kết quả và gộp người thắng. Nó nhận nhiệm vụ, số lượng agent, lệnh đánh giá, chỉ số, hướng và mẫu làm đầu vào.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

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

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 /agenthub:spawn with the session ID.

If --template was provided, use the template dispatch prompt from ../agenthub/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 /agenthub: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 /agenthub:merge. If declined, inform the user they can:

  • /agenthub:merge --agent agent-{N} to pick a different winner
  • /agenthub: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 /agenthub:spawn
Câu hỏi thường gặp

Có những mẫu nào?

Optimizer, refactorer, test writer và bug fixer, mỗi mẫu có cách làm việc riêng.

Có cần lệnh đánh giá không?

Không. Nếu không có, nó dùng chế độ giám khảo LLM để so sánh kết quả.

Với nhiệm vụ đo được, tôi cần cung cấp gì?

Tên chỉ số và việc giá trị thấp hơn hay cao hơn là tốt hơn.

Chi tiết

Mô tả gốc của tác giả

Use for /hub-run, or to run a whole AgentHub competition end to end: init, baseline, spawn, eval and merge.

repo: alirezarezvani/claude-skills

Độ phổ biến

Sao GitHub
29k
Vị trí xếp hạng
#9532
Giấy phép
MIT
Cập nhật
2/11/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự