Every team using Claude Code eventually asks the same question: should this be a skill, a slash command, or a subagent? The three primitives overlap enough that the answer isn't obvious, and the wrong choice makes things noticeably worse — harder to maintain, harder to use, harder to reason about.
This post is our decision framework. It's not the only reasonable answer, but it's the one that's working for us and the teams we've helped. I'll define each, give concrete criteria for choosing, and walk through cases where we got it wrong so you can skip those.
The three primitives, briefly
Quick definitions. Skip if you're familiar.
- Skill — a reusable set of instructions that guide how Claude does a kind of work. Loaded automatically when relevant; doesn't change the session structure. Think: "when handling markdown, prefer these conventions."
- Slash command — an explicit invocation. The user (or another command) types
/name, Claude runs the command's instructions. Predictable, discoverable, easy to chain. - Subagent — a delegated worker with its own system prompt, tool allowlist, and context. Parent Claude session invokes it with a specific job; subagent runs to completion; parent gets a result.
The core decision question
For every candidate task, ask three questions in order. The first one that gives a clear yes is your answer.
1. Does this task need its OWN CONTEXT — a fresh mental model,
isolated from the parent session, with specific tools?
→ SUBAGENT
2. Does this task need to be INVOKED EXPLICITLY by a user or
command, with a name they can discover and reason about?
→ SLASH COMMAND
3. Does this task need to guide HOW Claude approaches a kind of
work when it comes up, without needing an explicit invocation?
→ SKILLQuestion 1: fresh context vs shared context
This is the biggest and most-often-missed axis. Subagents get a fresh, focused context — the parent's history isn't there. The subagent starts clean, sees only what you pass it, does its job, returns.
Skills and commands both run in the parent's context. They add to what the parent is already thinking about; they don't reset it.
When is fresh context the right thing? When accumulated context is more likely to hurt than help. Two examples that push toward subagent:
- PR review. The parent session has probably been coding all day. Reviewing a PR benefits from starting fresh — no assumptions from the current work carrying over. Subagent.
- Security audit. Same reason but stronger. You want the auditor to see the code without the "we're trying to get this shipped" pressure that infects the parent session. Subagent.
When is shared context the right thing? When continuity is the whole point. If you've been debugging a race condition for 20 minutes and you need Claude to summarize what you've found so far, that's a slash command — /summarize-debug — not a subagent. The summary needs the shared history to work.
Question 2: explicit vs implicit invocation
If question 1 gives you "shared context," you're choosing between a slash command (explicit) and a skill (implicit). This one's about how the task gets triggered.
Slash commands are triggered by name. The user types /refactor-extract, Claude runs the command's instructions. Predictable. Discoverable via /help or team docs. Easy to compose (a command can call another command).
Skills are triggered by context. Claude notices "I'm about to work with a docx file" and loads the docx skill. "I'm being asked to write a slide deck" — pptx skill. The skill's instructions shape the work without the user asking for them.
The right choice depends on how the task shows up:
- If the task is a specific job the user chooses to run — write tests, refactor a function, generate an ADR — it's a slash command. The user knows they want it; the command is discoverable.
- If the task is a persistent behavior that should apply whenever certain conditions hold — always use our error class, always format tables this way, always cite sources when writing summaries — it's a skill. Users shouldn't have to remember to invoke it; it should just happen when relevant.
Would you type its name into /help to see it? Slash command. Would you never think to invoke it explicitly but expect Claude to just do it? Skill.
Examples of the same task, three ways
To make the framework concrete: here are three scenarios where "test writing" shows up, and why each lands on a different primitive.
- A dev types
/test-unitto generate tests for a specific file. Explicit invocation, shared context (dev has that file open in mind), predictable output. → Slash command. - The
pr-reviewersubagent notices missing tests and wants to write them. Fresh context (the reviewer wasn't part of the parent session's coding), focused job, needs isolated tool access. → Subagent. - Whenever Claude generates a new endpoint, it should always add a corresponding test file. Implicit — no user command, just correct behavior. → Skill.
All three exist in a mature team's .claude/ folder. They don't conflict; they cover different situations. The mistake is trying to make one primitive cover all three cases.
Anti-patterns we've committed
Three specific mistakes we've made. Sharing so you can skip them.
Making everything a slash command
This is the most common early mistake. Teams new to Claude Code build 40 slash commands and no skills or subagents. Everything is /do-thing.
The result is a big menu of commands, a lot of overlap between them, and a lot of tasks the assistant does poorly because the "guiding" work should have been a skill and the "delegated" work should have been a subagent.
Fix: audit your commands. For each one, ask "would this be better as an implicit skill?" and "would this be better as a delegated subagent?" Some will move; some will stay.
Making everything a subagent
The opposite mistake, common in teams that discovered subagents and got excited. Every task gets delegated. Every task gets fresh context.
The result is over-isolation. Tasks that need the parent's context lose it. The dev finishes debugging something, asks Claude to write it up, and the subagent — with no memory of the debugging session — produces a generic summary that misses the actual insights.
Fix: only delegate when fresh context is a benefit, not the default. Subagents cost real complexity; use them where their properties matter.
Cramming behavior into CLAUDE.md instead of using skills
This is the subtlest mistake and the one that hurts most over time. Teams have persistent behaviors they want ("always use tables for comparisons," "always cite the file when quoting code") and put them all in CLAUDE.md.
The result: CLAUDE.md bloats. Every session pays the token cost of every instruction. And the instructions have no scope — "always use tables for comparisons" applies even in situations where a table doesn't fit.
Fix: extract to skills. A skill can activate contextually ("when writing a comparison document, use the comparison skill's conventions"). CLAUDE.md stays lean. Instructions apply where they should.
If your .claude/ folder makes sense with 3 primitives, that's a lucky accident. Make sure it still makes sense with 30, because that's where you'll be in a year. The decision framework matters most at scale.
A shorter version
Skills shape behavior when relevant. Slash commands do specific jobs on explicit request. Subagents delegate to a focused worker with fresh context.
Fresh context needed → subagent. Explicit invocation and shared context → slash command. Persistent behavior that should just happen → skill.
Get this right early; the compounding effect of good decomposition is large. Get it wrong and you'll rewrite half your .claude/ folder in month six anyway.
Get cctk running in one command
85 slash commands, 12 subagents, 12 MCP integrations, 12 hooks. All the patterns from this post are shipped in cctk.