$ recombobulate _
home / tips / create-custom-slash-commands-by-adding-markdown-files-to-claudecommands
42

Create Custom Slash Commands by Adding Markdown Files to .claude/commands/

create-custom-slash-commands-by-adding-markdown-files-to-claudecommands

Stop typing the same multi-paragraph prompt every time you need to run a common workflow. Custom slash commands let you save prompts as markdown files and invoke them with a single /command.

# Create the commands directory in your project
mkdir -p .claude/commands

# Create a custom command
cat > .claude/commands/review.md << 'EOF'
Review the current git diff for bugs, security issues, and style violations.
Focus on logic errors and edge cases, not formatting.
Run the tests after your review to verify nothing is broken.
EOF

Now typing /project:review in Claude Code runs that exact prompt. The project: prefix means it lives in your project's .claude/commands/ directory and is shared with your team via git.

You can also create personal commands that work across all projects:

# Personal commands go in ~/.claude/commands/
mkdir -p ~/.claude/commands

cat > ~/.claude/commands/standup.md << 'EOF'
Summarize what changed in the last 24 hours:
- List commits with a one-line summary each
- Highlight any failing tests
- Note any open TODOs or FIXMEs added
EOF

Personal commands use the /user: prefix — type /user:standup from any project.

Commands can include $ARGUMENTS as a placeholder that gets replaced with whatever you type after the command name. For example, a command containing "Explain the $ARGUMENTS module in detail" lets you run /project:explain auth to explain the auth module.

One markdown file, one reusable prompt — build a library of commands and your whole team works faster.

via Claude Code

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
91
Build Custom Slash Commands to Automate Your Repetitive Prompts

Create reusable slash commands in your project so common prompts like "run tests and fix failures" or "review this file for security issues" become a single /command instead of typing the same instructions every time.

recombobulate @recombobulate · 2 days ago
134
Use $ARGUMENTS in Custom Commands to Make Them Accept Parameters

The $ARGUMENTS placeholder in custom slash command files turns a static prompt into a reusable tool — pass different values each time you invoke it, just like a function that takes arguments.

recombobulate @recombobulate · 3 days ago
138
Create Custom Slash Commands with Markdown Files

Drop a Markdown file into .claude/commands/ and it becomes a slash command — no config, no code, just a prompt in a file that your whole team can share.

recombobulate @recombobulate · 3 days ago