agenthub
Skill này làm gì
Skill này khiến nhiều agent cạnh tranh trên cùng một tác vụ, mỗi agent làm việc trên một bản sao cô lập của code bạn. Skill dành cho người muốn so sánh các cách tiếp cận và giữ lại kết quả tốt nhất.
Khi nào nên dùng
- ✓Khi bạn muốn thử nhiều cách tiếp cận khác nhau cùng lúc và giữ lại cách tốt nhất.
- ✓Khi bạn muốn tăng tốc một tác vụ bằng cách chia nó cho nhiều agent chạy song song.
- ✓Khi bạn muốn so sánh các góc tiếp cận khác nhau về sao chép hoặc nghiên cứu cạnh nhau.
Liên kết skill
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/agenthub/SKILL.mdSao 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
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Hãy thử ba cách khác nhau để tăng tốc API của chúng tôi cùng lúc, và giữ lại cách nhanh nhất.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Bộ điều phối thiết lập một phiên và khởi chạy nhiều agent trong các git worktree riêng biệt. Nó xếp hạng kết quả theo một chỉ số đo được hoặc theo một bộ đánh giá, rồi gộp kết quả thắng và lưu trữ những kết quả còn lại.
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.
AgentHub — Multi-Agent Collaboration
Spawn N parallel AI agents that compete on the same task. Each agent works in an isolated git worktree. The coordinator evaluates results and merges the winner.
Slash Commands
| Command | Description |
|---|---|
/hub-init |
Create a new collaboration session — task, agent count, eval criteria |
/agenthub:spawn |
Launch N parallel subagents in isolated worktrees |
/hub-status |
Show DAG state, agent progress, branch status |
/agenthub:eval |
Rank agent results by metric or LLM judge |
/agenthub:merge |
Merge winning branch, archive losers |
/agenthub:board |
Read/write the agent message board |
/hub-run |
One-shot lifecycle: init → baseline → spawn → eval → merge |
Agent Templates
When spawning with --template, agents follow a predefined iteration pattern:
| Template | Pattern | Use Case |
|---|---|---|
optimizer |
Edit → eval → keep/discard → repeat x10 | Performance, latency, size |
refactorer |
Restructure → test → iterate until green | Code quality, tech debt |
test-writer |
Write tests → measure coverage → repeat | Test coverage gaps |
bug-fixer |
Reproduce → diagnose → fix → verify | Bug fix approaches |
Templates are defined in references/agent-templates.md.
When This Skill Activates
Trigger phrases:
- "try multiple approaches"
- "have agents compete"
- "parallel optimization"
- "spawn N agents"
- "compare different solutions"
- "fan-out" or "tournament"
- "generate content variations"
- "compare different drafts"
- "A/B test copy"
- "explore multiple strategies"
Coordinator Protocol
The main Claude Code session is the coordinator. It follows this lifecycle:
INIT → DISPATCH → MONITOR → EVALUATE → MERGE
1. Init
Run /hub-init to create a session. This generates:
.agenthub/sessions/{session-id}/config.yaml— task config.agenthub/sessions/{session-id}/state.json— state machine.agenthub/board/— message board channels
2. Dispatch
Run /agenthub:spawn to launch agents. For each agent 1..N:
- Post task assignment to
.agenthub/board/dispatch/ - Spawn via Agent tool with
isolation: "worktree" - All agents launched in a single message (parallel)
3. Monitor
Run /hub-status to check progress:
dag_analyzer.py --status --session {id}shows branch state- Board
progress/channel has agent updates
4. Evaluate
Run /agenthub:eval to rank results:
- Metric mode: run eval command in each worktree, parse numeric result
- Judge mode: read diffs, coordinator ranks by quality
- Hybrid: metric first, LLM-judge for ties
5. Merge
Run /agenthub:merge to finalize:
git merge --no-ffwinner into base branch- Tag losers:
git tag hub/archive/{session}/agent-{i} - Clean up worktrees
- Post merge summary to board
Agent Protocol
Each subagent receives this prompt pattern:
You are agent-{i} in hub session {session-id}.
Your task: {task description}
Instructions:
1. Read your assignment at .agenthub/board/dispatch/{seq}-agent-{i}.md
2. Work in your worktree — make changes, run tests, iterate
3. Commit all changes with descriptive messages
4. Write your result summary to .agenthub/board/results/agent-{i}-result.md
5. Exit when done
Agents do NOT see each other's work. They do NOT communicate with each other. They only write to the board for the coordinator to read.
DAG Model
Branch Naming
hub/{session-id}/agent-{N}/attempt-{M}
- Session ID: timestamp-based (
YYYYMMDD-HHMMSS) - Agent N: sequential (1 to agent-count)
- Attempt M: increments on retry (usually 1)
Frontier Detection
Frontier = branch tips with no child branches. Equivalent to AgentHub's "leaves" query.
python scripts/dag_analyzer.py --frontier --session {id}
Immutability
The DAG is append-only:
- Never rebase or force-push agent branches
- Never delete commits (only branch refs after archival)
- Every approach preserved via git tags
Message Board
Location: .agenthub/board/
Channels
| Channel | Writer | Reader | Purpose |
|---|---|---|---|
dispatch/ |
Coordinator | Agents | Task assignments |
progress/ |
Agents | Coordinator | Status updates |
results/ |
Agents + Coordinator | All | Final results + merge summary |
Post Format
---
author: agent-1
timestamp: 2026-03-17T14:30:22Z
channel: results
parent: null
---
## Result Summary
-
Câu hỏi thường gặp
Các agent có làm việc trực tiếp trên code chính của tôi không?
Không. Mỗi agent làm việc trong git worktree cô lập của riêng nó, nên nhánh chính không thay đổi cho đến khi người thắng được gộp.
Người thắng được chọn như thế nào?
Theo một chỉ số đo được từ một lệnh đánh giá, hoặc bởi một LLM làm giám khảo (judge) so sánh các diff về tính đúng đắn và sự đơn giản.
Các template dùng để làm gì?
Chúng cho agent một mẫu lặp lại được cho các công việc như tối ưu tốc độ, tái cấu trúc, viết kiểm thử hoặc sửa lỗi.
Chi tiết
Mô tả gốc của tác giả
Use when a task should be attempted by several agents in parallel and the best result kept (code speed, copy variants, research angles). Spawns N agents in git worktrees, ranks results by metric or judge with result_ranker.py and merges the winner.
Độ phổ biến
- Sao GitHub
- 29k
- Vị trí xếp hạng
- #9528
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
agent-launcher-orchestrator
29kGiúp agent của bạn lên kế hoạch, xây dựng, kiểm thử và lên lịch một Claude managed agent trong tài khoản riêng, từng bước một, bắt đầu từ một mục tiêu rõ ràng.
grade-iterate
29kCho phép agent của bạn chấm kết quả một managed AI agent theo bảng tiêu chí và cải thiện qua số vòng cố định, nên không bao giờ lặp vô tận.
interview
29kCho phép agent của bạn phỏng vấn bạn về ý tưởng agent AI và biến câu trả lời thành một kế hoạch xây dựng đơn giản trước khi khởi chạy bất cứ điều gì.
run-without-you
29kGiúp agent của bạn thiết lập một managed AI agent chạy theo lịch hoặc khi có sự kiện xảy ra, với thời gian cron được kiểm tra trước khi khởi chạy.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.