claude code slash commands, explained for people who don't code
a claude code slash command is a markdown file saved in a .claude/commands/ folder. the filename becomes the command: save refactor.md and typing /refactor runs whatever instructions are inside. no programming involved. it's the difference between retyping a prompt every day and owning a program you wrote once.
i run the closer method on 106 of these. 75+ live sites, 11 MCP servers, no computer science degree. this guide covers what slash commands are, the built-in ones worth knowing, how to make your own in five minutes, and the exact commands that run my business.
what is a slash command in claude code?
it's a saved instruction you trigger with a /. claude code ships with built-in commands, and it lets you add your own by dropping markdown files into a folder:
- project commands live in
.claude/commands/inside a project. only that project sees them. - personal commands live in
~/.claude/commands/on your machine. every project sees them.
the file's content is the instruction. the filename is the command. that's the whole system.
the built-in commands worth knowing first
- /context shows how full claude's memory is. when a long session gets dumb, this is usually why. check it before big tasks.
- /compact summarizes older messages so a long session keeps its important context without the bloat.
- /clear wipes the slate for a genuinely new task. don't clear out of habit; context is usually your friend.
- /usage shows your usage stats without leaving the terminal.
useful. but the built-ins are not where the leverage is. the leverage is in the ones you write.
how to create a custom slash command (5 minutes)
- in your project, create the folder
.claude/commands/ - create a file named after the command you want. example:
price-sweep.md - write plain instructions inside:
Sweep this page for prices, deadlines, and offers. Flag anything that conflicts with the current offer or has an expired date. List every finding with the exact line. Do not change anything without approval.
- type
/price-sweepin claude code. done.
three optional upgrades when you're ready:
frontmatter configures the command. this limits which tools it can touch and describes it:
--- allowed-tools: Read, Grep, Glob description: Find stale prices and expired offers ---
arguments make one command flexible. write $ARGUMENTS (or $0, $1 for positions) in the file, then call /fix-issue 123 high and the values drop in.
live context pulls in reality. a line like !`git status` runs the command and gives claude the output. @package.json pastes in a file. your command reads the actual state of your project before acting, instead of guessing.
slash commands vs skills: which should you use?
| slash command | skill | |
|---|---|---|
| file location | .claude/commands/name.md |
.claude/skills/name/SKILL.md |
| how it runs | you type /name |
you type /name, or claude invokes it itself |
| best for | simple repeated instructions | rules claude should apply without being asked |
| status | fully supported | anthropic's recommended format |
anthropic's current recommended format is a skill: the same idea, but stored as .claude/skills/your-name/SKILL.md. it still runs as /your-name, with one upgrade: claude can also invoke it on its own when the task calls for it.
that upgrade matters more than it sounds. a command waits for you. a skill knows when it's needed. it's the same thesis this whole site runs on: files not chats, skills not prompts. your instructions should live in files you own, not in chat histories that vanish.
both formats work today. start with commands if you want simple. graduate to skills when you want claude to start applying your rules without being asked.
the slash commands actually running my business
not theory. these are live in my ~/.claude/skills/ folder right now.
/founders-brief loads my whole business context: voice, banned words, customers, offers. every session starts with it. i haven't re-explained my business to AI in months.
/em-dash-sweep enforces a writing rule. em dashes are AI's loudest tell, so they're banned from my brand, and the ban is a program, not a hope. it hunts every one down and swaps in the punctuation a person would use, comma, period, or parens, depending on context.
/claim-check is the fact gate. it was born the day my AI presented me a fabricated audit with confident, research-flavored language. now every number in every draft needs a source before anything publishes.
/verify-funnel-e2e walks the money path: page loads, form fires, the subscriber actually lands in Kit with the right tag, the sequence enrolls, the stripe links resolve. runs after every change that touches revenue, because funnels break silently.
/pre-deploy-file-count-gate refuses to deploy if files went missing since the last version. it exists because a deploy once silently dropped 51 pages; the gate makes that impossible now.
/post-deploy-health-check confirms the live site actually works after a deploy, not just that the deploy succeeded.
/emergency-rollback is the undo button. i hope to never need it and it exists precisely so i can afford that hope.
notice the pattern: none of these are clever prompts. they're rules i was already supposed to follow, converted into programs that follow themselves.
how to decide what your first command should be
find the prompt you've typed more than twice. that's it. that's the command.
if you're a founder or operator, start with your own founders brief: who you serve, how you talk, what you never say, what you sell. one file. it will improve every single output after it because claude stops guessing who you are.
frequently asked questions
do slash commands require coding?
no. a slash command is a markdown file containing plain-language instructions. if you can write a note, you can write a command.
where do claude code slash commands live?
project commands in .claude/commands/ inside your project. personal commands in ~/.claude/commands/ in your home folder. the newer skill format lives in .claude/skills/<name>/SKILL.md and works across the same scopes.
what's the difference between a slash command and a skill?
both are markdown files you trigger with /name. a skill (SKILL.md format) can additionally be invoked by claude autonomously when it recognizes the task. skills are anthropic's recommended format going forward.
can slash commands take arguments?
yes. put $ARGUMENTS or positional $0, $1 placeholders in the file, then pass values when you call it, like /fix-issue 123 high.
can a slash command run terminal commands or read files?
yes. a line like !`git status` executes the command and includes its output. @filename includes a file's contents. your command can see the real state of the project before acting.
what are the most useful built-in claude code commands?
/context (how full is memory), /compact (summarize history), /clear (fresh start), /usage (usage stats). claude code also bundles code-review and verify skills.
want the full library? my AI builder toolkit at closermethod.com/skills is 27 skills built exactly this way, and the brand voice one runs free on the page before you pay anything. if you just want to know whether your current AI setup is theater, the hype detector takes 90 seconds.
go deeper
- how to create a custom claude code slash command in 5 minutes
- 7 claude code slash commands i run before anything goes live
- 10 claude code slash commands that run my one-person business
- do you need to learn ai engineering to build with ai?
source: anthropic's claude code documentation for slash commands and skills; command descriptions checked against the live skill files they describe. skill count verified against the live ~/.claude/skills folder, july 27 2026. written by elisabeth hitz, certified in anthropic's ai fluency program (framework & foundations, and ai capabilities & limitations), plus claude 101 and claude cowork.