subagent-orchestration
Fungsinya
Skill ini menjelaskan kapan dan bagaimana AI sebaiknya menyerahkan pekerjaan kepada agent pembantu, seperti yang mencari di basis kode atau menyusun rencana. Ditujukan untuk siapa saja yang menggunakan agent yang mendukung pembantu ini.
Kapan dipakai
- βSaat tugas memerlukan pencarian luas di banyak berkas yang akan memenuhi percakapan utama.
- βSaat beberapa bagian riset yang independen dapat berjalan bersamaan.
- βSaat Anda ingin rencana disusun terpisah sebelum ada perubahan apa pun.
Link skill
https://github.com/PostHog/posthog/blob/master/packages/agent/packages/harness/src/extensions/orchestration/skills/subagent-orchestration/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βTelusuri seluruh proyek untuk mencari tempat penanganan login, lalu ringkas untuk saya.β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Asisten utama memberi pembantu tugas yang jelas dan mandiri. Pembantu bekerja dalam konteks terpisah dan mengirim kembali ringkasan singkat, sehingga percakapan utama hanya menyimpan yang penting.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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
Pertanyaan umum
Kapan AI sebaiknya tidak menyerahkan pekerjaan?
Untuk perubahan kecil atau pekerjaan yang bergantung pada seluruh percakapan, karena penyerahan menambah beban dengan manfaat yang kecil.
Apakah pembantu dapat mengubah berkas saya?
Pembantu hanya-baca hanya mencari atau merencanakan. Pembantu yang membuat perubahan tetap memerlukan tinjauan Anda sebelum hasilnya diterima.
Apakah pembantu mengingat percakapan kita sebelumnya?
Tidak secara otomatis. AI harus menyatakan konteks yang dibutuhkan pembantu, karena setiap pembantu dimulai dalam sesi baru yang terpisah.
Detail
Deskripsi asli dari pembuat
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
Popularitas
- Bintang GitHub
- 41k
- Peringkat
- #6823
- Lisensi
- β
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
depot-ci
41kMembantu agent Anda menyiapkan dan menjalankan alur kerja Depot CI, alternatif GitHub Actions, termasuk memigrasikan alur kerja yang ada dan membaca log eksekusi.
depot-container-builds
41kMembantu agent Anda membangun image Docker di builder jarak jauh Depot, termasuk image multi-platform, pengiriman ke registry, dan perbaikan kegagalan build.
depot-github-runners
41kMembantu agent Anda memindahkan job GitHub Actions ke runner yang dikelola Depot, memilih ukuran dan label runner, serta memecahkan masalah pengaturan runner.
editing-agents-md
41kMembantu agent Anda memutuskan apakah sebuah aturan layak masuk ke berkas AGENTS.md atau CLAUDE.md, dan menulisnya agar tetap dipatuhi tanpa membuat berkas membengkak.
Skill serupa
add-model-provider
394kMemungkinkan agent Anda menghubungkan penyedia model AI baru ke OpenClaw dengan perintah pengaturan yang aman, menjaga kunci API tetap di luar teks biasa, dan menjalankan uji langsung.
acp-router
394kMembantu agent Anda mengirim tugas ke asisten pemrograman seperti Claude Code atau Cursor lewat OpenClaw, sehingga pekerjaan dijalankan di alat tersebut.
browser-automation
394kMengajari agent Anda mengendalikan halaman web langkah demi langkah, termasuk login, tab, dan pemulihan saat halaman berhenti merespons.