Claude Code custom slash commands: build your own /deploy, /review, /test
Claude Code custom slash commands: build your own /deploy, /review, /test Claude Code ships with built-in slash commands like /help, /clear, and /compact. But the real power is in custom commands —...

Source: DEV Community
Claude Code custom slash commands: build your own /deploy, /review, /test Claude Code ships with built-in slash commands like /help, /clear, and /compact. But the real power is in custom commands — project-specific shortcuts that run multi-step workflows with a single word. Here's exactly how to build them. What custom slash commands actually are Custom slash commands are Markdown files in a .claude/commands/ directory. When you type /deploy in Claude Code, it reads .claude/commands/deploy.md and executes whatever's in it as a prompt. That's it. No plugins, no config syntax — just Markdown files. your-project/ ├── .claude/ │ └── commands/ │ ├── deploy.md │ ├── review.md │ ├── test.md │ └── standup.md └── src/ The $ARGUMENTS variable Every custom command gets access to $ARGUMENTS — whatever text you type after the command name. /review src/auth.js Inside your review.md, $ARGUMENTS becomes src/auth.js. This makes commands composable: /review src/auth.js /review src/api/routes.js /review