subagent-patterns

subagent-patterns is a skill for Claude Code, Codex from VersoXBT/claude-initial-setup. It costs 51 tokens per session (1,267 once invoked), scanned A, original, MIT.

A guide to using independent helper agents for focused exploration, research, or parallel investigation.

In plain words
What is it for?
Use helper agents to explore an unfamiliar codebase, research a difficult area, or investigate multiple independent questions. It also explains when a direct file search is sufficient.
Why use it?
Delegating large or separate investigations keeps the main working context smaller and lets several lines of inquiry proceed at once.

Skill for Claude CodeCodex

Part of the claude-initial-setup plugin — 24 skills, 15 commands, 14 agents, 2 hooks shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/versoxbt/claude-initial-setup/subagent-patterns
Any agent
npx skills add VersoXBT/claude-initial-setup --skill subagent-patterns
Clone the repo
git clone --depth 1 https://github.com/VersoXBT/claude-initial-setup

Made for: Claude Code, Codex.

Or install claude-initial-setup, the plugin that ships this one along with the rest of its 24 skills, 15 commands, 14 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for subagent-patterns

README.md
[![agentmods](https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/subagent-patterns.svg)](https://agentmods.dev/skills/versoxbt/claude-initial-setup/subagent-patterns)
Your own site
<a href="https://agentmods.dev/skills/versoxbt/claude-initial-setup/subagent-patterns"><img src="https://agentmods.dev/badge/skills/versoxbt/claude-initial-setup/subagent-patterns.svg" alt="Measured on agentmods" height="20"></a>
Per session 51 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,267 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00051 $0.01267
Opus 5 $0.00026 $0.00633
Sonnet 5 $0.00010 $0.00253
Haiku 4.5 $0.00005 $0.00127

Measured 4d ago against content hash b9e74174e879, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

subagent-patterns scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/agent-orchestration/subagent-patterns/SKILL.md · 160 lines

How it starts

The opening of the file, as written. The whole thing — 160 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Subagent Patterns

Subagents are independent Claude instances launched via the Agent tool. They run in isolation, protecting the main context window from excessive results while enabling parallel work.

When to Use

  • User needs deep research into a codebase area without polluting main context
  • Multiple independent investigations can run in parallel
  • User asks about the Agent tool or subagent types
  • Task requires exploring unfamiliar code before making changes
  • User wants to delegate a subtask to a focused agent

Core Patterns

When to Use Subagents vs Direct Tools

Use subagents when:

  • The search may require multiple rounds of exploration (3+ queries)
  • Results would be too large for the main context
  • Multiple independent tasks can run in parallel
  • You need focused analysis that should not clutter the conversation

Use direct tools (Glob, Grep, Read) when:

  • You know exactly what file or function to find
  • A single search query will suffice
  • The result is small and immediately actionable

Subagent Types

Explore — For broad codebase exploration and deep research:

Agent tool call:
  subagent_type: "Explore"
  prompt: "Find all authentication middleware in this project.
           Identify where JWT tokens are validated, what claims
           are checked, and how unauthorized requests are handled.
           Report file paths and key function signatures."

Use Explore when you need to understand how a system works before modifying it.

Plan — For generating structured implementation plans:

Agent tool call:
  subagent_type: "Plan"
  prompt: "Create a plan for adding rate limiting to all API endpoints.
           Consider existing middleware, database requirements,
           and configuration needs. Output a step-by-step plan
           with file paths and code changes needed."

General-purpose (default) — For executing focused subtasks:

Agent tool call:
  prompt: "Read the file src/utils/validation.ts and extract
           all exported function signatures with their parameter
           types and return types. Format as a markdown table."

Read the full file on GitHub · 160 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 160 lines · 51 tokens per session scan A b9e74174e879

Subscribe to this mod's changes

subagent-patterns is a skill published in the GitHub repository VersoXBT/claude-initial-setup (4 stars, last pushed 3mo ago), licensed MIT. It adds 51 tokens to every session and 1,267 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

cao-memory

Store, recall, and forget durable facts with CAO memory — user preferences, project conventions, decisions, and corrections that should persist across sessions and agents. Use proactively to check memory before asking the user, and to save anything worth remembering. Distinct from any provider-native memory.

awslabs/cli-agent-orchestrator · 59 tokens

cao-learning

Report task outcomes and distill lessons so the team improves across runs — reportoutcome after each unit of work, retrospector handoffs at natural boundaries, and applying injected lessons. Use in workflows that run repeatedly over similar work items. Requires memory.learningenabled; degrade silently when the tools…

awslabs/cli-agent-orchestrator · 63 tokens

session-trends

Analyze trends across session metrics. Computes windowed aggregates, deltas, and compares against MEMORY.md findings. Use periodically for progress tracking.

oliver-kriska/claude-elixir-phoenix · 31 tokens

assigns-audit

Inspect LiveView socket assigns for memory bloat — missing temporaryassigns, unused assigns, unbounded lists needing streams, memory estimates. Use when LiveView memory grows or you need to add temporaryassigns.

oliver-kriska/claude-elixir-phoenix · 47 tokens

vc-context-discovery

Discover and load all relevant context for the current task. Lists feature group nested files with full paths, loads process/context/ files by domain routing. Called at the start of every agent session.

withkynam/vibecode-pro-max-kit · 43 tokens

vc-generate-context

Generate or update the project's authoritative repository context at process/context/all-context.md. Use when repo context is missing, stale, or contradicted by code.

withkynam/vibecode-pro-max-kit · 35 tokens