Claude Code agents vs skills: which one to use
In short. Claude Code agents vs skills is a choice about the task and its context. An ordinary subagent works in a separate context; a skill normally supplies instructions in the main conversation, but can use
context: fork. Neither name proves file isolation. This guide compares the two and gives a six-question decision table and eight example tasks.
Claude Code agents vs skills is a common question once your setup grows beyond a single CLAUDE.md file. Both live in .claude/, both are Markdown with a bit of YAML, and both can run on their own. But they solve different problems, and mixing them up makes your setup slow and unpredictable.
Everything below follows the official subagents and skills documentation, checked again on 28 October 2026. We use both daily in our studio, and the rule near the end comes from that experience.
What is a Claude Code subagent?
A subagent is a specialised assistant that runs in its own context window, with its own system prompt, tools and permissions. Claude gives it a task, it does the work, and only a summary returns to your main conversation. A side task that would fill your conversation with logs or search results stays inside the subagent.
---
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.
Save it as .claude/agents/code-reviewer.md for one project or ~/.claude/agents/code-reviewer.md for all your projects. Only name and description are required. If you leave out tools, the subagent inherits every tool available to subagents, including MCP tools; disallowedTools works the other way, as a denylist, and is applied first if you set both.
Three facts people often miss:
- What a subagent sees. It does not see your conversation history, the skills you already invoked or the files Claude has read. It gets its own system prompt, the task message, your CLAUDE.md files (except the Explore and Plan subagents), a git status snapshot and the full content of any skills listed in its
skillsfield. - Where it can live. When names collide, the order is managed settings, then the
--agentsflag, then.claude/agents/, then~/.claude/agents/, then plugins. - Which model it uses. If you do not set
model, it uses the main conversation’s model. Subagents can also start their own subagents, up to three layers below the main conversation by default.
Claude delegates automatically when a task matches the description. You can also ask by name, or write @"code-reviewer (agent)" to make sure that one runs. Claude Code ships built-in subagents too: Explore is a fast read-only searcher, Plan is a read-only researcher for plan mode, and a general-purpose one handles multi-step work.
What is a Claude Code skill?
A skill is a folder with a SKILL.md instruction file and optional supporting resources. It normally runs in the main conversation. With context: fork it runs through a subagent instead; treat that as an explicit configuration choice.
---
name: summarize-changes
description: Summarizes uncommitted changes and flags anything risky. Use when the user asks what changed, wants a commit message, or asks to review their diff.
---
Summarize the uncommitted changes in two or three bullet points,
then list anything risky: deleted files, changed permissions, new dependencies.
Save it as .claude/skills/summarize-changes/SKILL.md. By default you and Claude can both use it: you type /summarize-changes, or Claude loads it when your request matches the description.
Delegation and on-demand instruction loading can reduce clutter in the main conversation. They do not make the work free: calls, tool results and loaded references still consume time and allowance. Check the installed version for context and compaction limits instead of treating a fixed token count as a promise.
Other facts worth knowing:
- It stays. Once loaded, the skill’s content stays in the conversation as one message. Claude Code does not re-read the file, so write guidance as standing instructions.
- Context limits. Compaction and attachment budgets vary with the installed version and configuration. Keep reference material focused and inspect the actual context behaviour.
- Who can trigger it.
disable-model-invocation: truestops Claude from loading the skill by itself, so only you can start it;user-invocable: falsedoes the opposite. - Where it lives. Personal skills sit in
~/.claude/skills/, project skills in.claude/skills/. For the same name, enterprise overrides personal, and personal overrides project. - Commands. Custom slash commands were merged into skills:
.claude/commands/deploy.mdand.claude/skills/deploy/SKILL.mdboth create/deploy, and the skill wins if both exist.
How do Claude Code agents and skills differ?
| Aspect | Subagent | Skill |
|---|---|---|
| Context | Separate by default; conversation forks differ | Main by default; context: fork delegates |
| Result | Task result or summary | Work in the current context unless delegated |
| Configuration | .claude/agents/name.md | .claude/skills/name/SKILL.md |
| Controls | Tools and permission settings | Instructions plus supported frontmatter controls |
| Typical use | Focused research, review, side tasks | Reusable procedure or reference |
How do you choose between a subagent and a skill?
Start with one question: do I need the details of this work in the conversation later? If not, only the result, use a subagent. If yes, because it is part of what you are doing now, use a skill. When that is not enough, use this table. It is our own working rule, not an official one.
| Question | If yes | If no |
|---|---|---|
| Do I need the details of this work later in the conversation? | skill | subagent |
| Will it read many files or produce long output I do not want in the conversation? | subagent | skill |
| Should it work with a tighter set of tools than the main session? | subagent (tools) |
either |
| Is it a rule or procedure Claude should follow while it works? | skill | subagent |
| Must only I be able to start it, such as a deploy? | skill with disable-model-invocation: true |
either |
| Does a cheaper or different model suit the job? | subagent (model) |
either |
Here are eight everyday tasks sorted by that rule:
| Task | Use | Why |
|---|---|---|
| Find everywhere a function is used in a large repository | subagent (Explore) | you want the list, not every file it opened |
| Your commit message format | skill | it guides the conversation you are in |
| Summarise a 20,000-line log and name the errors | subagent | the log would flood the conversation |
| A release checklist | skill | you follow it step by step with Claude |
| Review a diff with read-only access | subagent | tools: Read, Glob, Grep limits what it can touch |
| Review a diff against your team checklist | both | a read-only subagent that preloads the checklist skill |
A /deploy command only you may trigger |
skill | disable-model-invocation: true |
| How your project names files and functions | skill | knowledge the conversation should keep |
Two red flags from real work. If a CLAUDE.md section turns into a step-by-step guide, it should be a skill. If a skill keeps loading dozens of files into the conversation, it needs context: fork or a subagent.
Can subagents and skills work together?
Yes, in both directions. A subagent can load skills at start-up through its skills field, so a reviewer begins with your checklist. A skill with context: fork runs in a subagent: the skill text becomes the task, and your main conversation stays clean. One detail matters here: a forked skill’s subagent does not see your conversation history, so the skill must be self-contained. It also runs in the background by default unless you set background: false.
Which mistakes make a setup unpredictable?
- Vague descriptions. Both are picked by their
description. “Helps with code” matches everything and nothing. Say what it does and when to use it. - Descriptions that are too long. Descriptions load at the start of every session. Keep them short and put the details in the body.
- Giving a subagent all tools by default. If a reviewer only needs to read, give it
Read, Glob, Grepand nothing else. - Expecting a subagent to know the conversation. It does not. The task Claude writes for it must contain what it needs.
- Writing hard rules as a skill. A skill guides; it does not enforce. For “never do this”, use permission rules and hooks, as in our Claude Code hooks article.
When are skills and subagents not enough?
A separate context is not a separate filesystem or credential boundary. Limit tools and account rights for the task, and use appropriate operating-system or workspace isolation when needed. A skill can also contain permission-related configuration: allowed-tools pre-approves listed tools for the invoking turn; it does not restrict the whole toolset. Instructions are not an access-control boundary.
Use an MCP server for a connection to an external system. Keep a small task in the main conversation when delegation adds more overhead than value. Delegated calls still use time and usage allowance; no savings are guaranteed.
When should you get help with agents and skills?
If your .claude/ folder grew fast and nobody on the team knows which agent or skill does what any more, we map the setup, clean up agents and skills, and add tested rules. You can see how our own system works on the work page.
What to put in a delegated review task
Illustrative task: review only the supplied diff for regressions. Do not edit files, publish, install packages or call external systems. Return findings with file and line, the reason and a proposed check. If there are no findings, say so and list what was not tested. This is a task brief, not evidence that a review has run.
A separate conversation context does not isolate files or credentials. Configure tools and permissions for the intended job; use appropriate filesystem isolation where required. In a skill, allowed-tools grants approvals for listed tools rather than restricting the entire toolset. Instructions alone are not an enforcement mechanism.
Do not confuse a fork of the current conversation with the context: fork field in a skill. Inline execution is the usual skill case, not a rule for every skill. Match context behaviour to the configuration rather than the word “fork” alone.
Delegation may reduce clutter in the main conversation, but its own calls still use time and usage allowance. Set a stopping point and check the returned evidence. A manual-invocation flag does not replace review and authorisation of a deployment.
The separate-context description concerns ordinary subagents. Conversation forks can inherit history; always state the required background in the task rather than assume it was copied.
Questions
Is a skill just a saved prompt?
Close, but more than that. A skill is a folder with a SKILL.md file and optional supporting files. Claude sees only its description until the skill is used, can load it on its own when the task matches, and you can also call it as /skill-name.
Do subagents see my conversation?
An ordinary subagent starts from its definition and task, not the whole chat. A conversation fork can inherit history; a skill with context: fork is a different configuration. State necessary context explicitly and check the installed version.
What happened to custom slash commands?
They were merged into skills. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy. Old command files keep working, and if a skill and a command share a name, the skill wins.
Can I use both at once?
Yes, in both directions. A subagent can preload skills through its skills field, and a skill with context: fork runs inside a subagent instead of the main conversation.