What Are Slash Commands?
Slash commands are custom workflows you trigger by typing /command-name in Claude Code. They let you encode multi-step processes into a single invocation — no re-explaining, no copy-pasting prompts, no forgetting steps.
Think of them as programmable rituals. Instead of telling Claude "read my memory file, check the task board, summarize what I did yesterday, and plan today" every morning, you type /morning and it all happens automatically.
Anatomy of a Command File
Every slash command is a Markdown file stored in .claude/commands/. The filename becomes the command name: morning.md creates /morning.
Inside the file, you write plain English instructions that Claude follows when the command is invoked. The key insight: these are not code files. They are natural language procedures that Claude interprets and executes step by step.
- File location:
.claude/commands/name.mdfor project commands,~/.claude/commands/name.mdfor global commands - Naming: Use kebab-case.
wrap-up.mdbecomes/wrap-up - Structure: Start with a clear objective, then list sequential steps Claude should follow
- Scope: Project commands live in the repo. Global commands follow you across all projects
Essential Commands to Build
Three commands form the backbone of a productive AI workflow — your daily rituals:
- /morning: Read memory.md, check the task board, review yesterday's daily note, summarize current priorities, and plan today's work. This gives Claude full context at the start of every session.
- /sync: Mid-session refresh. Re-read memory.md, update any stale context, process the scratchpad, and recalibrate priorities. Use this after long breaks or context-heavy work.
- /wrap-up: End-of-day ritual. Summarize what was accomplished, update memory.md, write the daily note, clear the scratchpad, and flag anything blocking tomorrow's work.
These three commands alone eliminate the "cold start" problem where Claude forgets everything between sessions.
Dynamic Commands with $ARGUMENTS
Commands become truly powerful when they accept parameters. Use $ARGUMENTS as a placeholder in your command file, and Claude replaces it with whatever text the user provides after the command name.
For example, a review.md command containing "Review the file at $ARGUMENTS for bugs, security issues, and TypeScript best practices" lets you type /review src/lib/auth.ts and get a targeted code review instantly.
- Single argument:
/deploy staging— deploys to the staging environment - Multiple arguments:
/ticket BUG-123 high— creates a ticket with priority - Free-form text:
/research how to implement rate limiting— triggers a research workflow
Domain-Specific Commands
Beyond daily rituals, build commands tailored to your project's specific needs:
- /deploy: Run pre-flight checks, build the project, run tests, and deploy to the specified environment
- /release: Bump the version, update the changelog, tag the commit, and create a GitHub release
- /audit: Scan recent commits for security issues, type errors, missing tests, and code quality problems
- /onboard: Generate a comprehensive project overview for new team members joining the codebase
- /hotfix: Create a hotfix branch, apply the fix, run targeted tests, and prepare a PR
The best domain commands encode your team's tribal knowledge — the steps that live in someone's head or a rarely-consulted wiki page.
Practical Exercise
Build these three commands for your own workflow:
- Create
.claude/commands/morning.md— Write instructions for Claude to read your memory file, check your task board, and plan your day. Include at least 5 steps. - Create
.claude/commands/review.md— Write a code review command that uses $ARGUMENTS to accept a file path and checks for bugs, types, security, and best practices. - Create a domain-specific command — Pick a workflow unique to your project (deploy, migrate, report, etc.) and encode it as a slash command with at least 4 steps.
Ready to automate your entire workflow?
The AI Brain Pro package includes 30+ pre-built slash commands covering development, deployment, review, and team coordination.
View Pricing