Launch price: 120+ Claude Code agents for $49 one-time · lifetime updatesGet access →
Explainer·Last updated ·8 min read

Claude Code Subagents vs Skills vs Slash Commands: When to Use Each

Claude Code gives you three ways to package expertise: subagents, skills and slash commands. They overlap enough to be confusing, and choosing the wrong one makes Claude Code slower or less reliable.

Here is the short version: a subagent is a specialist you delegate to, a skill is know-how Claude Code loads when it's relevant, and a slash command is a shortcut you trigger yourself. The rest of this page explains each with examples.

Quick verdict

Use a subagent to delegate a whole task in its own context, a skill to teach Claude Code a procedure it can pull in when needed, and a slash command for a prompt you run on demand. Many good setups use all three together.

Use a subagent when…

  • The task is big and reads lots of files
  • You want it kept out of your main context
  • It needs its own role, tools or model
  • Example: code reviewer, SEO auditor

Use a skill or slash command when…

  • Skill: a procedure Claude should know, loaded only when relevant
  • Slash command: a prompt you trigger yourself with /name
  • Both: repeatable steps with consistent output
  • Example: /seo-audit, a release checklist

Side-by-side comparison

SubagentsSkills & slash commands
What it isA specialist with its own system promptSkill: packaged instructions and files. Command: a saved prompt
Where it lives.claude/agents/*.mdSkills: .claude/skills/<name>/SKILL.md. Older commands: .claude/commands/*.md
ContextRuns in a separate context windowRuns in your current conversation
How it startsChosen by its description, or asked for by nameSkill: loaded when relevant. Command: you type /name
Tool limitsCan restrict tools per agentUses the session's tools
Best forDelegated tasks: reviews, audits, researchProcedures, checklists and shortcuts

Subagents: specialists you delegate to

A subagent is a markdown file in .claude/agents/ (or ~/.claude/agents/ for every project). Its YAML header sets a name and a description of when to use it, and can limit its tools or choose a model. The body is its system prompt.

When Claude Code delegates to a subagent, the subagent works in its own context window and returns a summary. That keeps big jobs — reviewing a pull request, auditing every page for SEO — from filling your main conversation.

Skills: know-how loaded on demand

A skill is a folder with a SKILL.md file, stored in .claude/skills/. The file starts with a name and description; Claude Code reads only those at first and loads the full instructions — plus any scripts or reference files in the folder — when a task matches.

That makes skills ideal for procedures: how your team writes release notes, how to run a technical SEO checklist, how to format a content brief. They add expertise without permanently taking up context.

Slash commands: shortcuts you trigger

A slash command is something you run yourself by typing /name. In current versions of Claude Code, custom commands have been merged into skills: a file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. Old command files keep working, but skills are recommended for new work because they can include supporting files and Claude can load them automatically when relevant.

Use a command when you know exactly what you want and when: /seo-audit, /deploy-checklist, /launch-kit.

How they work together

The most useful setups combine all three. A slash command starts a workflow, the workflow follows the steps in a skill, and heavy parts of the job are delegated to subagents. For example, an /seo-audit command might use an SEO checklist skill and hand page-by-page review to a technical SEO subagent.

  • CLAUDE.md — project facts every session should know
  • Skills — procedures Claude Code loads when relevant
  • Slash commands — workflows you start on purpose
  • Subagents — specialists that do the heavy lifting in their own context

Where claudeagents fits

claudeagents ships all three, built to work together: 120+ subagents, 54 skill playbooks and 54 slash commands across coding, SEO and marketing kits, all reading from one CLAUDE.md.

Frequently asked questions

What is the difference between a Claude Code skill and a subagent?

A skill adds instructions and files to your current conversation when they're relevant. A subagent is a separate specialist that works in its own context window and reports back.

Where do I put custom slash commands in Claude Code?

For new commands, create a skill: .claude/skills/<name>/SKILL.md in your project, or ~/.claude/skills/<name>/SKILL.md for every project. It becomes /<name>. Older files in .claude/commands/ still work too.

Do skills use up my context window?

Only a little until they're needed. Claude Code reads each skill's name and description up front and loads the full instructions when a task matches.

Should I use a subagent or a skill for code review?

Usually a subagent, because reviews read many files and benefit from their own context. A skill works well for a short review checklist you want applied in the current conversation.

Get 120+ agents for Claude Code

Coding, SEO and marketing kits, 54 skills and 54 slash commands. $49 one-time, lifetime updates.

See what's included →

Keep reading