Build your own slash commands | Claude Code
Easy peasy - most people don't know you can create custom /commands inside Claude Code. This can drastically improve speed and consistency, without having to type it out every. single. time. Here's the full setup: Step 1 — Create the folder - From your project root, run: mkdir -p .claude/commands (Want it available across all your projects? Use ~/.claude/commands/ instead) Step 2 — Create a .md file in that folder - The filename = the command name. Example: update-weather.md Step 3 -- Write the file Pick and mix from the three methods below. - Method 1: Static prompt command (e.g., "review.md") Review the current status file for: - Logic errors or edge cases - Naming clarity Give me a prioritized list, most critical first. Usage: /review → fires that exact prompt instantly. - Method 2: Command with arguments (e.g., "commit.md") Write a git commit message for: $ARGUMENTS Follow conventional commits format. Be specific, not generic. Usage: /commit added retry logic to the webhook handler The $ARGUMENTS placeholder gets replaced with whatever you type after the command. - Type 3: Context injection (no question needed, e.g., "scope.md") Before we start, here is the architecture context for this project: - Stack: Next.js + Supabase + GHL webhooks - Auth is handled by middleware, never in components Acknowledge this and wait for my next instruction. Usage: /scope at the start of any session to prime Claude before a big task. That's it. No config changes. I'd recommend just opening a new Claude Code thread, but you could just drop the file and the command is live.