subagent-orchestration
यह क्या करती है
यह स्किल बताती है कि AI को सहायक एजेंटों, जैसे कोडबेस खोजने या योजना लिखने वाले एजेंटों, को काम कब और कैसे सौंपना चाहिए। यह उन लोगों के लिए है जो ऐसे सहायक सपोर्ट करने वाला एजेंट इस्तेमाल करते हैं।
कब इस्तेमाल करें
- ✓जब किसी काम के लिए कई फ़ाइलों में व्यापक खोज चाहिए, जिससे मुख्य बातचीत भर जाएगी।
- ✓जब कई स्वतंत्र रिसर्च एक साथ चल सकें।
- ✓जब आप कोई बदलाव करने से पहले योजना अलग से लिखवाना चाहें।
Skill का लिंक
https://github.com/PostHog/posthog/blob/master/packages/agent/packages/harness/src/extensions/orchestration/skills/subagent-orchestration/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“पूरे प्रोजेक्ट में देखिए कि लॉगिन कहाँ संभाला जाता है, और मुझे उसका सारांश दीजिए।”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
मुख्य सहायक किसी सहायक एजेंट को एक साफ़, स्वतंत्र काम देता है। सहायक अपने अलग संदर्भ में काम करता है और छोटा सारांश लौटाता है, ताकि मुख्य बातचीत में केवल काम की बातें रहें।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।
Subagent Orchestration
You (the parent session) can delegate scoped work to focused subagents, each running in its own isolated Pi session with its own context window. Use this to keep your own context clean and to parallelize independent work.
When to delegate
Delegate when a piece of work is:
- Self-contained: it doesn't need your full conversation history, just a task and some context you can state explicitly.
- Isolable: it would otherwise burn a lot of your context window (e.g. broad codebase search, reading many files) for a result you can summarize down to a few paragraphs.
- Parallelizable: several independent instances of it can run at once (e.g. exploring two unrelated areas of a large codebase in the same turn).
Do not delegate trivial one-line changes, or work that fundamentally needs your full
conversation context to do correctly — that's what context (below) is for, but if
almost everything is relevant, delegation adds overhead for no benefit.
Bundled agents
| Agent | Use for | Tools | Model | Notes |
|---|---|---|---|---|
Explore |
Focused, read-only recon: find files, entry points, data flow | read, bash, grep, find, ls | Sol, falls back to your current model | Reports compressed findings, never edits |
Plan |
Turn Explore's findings (or your own) into a concrete implementation plan | read, bash, grep, find, ls | Inherits your current model | Never edits |
General |
Actual implementation: make the code changes an Explore/Plan investigation identified, or any task that needs real edits | read, bash, edit, write, grep, find, ls | Inherits your current model | Same read-write capability as you have; makes real changes |
Explore and Plan are read-only. General has the same read-write capability you do —
reach for it when a change is mechanical/independent enough to delegate (especially
several at once via parallel mode) rather than doing every edit yourself in sequence.
For a small, one-off change, just make it directly instead of delegating.
Subagents cannot themselves call subagent — they are leaves, not orchestrators. Keep
all delegation decisions in your own (parent) session.
For larger fan-out orchestration — many agents, loops over file lists, staged
map/verify/synthesize flows — prefer the workflow tool (if available), which runs a
JavaScript script coordinating these same read-only agents and returns one synthesized
result. subagent is for one-off or small parallel delegations.
A project can add its own agents (including ones that write) as .pi/agents/<name>.md
files — same frontmatter convention as the bundled agents above. See agentScope below.
The context field — always fill it in
A subagent gets only its task string, plus a small automatic digest of your last
few conversation turns (as a fallback, not a substitute). It does not see the files
you've already read, tool results you've already seen, or decisions you've already made
unless you put them in context.
Always pass context with whatever the subagent actually needs:
- File paths and line numbers you already found.
- Decisions already made ("use approach B, not A, because...").
- Constraints ("don't touch files under vendor/").
A subagent given a bare one-line task and no context will waste its own turns
re-discovering things you already know.
Modes
- single — one agent, one task. Default choice.
- parallel —
tasks: [...], up to 4 concurrent tasks. Use for independent work that can run at once, e.g.Exploreing two unrelated parts of a codebase together.
For every subagent, supply a brief description with 2 to 5 words. It states the purpose
shown in the tool call. Keep the full instructions in task.
single: { agent: "Explore", task: "Find where authentication starts.", description: "Finding auth entrypoint" }
parallel: { tasks: [
{ agent: "Explore", task: "Find authentication entrypoints.", description: "Finding auth entrypoints" },
{ agent: "Explore", task: "Find session persistence code.", description: "Finding session storage" }
] }
For parallel work, put every agent in tasks. Do not use top-level agent or task.
There is no chain mode. For a fixed pipeline (e.g. explore then plan), just call
subagent twice in sequence yourself and pass the first call's output back in as the
second call's context — you are already the orchestrator holding both results.
Recommended patter
अक्सर पूछे जाने वाले सवाल
AI को काम कब नहीं सौंपना चाहिए?
छोटे बदलावों के लिए, या ऐसे काम के लिए जो पूरी बातचीत पर निर्भर हो, क्योंकि सौंपने में थोड़ा अतिरिक्त खर्च होता है और फ़ायदा कम।
क्या सहायक मेरी फ़ाइलें बदल सकते हैं?
केवल-पढ़ने वाले सहायक केवल खोजते या योजना बनाते हैं। जो सहायक बदलाव करते हैं, उनके नतीजे स्वीकार करने से पहले आपकी समीक्षा ज़रूरी है।
क्या सहायक हमारी पिछली बातचीत याद रखते हैं?
अपने-आप नहीं। AI को वह संदर्भ साफ़ बताना होता है जो सहायक को चाहिए, क्योंकि हर सहायक नए, अलग सेशन में शुरू होता है।
जानकारी
लेखक का मूल विवरण
How and when to delegate work to subagents via the `subagent` tool (Explore, Plan, General). Use when a task involves codebase recon, implementation planning, or actual code changes that would benefit from an isolated context window instead of doing it all inline.
repo: PostHog/posthog
लोकप्रियता
- GitHub स्टार
- 41k
- रैंकिंग में स्थान
- #6823
- लाइसेंस
- —
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
depot-ci
41kयह आपके एजेंट को Depot CI वर्कफ़्लो सेट अप करने, चलाने और माइग्रेट करने में मदद करती है, साथ ही रन के लॉग पढ़ने में।
depot-container-builds
41kयह आपके एजेंट को Depot के रिमोट बिल्डर पर Docker इमेज बनाने में मदद करती है, जिसमें मल्टी-प्लेटफ़ॉर्म इमेज और बिल्ड सुधार शामिल हैं।
depot-github-runners
41kयह आपके एजेंट को GitHub Actions जॉब Depot के मैनेज्ड रनर पर ले जाने, रनर का साइज़ और लेबल चुनने, और रनर सेटअप की समस्याएँ ठीक करने में मदद करती है।
editing-agents-md
41kयह आपके एजेंट को तय करने में मदद करती है कि कोई नियम AGENTS.md या CLAUDE.md में जाए या नहीं, और उसे ऐसे लिखे कि फ़ाइल भारी न हो।
मिलती-जुलती skills
add-model-provider
394kयह आपके एजेंट को सुरक्षित कमांड से OpenClaw में नया AI मॉडल प्रोवाइडर जोड़ने, API कीज़ को सादे टेक्स्ट से बचाने और लाइव टेस्ट चलाने देती है।
acp-router
394kयह आपके एजेंट को OpenClaw के ज़रिए Claude Code या Cursor जैसे कोडिंग असिस्टेंट को काम भेजने देती है, ताकि काम उसी टूल में चले।
browser-automation
394kयह आपके एजेंट को लॉगिन, टैब और अटकी वेब पेज से उबरने समेत, वेबसाइट पर चरण-दर-चरण काम करना सिखाती है।