Claude Code skills vs subagents: which one to pick, and how I combine them
A skill is a method: a SKILL.md file whose description is the only part kept in context until it is used, and which runs inside the current conversation. A subagent is a worker: it has its own context, its own tools, its own model, and returns only a summary. In my agent chain the rule is written down: the skill carries the method, the agent carries the model and the tool limits, hooks carry the rules that are never up for debate, scripts carry whatever is deterministic.
The problem: two tools that look alike
A skill and a subagent are both a Markdown file with a header. Both live under .claude/, both can ship in a plugin, and the boundaries cross: a skill can run in a subagent with context: fork, and a subagent can load skills at startup with its skills field. The old commands in .claude/commands/ have also been merged into skills (how I write mine).
So people hesitate, and often end up putting everything in one place: a huge subagent holding both the way to do the work and the rules of conduct, or a skill trying to isolate work it cannot isolate.
What each one really does
- A skill lives in
~/.claude/skills/<name>/SKILL.mdfor all your projects, in.claude/skills/<name>/SKILL.mdfor one project, or in a plugin, where it is called/<plugin>:<name>. Claude keeps only its description in context, and loads the body when it judges the skill useful or when you type/name. Once loaded, the text stays in the conversation. - A subagent lives in
.claude/agents/or~/.claude/agents/, or in a plugin. It starts with a fresh context: it sees neither your conversation, nor the skills already invoked, nor the files already read. Its header sets its tools (tools) and its model (model). It returns a summary to the conversation that launched it.
The Claude Code documentation sums up the choice like this: a subagent when the work produces a lot of output you will not need later, when tools must be restricted, or when the task stands alone and can be summarised; a skill when you want a reusable workflow that runs in the main conversation.
My split, in a real chain
My agent chain, packaged as a plugin, has eight skills and three agents. The agents write the tests, write the code and review. Each agent file is about forty lines at most, and points to a skill for the know-how. Here is the start of the agent that writes the tests, shortened:
---
name: tests
tools: Read, Edit, Write, Bash, Grep, Glob
model: sonnet
---
You write the failing tests for ONE task. Another agent implements after you.
Follow ${CLAUDE_PLUGIN_ROOT}/skills/tests/SKILL.md (how to write tests that bite).
This file is the process.The agent file says who does the work: which model, which tools, and rules of conduct (stay in the foreground, never rewrite git history, stage only its own files). The skill says how to do the work well: a test compares against the spec, never against the current code, and it must fail if the behaviour it checks disappears. The skill's own description says so: it serves the agent, and it is also useful by hand before implementing anything test first.
The orchestrator, on the other hand, is a skill: /pipeline:build runs in the main conversation and launches the agents one at a time. That makes sense, since it is the one that must keep the thread between tasks. The model choice per agent is covered in the article on each subagent's model.
Last case: my skills that drive a simulator or a browser stay in the main conversation, never in a subagent launched in parallel. My global instructions say it in one sentence: fanning out agents is for reading, not for driving a device. Two agents tapping the same simulator get in each other's way.
What 30 incidents taught me
My chain logs every incident in a journal, along with where the fix ended up. Out of 30 entries, 28 are resolved and 2 are still open. 16 fixes ended up in an agent file, and only 3 in the skill that explains how to write a test. The rest went into the orchestrator and the scripts.
That split says something: most failures did not come from missing know-how, but from conduct. One agent returned the single word "placeholder" as its final answer, with its work staged but not committed: it had ended its turn before running the checks. The fix is a rule in the agent file, plus a script that rejects that kind of answer. The other way round, tests that passed while the behaviour was broken, seen five times in a single run, produced a method rule in the skill.
One case is still open, and it sits right on the boundary. My reviewer, limited to reading, came back twice in a row with nothing, while it was being asked to write a report to a file. The cause is not proven. My hypothesis, written in the journal: an agent asked to write a file without the tool to do it has no way to report the problem either. What you ask of an agent has to fit within the tools you give it.
Limits worth knowing
- `context: fork` does not turn any skill into an agent. The skill becomes the instructions of a subagent that does not see your conversation. A skill that holds only guidelines, with no concrete task, comes back with nothing useful, as the documentation says.
- A subagent's `skills` field injects the full text of the listed skills at startup, not only their description. Handy for a short skill, costly for a long one. My agents instead read the skill file by its path when they need it.
- A subagent returns only a summary. If the orchestrator must check the work, it needs proof outside the summary: in my case, the commit and a script that inspects it. Hooks cover what neither a skill nor an agent guarantees.
How to get started
- Start with a skill. A method you keep explaining to Claude goes in
.claude/skills/<name>/SKILL.md, with a description that says when to use it (my rules for writing it well). - Move to a subagent when you need isolation: a clean context, limited tools (a read-only reviewer), or a different model.
- Keep the agent short and have it follow the skill. The method stays usable by hand, and a method fix benefits both.
- Note where each lesson lands. A method mistake goes in the skill, a conduct mistake in the agent, a rule that must never give way in a hook.
Article written with the help of AI, from my daily practice and my projects.
The whole notebook