Claude CodeBasicClaude Code
A prompt repeated more than twice: make it a slash command
A .md file in .claude/commands/ becomes a command the whole team can invoke the same way, without rebuilding the prompt.
The file name is the command name and subfolders build namespaces (security/audit.md becomes /security:audit). $ARGUMENTS receives what you type when invoking it, and allowed-tools, in the frontmatter, limits which tools it can use. Project commands are committed; personal ones go in ~/.claude/commands/. Claude discovers new files without restarting.
Example
# .claude/commands/review-pr.md --- description: Review a pull request against the security checklist allowed-tools: Read, Bash(git *) --- ## PR Review: $ARGUMENTS Run `git diff main` and check: no credentials in the changes, no eval(), no new network calls without logging. Close with: approved / needs changes / blocked, citing file and line. # Usage /review-pr 847