sub-agent-delegation

sub-agent-delegation is a skill for Claude Code from latestaiagents/agent-skills. It costs 96 tokens per session (1,320 once invoked), scanned A, original, MIT.

A guide to delegating focused work to sub-agents, which are separate agent runs with their own context that return one result to a parent agent.

In plain words
What is it for?
Use it for parallel research, code review, security audits, or other independent tasks that benefit from isolated context.
Why use it?
It helps split independent or specialist work, run research in parallel, and keep large sub-tasks from filling the main agent's context.

Skill for Claude Code

Written for Claude Code: PostToolUse hook event. Also seen: mentions subagents.

Part of the claude-agent-sdk plugin — 5 skills shipped together , and of latestaiagents

Good fit Use it for parallel research, code review, security audits, or other independent tasks that benefit from isolated context.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/latestaiagents/agent-skills/sub-agent-delegation
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.

Any agent
npx skills add latestaiagents/agent-skills --skill sub-agent-delegation
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install claude-agent-sdk, the plugin that ships this one along with the rest of its 5 skills.

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 sub-agent-delegation

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/sub-agent-delegation/github.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/sub-agent-delegation)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/sub-agent-delegation"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/sub-agent-delegation/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for sub-agent-delegation

Your own site · 80×15
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/sub-agent-delegation"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/sub-agent-delegation.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,320 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00096 $0.01320
Opus 5 $0.00048 $0.00660
Sonnet 5 $0.00019 $0.00264
Haiku 4.5 $0.00010 $0.00132

Measured 6d ago against content hash 6f2440c359ac, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade A, and why

sub-agent-delegation 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 6d 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/claude-agent-sdk/sub-agent-delegation/SKILL.md · 151 lines

How it starts

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

Sub-Agent Delegation

Sub-agents are isolated agent invocations spawned from a parent. They run in a fresh context, do focused work, and return a single result. Use them to parallelize, specialize, and protect context.

When to Use

  • Parallel research (5 topics × 1 agent each, run concurrently)
  • Context-heavy sub-tasks that would bloat the parent's window
  • Specialist work (a "code reviewer" sub-agent, a "security auditor" sub-agent)
  • Independent work items where errors shouldn't compound

When NOT to Use

  • Trivial single-step tasks — sub-agent overhead isn't worth it
  • Tasks that need to see the parent's full context — you'll have to pass it, defeating the isolation
  • Highly interactive work — sub-agents don't ask clarifying questions back

The Model

Parent agent sees a Task (or Agent) tool. When invoked, it spawns a sub-agent with:

  • A fresh conversation (no parent history)
  • Its own tool set (may be a subset of parent's)
  • A single prompt describing the work
  • A requirement to return ONE final response

The sub-agent's intermediate tool calls are NOT visible to the parent — only the final result.

SDK Usage

import { query } from "@anthropic-ai/claude-agent-sdk";

for await (const msg of query({
  prompt: "Research and compare the top 3 vector databases. Summarize pros/cons.",
  options: {
    model: "claude-sonnet-4-6",
    allowedTools: ["Task", "WebFetch", "Read"],
  },
})) { /* ... */ }

The parent agent decides to invoke Task with a prompt like "Research Pinecone's pros and cons. Use WebFetch. Report in under 200 words." Three parallel Task calls, three independent contexts, three summaries returned.

Parallel Spawning

The parent can issue multiple tool calls in one step:

Parent: Let me research all three in parallel.
[tool_use: Task]   Research Pinecone...
[tool_use: Task]   Research Weaviate...
[tool_use: Task]   Research Qdrant...

Three sub-agents run concurrently. Parent waits for all three results, then synthesizes.

Read the full file on GitHub · 151 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. 6d ago First seen · 151 lines · 96 tokens per session scan A 6f2440c359ac

Subscribe to this mod's changes

sub-agent-delegation is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 96 tokens to every session and 1,320 once invoked, about $0.0005 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-09-03.