BeCuriouzBeCuriouz

Learn something new every day

🛠️ Tools & Services
⚡

The fastest way to stop repeating yourself to Claude Code

💡 A slash command is just a Markdown file whose name becomes /command and whose contents become a reusable prompt — with $ARGUMENTS for input.

Every team has that one prompt they paste over and over — "review this diff for security issues," "write a conventional commit message," "explain this file to a new hire." In Claude Code, you can turn any such prompt into a slash command: a reusable shortcut you invoke by typing /name.

The mechanic is refreshingly simple. Drop a Markdown file into a commands folder and its filename becomes the command. A file at .claude/commands/security-review.md creates /security-review, shared with everyone on the repo. Put it in ~/.claude/commands/ instead and it becomes personal — available in every project you touch. The file's contents are simply the prompt Claude runs.

What makes them more than snippets is arguments. Inside the file, the placeholder $ARGUMENTS gets replaced by whatever you type after the command, so /fix-issue 123 can feed "123" straight into the prompt. Commands can also run shell steps and reference files, turning a repeated workflow into one keystroke.

The deeper idea: slash commands are documentation that executes. Instead of a wiki page describing how your team reviews code, the process lives as a command everyone runs the same way — knowledge that can't drift out of sync with practice.

⚡ The fastest way to stop repeating yourself to Claude Code — BeCuriouz