Menu

Claude Code custom slash commands: how to create them (with examples)
📰

Claude Code custom slash commands: how to create them (with examples)

DEV Community: ai·Mohd Yusuf Khan·8 days ago
#vQi8a90X
#devtoai#devto#dev#claude#command
Reading 0:00
15s threshold

Originally published on Homingo Learn .

Custom slash commands in Claude Code turn a prompt you type every day into a one-word command, with arguments and live project context filled in before Claude reads it.

Custom commands and skills: the same thing now

Custom slash commands have been merged into skills. A file at .claude/commands/review.md and a skill at .claude/skills/review/SKILL.md both create /review and behave the same way; existing command files keep working. Claude can also run either one by itself when its description matches the task, unless you set disable-model-invocation: true . The single-file command is the quickest to write. Choose the skill folder when the command needs reference files or scripts next to it (see how to write a SKILL.md ). If both exist with the same name, the skill wins.

How to create a custom slash command (.claude/commands)

The file name becomes the command name. Subfolders become a namespace: .claude/commands/video/qa.md is /video:qa .…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.