subagent-orchestration
하는 일
이 스킬은 AI가 코드베이스를 검색하거나 계획 초안을 쓰는 것 같은 도우미 에이전트에게 언제, 어떻게 작업을 넘겨야 하는지 설명합니다. 도우미를 지원하는 에이전트를 쓰는 사람을 위한 것입니다.
사용하는 경우
- ✓많은 파일을 넓게 검색해야 해서 주 대화가 가득 찰 것 같은 작업일 때.
- ✓독립적인 여러 조사를 동시에 진행할 수 있을 때.
- ✓변경을 하기 전에 계획을 따로 작성하고 싶을 때.
스킬 링크
https://github.com/PostHog/posthog/blob/master/packages/agent/packages/harness/src/extensions/orchestration/skills/subagent-orchestration/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“프로젝트 전체에서 로그인을 처리하는 곳을 찾아 요약해 주세요.”
매주 새 스킬 5개. 읽는 데 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
- 라이선스
- —
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
depot-ci
41k에이전트가 GitHub Actions 대안인 Depot CI 워크플로를 설정하고 실행하도록 돕습니다. 기존 워크플로 이전과 실행 로그 읽기를 포함합니다.
depot-container-builds
41k에이전트가 Depot 원격 빌더에서 Docker 이미지를 빌드하도록 돕습니다. 다중 플랫폼 이미지, 레지스트리 푸시, 빌드 실패 수정을 포함합니다.
depot-github-runners
41k에이전트가 GitHub Actions 작업을 Depot 관리형 러너로 옮기고, 러너 크기와 라벨을 고르도록 돕습니다.
editing-agents-md
41k에이전트가 규칙을 AGENTS.md나 CLAUDE.md 중 어디에 둘지 정하고, 파일을 키우지 않으면서 잘 지켜지도록 쓰게 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.