agenthub
ما الذي تفعله
تجعل هذه المهارة عدة وكلاء يتنافسون على مهمة واحدة، كل واحد يعمل في نسخة معزولة من كودك. وهي موجهة لمن يريد مقارنة الأساليب والاحتفاظ بأفضلها.
متى تستخدمها
- ✓عندما تريد تجربة عدة طرق مختلفة في الوقت نفسه والاحتفاظ بأفضلها.
- ✓عندما تريد تسريع مهمة بتقسيمها على وكلاء يعملون بالتوازي.
- ✓عندما تريد مقارنة زوايا مختلفة للنسخ أو البحث جنبًا إلى جنب.
رابط المهارة
https://github.com/alirezarezvani/claude-skills/blob/main/engineering/agenthub/skills/agenthub/SKILL.mdانسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.
طريقة الاستخدام
أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.
رسالة جاهزة للصق
لـ Claude Code أو Codex أو Cursor: شغّله داخل مجلد مشروعك وستُثبَّت المهارة.
نزّل ملف SKILL.md وضعه في مجلد مهارات وكيلك.
مثال على ما تطلبه من الذكاء الاصطناعي
“جرّب ثلاث طرق مختلفة لتسريع واجهة API لدينا في الوقت نفسه، واحتفظ بأسرعها.”
5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.
كيف تعمل
ينشئ المنسق جلسة ويطلق عدة وكلاء في أشجار عمل git منفصلة. ويرتب نتائجهم بمقياس مقاس أو بحكم قاضٍ، ثم يدمج الفائز ويؤرشف الباقي.
المحتوى التقني (ملف SKILL.md الأصلي)
النص الأصلي من المؤلف، مباشرة من GitHub.
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
-
الأسئلة الشائعة
هل يعمل الوكلاء على كودي الرئيسي مباشرة؟
لا. يعمل كل وكيل في شجرة عمل git معزولة، فلا يتغير الفرع الرئيسي حتى يُدمج الفائز.
كيف يُختار الفائز؟
بمقياس مقاس من أمر تقييم، أو بقاضٍ من نموذج لغوي يقارن الفروق في الصحة والبساطة.
ما القوالب؟
تعطي الوكلاء نمطًا قابلًا للتكرار لمهام مثل تحسين السرعة وإعادة الهيكلة وكتابة الاختبارات وإصلاح الأخطاء.
التفاصيل
الوصف الأصلي من المؤلف
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.
الشعبية
- نجوم GitHub
- 29k
- الترتيب
- #9528
- الترخيص
- MIT
- آخر تحديث
- 2/11/2026
التعليقات
- …
المزيد من المهارات من هذا المستودع
agent-launcher-orchestrator
29kيساعد وكيلك على تخطيط وبناء واختبار وجدولة وكيل Claude مُدار في حسابك الخاص، خطوة بخطوة، انطلاقًا من هدف واضح واحد.
grade-iterate
29kيتيح لوكيلك تقييم عمل وكيل ذكاء اصطناعي مُدار وفق معيار تقييم، وتحسينه في عدد ثابت من الجولات، حتى لا يدور في حلقة لا نهاية لها.
interview
29kيتيح لوكيلك أن يجري معك مقابلة حول فكرة وكيل ذكاء اصطناعي، ثم يحوّل إجاباتك إلى خطة بناء بسيطة قبل إطلاق أي شيء.
run-without-you
29kيساعد وكيلك على إعداد وكيل Claude مُدار ليعمل وفق جدول زمني أو عند حدوث حدث، مع فحص توقيت التشغيل قبل الإطلاق.
مهارات مشابهة
add-model-provider
394kتتيح لوكيلك ربط مزوّد نموذج ذكاء اصطناعي جديد بـ OpenClaw باستخدام أوامر إعداد آمنة، وإبقاء مفاتيح API خارج النص العادي، وإجراء اختبار حي.
acp-router
394kيساعد وكيلك على إرسال مهمة إلى مساعد برمجة مثل Claude Code أو Cursor عبر OpenClaw، فيعمل العمل داخل تلك الأداة.
browser-automation
394kتعلّم وكيلك التحكم في صفحات الويب خطوة بخطوة، بما في ذلك تسجيل الدخول والتبويبات والتعافي عندما تتوقف الصفحة عن الاستجابة.