Claude Code Skills vs Agents vs Commands: The Complete Comparison
If you have spent any time customizing Claude Code, you have run into three components that look deceptively similar: skills, subagents, and slash commands. All three let you package instructions once and reuse them. But they are triggered differently, live in different places, and solve different problems. Pick the wrong one and you end up with bloated context, automation that never fires, or a specialist that hijacks work it should have left alone.
This guide is the definitive comparison. It explains what each component actually is, when Claude Code loads it, and how to choose between them, plus how to install any of them from the ToolZip catalog in a single command. Hooks get a short mention at the end for completeness.
Skills vs agents vs commands at a glance
Here is the short version before we dig into each one. Read the table top to bottom, then jump to the section for whichever component fits your problem.
| Component | What it is | Where it lives | How it's triggered | Best for | Install flag |
|---|---|---|---|---|---|
| Skill | A SKILL.md instruction bundle the model reads when a task matches its description | .claude/skills/<name>/SKILL.md | Model-invoked automatically on match | Reusable know-how and procedures Claude should apply on its own | --skill |
| Subagent (agent) | A delegated specialist with its own context window and its own tool set | .claude/agents/<name>.md | Delegated by Claude, or requested by you | Isolating large or focused work so it does not crowd the main thread | --agent |
| Slash command | A saved prompt macro you run by typing /name | .claude/commands/<name>.md | User-triggered by typing the command | Repeatable prompts you fire on demand | --command |
The one-line rule: a skill is knowledge Claude reaches for by itself, a subagent is a worker Claude hands a job to, and a command is a shortcut you trigger yourself.
What is a Claude Code skill?
A skill is a folder containing a SKILL.md file: a short block of frontmatter (a name and a description) followed by instructions written in plain Markdown. Skills are model-invoked. Claude reads the description of every installed skill, and when your request matches one, it loads the full instructions into the working context automatically. You never type anything to invoke a skill.
This automatic matching is the defining trait. Because only the short description is loaded up front and the full body is pulled in on demand, skills use progressive disclosure to keep context lean until the moment the knowledge is actually needed. That makes them ideal for procedures Claude should follow without being asked: a house style for commit messages, a checklist for reviewing migrations, the exact steps to cut a release, or domain rules for a specific framework.
The trade-off is control. You do not decide when a skill fires; the model does, based on how well your task matches the description. A vague description means the skill either never triggers or triggers on the wrong tasks, so the description is the most important line you write. Browse ready-made ones in the skills catalog to see how effective descriptions are phrased.
What is a Claude Code subagent?
A subagent is a separate specialist that Claude can hand a task to. Each agent is a Markdown file with frontmatter that sets its name, its description, the model it runs on, and, crucially, the specific tools it is allowed to use. When Claude delegates to a subagent, that agent runs in its own context window and reports only its final result back to the main conversation.
That isolation is the whole point. A code-review agent can read hundreds of files, reason through them, and return a tight summary without flooding your main thread with every file it opened. A test-writer agent can churn through a large suite in a scratch context that never pollutes the primary session. Subagents are triggered two ways: Claude delegates to one when a task fits its description, or you explicitly ask for it by name.
Use a subagent when the work is large, focused, and benefits from separation, especially when it needs a narrower or different tool set than your main session. The deeper mechanics, including tool permissions and model selection, are covered in the Claude Code agents guide, and you can install pre-built specialists from the agents catalog.
What is a Claude Code slash command?
A slash command is the simplest of the three: a saved prompt you run on demand by typing /name in the Claude Code prompt. The command file is a Markdown template, and it can accept arguments so you can pass in specifics at call time. Think of it as a macro. When you type the command, its text is expanded into your request exactly as if you had typed the whole prompt yourself.
Commands are user-triggered, which is what separates them from skills. A skill fires when the model decides it is relevant; a command fires only when you choose to run it. That makes commands perfect for repeatable actions you want on a keystroke: /review-pr, /write-tests, /summarize-changes. You keep full control over when they run, and they run in your main context rather than a separate one.
The line between a command and a skill is worth internalizing. If you want Claude to apply something automatically whenever it is relevant, write a skill. If you want to pull the trigger yourself, write a command. See the commands guide for argument syntax and patterns, or grab one from the commands catalog.
A quick word on hooks
Hooks are a fourth component that people sometimes lump in with these three, but they work differently. A hook is a shell command wired into a lifecycle event in settings.json, such as before or after a tool runs. Hooks are deterministic: the harness executes them on the event every time, with no model judgment involved. Use a hook when you need a guarantee, like auto-formatting after every edit or blocking a dangerous command. The hooks guide covers the available events.
Which one should I use?
Match the component to how the work should start:
- Choose a skill when you want Claude to apply knowledge or a procedure on its own, without you asking each time. Skills are for know-how that should activate whenever it is relevant.
- Choose a subagent when a task is large or focused enough that it deserves its own context window and possibly its own tools. Agents are for delegation and isolation.
- Choose a slash command when you want a repeatable prompt you fire yourself with a short keystroke. Commands are for on-demand, user-controlled actions.
- Choose a hook when you need something to run every single time on a lifecycle event, with no model discretion. Hooks are for deterministic automation.
These are not mutually exclusive. A common setup combines them: a slash command kicks off a workflow, that workflow delegates heavy lifting to a subagent, and a skill quietly enforces your conventions throughout. Start with the trigger you want, whether the model decides, you decide, or an event decides, and the right component usually becomes obvious.
How to install skills, agents, and commands
Every component in the catalog installs with the same claude-code-templates command; only the flag changes to match the component type. Run these from your project root, and the files land in the correct .claude subfolder automatically.
Install a skill:
npx claude-code-templates@latest --skill="category/skill-name" --yes
Install a subagent:
npx claude-code-templates@latest --agent="category/agent-name" --yes
Install a slash command:
npx claude-code-templates@latest --command="category/command-name" --yes
The same pattern extends to the other components with --mcp, --setting, and --hook. You can pass more than one flag in a single call to install a matched set at once. Browse everything by category on the Claude Code catalog, copy the exact install string from any component page, and paste it into your terminal.
Once you understand that skills are model-invoked, subagents are delegated, and commands are user-triggered, the rest of Claude Code customization falls into place. Pick the trigger, pick the component, and install it in one line.
Browse Claude Code Skills
Packaged, model-invoked instruction bundles that add reusable capabilities.