name: subagent-invocation description: Subagent orchestration skill for choosing, scoping, and parallelizing subagent work safely license: MIT compatibility: opencode metadata: audience: developers workflow: orchestration
Subagent Invocation Skill
Purpose
Use subagents deliberately. The goal is lower total time and higher accuracy, not more agent activity.
Do Not Use This Skill For
- trivial tasks where orchestration overhead exceeds the work itself
- overlapping write tasks that will obviously conflict
When To Invoke Subagents
Invoke a subagent when one of these is true:
- the task needs specialized investigation
- the task can be isolated into a well-scoped workstream
- the parent agent would benefit from parallel execution
- read-only exploration can happen independently from implementation
Parallel Execution Rule
Run parallel subagent sessions when the user query can be processed in parallel and the workstreams are independent.
Parallel execution is appropriate when:
- each workstream has a clear boundary
- outputs do not depend on each other in sequence
- they do not need to edit the same files
- you can merge the outcomes without conflict
Do not parallelize when:
- two workstreams touch the same files
- one workstream defines requirements for another
- validation must happen in a fixed order
- the task is small enough that orchestration overhead would dominate
Scoping Rules
Every subagent prompt should include:
- the exact objective
- the file or domain boundary
- the required output or deliverable
- any constraints, including
.env.examplehandling and git restrictions - whether the work is read-only or implementation-focused
Recommended Patterns
Read-only discovery
- Use a read-only exploration subagent for codebase search or documentation gathering.
Memory-assisted continuation
- Use
supermemoryonly when durable context across sessions or projects will materially help future work. - Do not store secrets, tokens, or transient noise.
Independent implementation streams
- Split unrelated work into separate implementation sessions.
- Merge results only after each stream has finished its own validation.
Continuation and handoff
- If a subagent session nears its context limit, request a compact summary.
- Restart with the original request plus the compact summary.
Hard Rules
- Do not parallelize by default.
- Do not create overlapping write scopes.
- Do not let subagents run
git commitorgit push. - Do not instruct subagents to read
.env; use.env.exampleinstead.
Done Criteria
- subagents were used only where they materially improved the task
- parallel sessions were conflict-free
- results were reintegrated clearly