There's a specific moment when an AI coding session goes sideways. You ask for one feature, the agent greps forty files, dumps three test runs and a stack trace into the conversation, and now every subsequent turn is reasoning over a transcript that's 80% noise you'll never read again. The model didn't get dumber. Its working memory got polluted.
Two features in modern agentic editors exist to solve exactly this, from opposite directions: subagents and Agent Skills. They're easy to conflate because both live as plain files in your repo and both make the agent "better at things." But they answer different questions. Subagents ask who does the work and where. Skills ask what the worker knows and when it loads that knowledge. Get the split right and you can run several coding tasks at once without any of them drowning the others.
Subagents: isolation you can parallelize
A subagent is a fully separate agent instance. It runs in its own context window, with its own system prompt, its own tool allowlist, and its own permissions. When the main agent hits work that matches a subagent's description, it delegates; the subagent grinds through the messy part and returns only a summary. The forty-file grep happens in a context you never see.
In Claude Code, a subagent is a Markdown file in .claude/agents/ (project-level) or ~/.claude/agents/ (user-level). The frontmatter is the whole configuration:
---
name: code-reviewer
description: Reviews code for quality and best practices
tools: Read, Glob, Grep
model: sonnet
---
You are a code reviewer. When invoked, analyze the code and provide
specific, actionable feedback on quality, security, and best practices.
Only name and description are required. The body becomes the subagent's system prompt — and notably, it receives only that plus basic environment details like the working directory, not the parent's full system prompt. That description is load-bearing: it's what the main agent reads to decide when to hand off.
The parallelism falls out of the isolation. Because each subagent owns its context, the orchestrator can fire several at once and wait for all of them, instead of running research tasks back-to-back. Three independent analyses that don't depend on each other become three workers running at the same time. That's the wall-clock win.
It isn't free. Each spawn carries meaningful fixed overhead — roughly 20,000 tokens before any real work — and multi-agent sessions are commonly reported to burn three to four times the tokens of a single thread. Subagents can't talk to each other mid-flight; they only report back through the parent, which then has to reconcile whatever they each produced. So reach for them when you genuinely need isolation or true parallelism, not as a reflex.
Rule of thumb: promote work to a subagent only when it's long-running, would dirty your main context, or needs a restricted set of tools. Otherwise you're paying spawn overhead for nothing.
Skills: knowledge that loads only when it's needed
A Skill is the other half. It's a folder with a SKILL.md file — YAML frontmatter (again, name and description required) followed by instructions, and optionally bundled scripts, templates, and reference docs. It's an open format that works across Claude.ai, Claude Code, the Agent SDK, and the Developer Platform, so the same folder travels between surfaces.
What makes Skills efficient is progressive disclosure, which works in three levels:
- Discovery — at startup, only each Skill's name and description sit in the system prompt. Just enough for the agent to know a Skill exists and roughly when it's relevant.
- Activation — when a task matches, the agent reads the full
SKILL.md into context.
- Execution — the agent pulls in bundled files (
reference.md, a form spec, a script) only as it actually needs them.
The payoff: because level three lives on the filesystem and loads on demand, the total material a Skill can carry is effectively unbounded, while the resting cost is a couple of lines of metadata. A Skill can ship a Python script the agent runs directly — deterministic work like extracting PDF form fields belongs in code, not in generated tokens.
The critical difference from a subagent: a Skill loads into whoever's context invokes it. It doesn't spin up a new worker. It's a procedure the current agent chooses to follow. Subagent = a clean side-room. Skill = a manual pulled off the shelf, read only to the page you need.
Composing them for parallel work
The two compose, and that's where parallel coding gets good. A subagent can be equipped with Skills. So you can fan out five workers, each in its own isolated context, and each one has the same house rules — your commit conventions, your test-writing checklist, your API-design standard — available through progressive disclosure without any of it being pasted into five system prompts up front.
That's the actual shape of disciplined parallel AI coding:
- Subagents give you concurrency and context hygiene. Five tasks, five budgets, no cross-talk.
- Skills give every one of those workers the same competence on demand, cheaply.
- For parallel writes, run each subagent with worktree isolation so they edit separate copies of the repo and you merge deliberately, rather than three agents racing on the same files.
Both are just files in the tree — reviewable in a PR, versioned with the code, diffable when behavior changes. There's no editor chrome to configure, no marketplace lock-in. Your agent setup becomes part of the codebase, which is exactly where a team can reason about it.
The takeaway
Before you spawn anything, ask which resource is scarce. If the problem is a procedure the agent should follow only sometimes — a review checklist, a changelog format, a domain convention — write a Skill and let progressive disclosure keep it out of context until it's earned its place. If the problem is context getting trashed or wall-clock time you want back, spawn subagents, cap their tools, and give them worktrees. Then layer Skills onto those subagents so parallelism doesn't cost you consistency. Isolate to go parallel; disclose progressively to stay cheap. That's the whole discipline.
Sources: Equipping agents for the real world with Agent Skills (Anthropic Engineering), Create custom subagents (Claude Code Docs), Agent Skills overview (Claude Platform Docs)