Claude Code has built-in slash commands. Most devs stop there.
You can create your own — any workflow you repeat becomes a one-word command.
Full guide at stacknotice.com/blog/claude-code-custom-commands-2026
How it works
Create .claude/commands/ in your project root. Each file becomes a slash command:
.claude/commands/review.md → /review
.claude/commands/add-tests.md → /add-tests
.claude/commands/deploy-check.md → /deploy-check
The file content is the prompt. No special syntax needed.
Your first command
<!-- .claude/commands/review.md -->
Review the current changes.
Check:
- Auth before any DB mutation
- Zod validation on all inputs
- CLAUDE.md convention compliance
- Error handling on async operations
Numbered list, file:line. Skip style and naming.
Now just type /review in any session.
Using $ARGUMENTS
<!-- .claude/commands/add-tests.md -->
Add tests for $ARGUMENTS.
Use Vitest. Happy path + one edge case + one error case.
Test behavior, not implementation. Match existing test style.
> /add-tests src/lib/stripe/webhooks.ts
Commands worth building immediately
/deploy-check — run before every deploy:
We're about to deploy to production.
Flag anything you would not ship right now.
One sentence per issue, most critical first.
If safe: say "Ready to deploy" and nothing else.
/security — focused security audit:
Security review of $ARGUMENTS.
Check: missing auth, ownership verification, unvalidated inputs, exposed secrets.
Issues only. No compliments.
/commit — generate commit messages:
Write a git commit message for staged changes.
Imperative mood, max 72 chars. Describe what changed and why.
Output the message only — don't run the commit.
Share with the team
git add .claude/commands/
git commit -m "add team Claude Code commands"
Every dev gets the same commands on pull. One push, team-wide consistency.
Personal vs project commands
-
Project:
.claude/commands/— this repo only -
Global:
~/.claude/commands/— all your projects
Project commands override global ones if names match.
Full guide with more examples at stacknotice.com/blog/claude-code-custom-commands-2026
Top comments (1)
Hey stacknotice, I'm interested in automating repetitive workflows. Clypify's AI-powered content tools can help you streamline your content workflow and save time. Free plan at clypify.com — no card needed.