subagent-invocation

star 4

Subagent orchestration skill for choosing, scoping, and parallelizing subagent work safely

Sujan-6905 By Sujan-6905 schedule Updated 3/7/2026

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:

  1. each workstream has a clear boundary
  2. outputs do not depend on each other in sequence
  3. they do not need to edit the same files
  4. 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:

  1. the exact objective
  2. the file or domain boundary
  3. the required output or deliverable
  4. any constraints, including .env.example handling and git restrictions
  5. 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 supermemory only 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 commit or git push.
  • Do not instruct subagents to read .env; use .env.example instead.

Done Criteria

  • subagents were used only where they materially improved the task
  • parallel sessions were conflict-free
  • results were reintegrated clearly
Install via CLI
npx skills add https://github.com/Sujan-6905/opencode-global-configs --skill subagent-invocation
Repository Details
star Stars 4
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator