How to Make Slash Commands with Claude
by Sanskar Tiwari · @sanskarr.tiwari
Turn your best repeated prompts into one-word commands in Claude Code. Save a prompt once, run it forever with /yourcommand.
The whole thing in one line: drop a markdown file in ~/.claude/commands/, write your prompt inside it, and Claude turns the filename into a /command. That's it.
Want it as a PDF (and future guides)? Drop your email — I'll send it over. No spam.
The 5 steps
Make the commands folder
Setup- Personal (works in every project): ~/.claude/commands/
- Project (shared with your team via git): .claude/commands/ inside the repo.
- Create the folder if it doesn't exist — that's where Claude looks.
Create a .md file = your command
Create- The filename is the command name: save promote.md and you get /promote.
- Whatever you write in the file IS the prompt Claude runs when you call it.
- Put your best repeated prompt in there once — then reuse it forever.
Pass input with $ARGUMENTS
Input- Type /promote my new app — and $ARGUMENTS becomes "my new app" inside the prompt.
- Need multiple inputs? Use $1, $2 for positional arguments.
- This is what turns a static prompt into a reusable tool.
Add frontmatter (optional but nice)
Polish- description: shows in the / menu so you remember what it does.
- argument-hint: hints what to type after the command.
- allowed-tools / model: lock the command to specific tools or a model.
Run it
Use- Type / in Claude Code to see all your commands, or just type /yourcommand.
- It runs your saved prompt instantly — same result, zero re-typing.
A real example
Save this as ~/.claude/commands/review.md and you've got a /review command:
---
description: Review the current diff for bugs
argument-hint: [optional focus area]
---
Review my staged changes for bugs and risky edge cases.
Focus area: $ARGUMENTSThen type /review the auth flow — and$ARGUMENTS fills in with “the auth flow.”
You did it right if…
- My command lives in ~/.claude/commands/ (or .claude/commands/ for the project).
- The filename matches the command I want (promote.md → /promote).
- The file contains the actual prompt, not a description of it.
- I used $ARGUMENTS (or $1, $2) so I can pass input.
- I added a description so it shows in the / menu.
- I typed / in Claude Code and saw it appear.
Keep going
Commands are just the start of making Claude Code your own.
Set up Claude Code first
New to the CLI? Install and authenticate Claude Code in 5 minutes.
Read the guideBuild apps with AI
BuildCheap — turn a prompt into a real web or mobile app, no login to start.
Start buildingMake a landing page with AI
The exact prompt + process to ship a clean landing page in minutes.
Read the guideLearn the whole workflow
My vibe-coding course — build real things with AI, start to finish.
Explore the courseIf you do only one thing: any prompt you've typed more than twice — turn it into a command. A week of saving prompts becomes a personal toolkit that makes you 10x faster.
Get the PDF + future guides
Drop your email and I'll send the printable PDF — plus the next guides as I make them.