2026-05-31
When you want Claude Code to do something beyond its defaults, you have three tools available. They look similar from the outside — you describe a task and Claude does it — but they operate at completely different layers. Picking the wrong one means more friction, not less.
Slash command — a shortcut you type in the Claude Code prompt (like /review or /deploy) that sends a predefined instruction to Claude. Lives in .claude/commands/.
Skill (also called a custom tool) — a function Claude can call during a session. You define it; Claude decides when to invoke it. It runs code on your machine.
Subagent — a second Claude instance that Claude Code spawns to handle a bounded task in its own context window. Covered in a recent lesson on isolation; mentioned here for comparison only.
These three mechanisms solve different problems. Confusing them leads to over-engineering simple things and under-engineering complex ones.
A slash command is a shortcut for you. You type it; Claude reads the stored instruction and runs it. The intelligence is still Claude, but the setup is static text in a Markdown file. Use it when you find yourself copy-pasting the same long instruction repeatedly.
A skill is a shortcut for Claude. You define a function, and Claude calls it when the task matches. The intelligence decides when to use it. Use it when Claude needs to reach outside the conversation — check a database, call an API, read a file in a particular way.
A subagent is a second Claude. It gets its own context and reasons independently. Use it when a subtask is large enough to crowd out the main session, or when you want true isolation.
Slash command — create a Markdown file in .claude/commands/:
.claude/
commands/
review.md
Inside review.md, write the instruction Claude should follow when you type /review. That's the whole mechanism.
Skill — register a tool definition in your claude_tools config (or via the API if you're calling Claude Code programmatically). The definition has a name, a description, and a JSON schema for parameters. Claude reads the description and decides when to call the tool.
Subagent — you ask Claude (or instruct it via a prompt) to use the Task tool to spin off a subtask. Claude Code handles the spawning. You don't wire this up manually; you prompt for it.
| Right tool when… | Wrong tool when… | |
|---|---|---|
| Slash command | You want a repeatable prompt shortcut | The task needs dynamic logic or data |
| Skill | Claude needs to call external systems | The action is just instructions, not code |
| Subagent | A subtask is big and self-contained | The subtask is small and shares lots of context with the main task |
Open .claude/commands/ in your project (create it if it doesn't exist). Write a standup.md file that instructs Claude to summarise git changes from the last 24 hours in three bullet points. Type /standup in your next Claude Code session. You've now built a slash command — and you'll immediately feel where it ends and where a skill would need to begin.
Don't miss what's next. Subscribe to My Claude Daily Learning: