Skip to main content
A command is a Markdown file that becomes a slash command. Typing /generate-tests src/cart.ts sends the file’s body to Claude, with $ARGUMENTS replaced by what you typed after the name.
Written to .claude/commands/generate-tests.md, available as /generate-tests.

Anatomy

.claude/commands/generate-tests.md
Project commands (.claude/commands/) are shared with anyone who clones the repository. To have a command in every project, move the file to ~/.claude/commands/.

Commands or skills?

Use a command when you decide when it runs. Use a skill when Claude should decide, based on the task. Claude Code also exposes skills in the / menu, so the line between them is mostly who triggers it. Browse all commands at aitmpl.com/commands.