# Claude Code custom slash commands: make your own

> Make your own Claude Code slash commands: one Markdown file in .claude/commands or a skill, with arguments, shell output and allowed tools. With examples.

Source: https://shuriken.sh/guides/claude-code-custom-slash-commands

Make your own Claude Code slash commands: one Markdown file in .claude/commands or a skill, with arguments, shell output and allowed tools. With examples.

By Shuriken Updated 27 October 2026 3 min read

**Contents**

A Claude Code custom slash command is a Markdown file. Save a prompt as .claude/commands/review.md and typing /review sends it. Since Anthropic merged commands into skills, .claude/skills/review/SKILL.md does the same job and can carry extra files. Frontmatter adds a description, arguments, allowed tools and a model.

We use saved commands for the prompts we would otherwise paste ten times a day: review this diff, write the release note, fix this issue. Here is how to make one, with every field Anthropic documents as of 23 October 2026.

## Commands and skills: what changed #

Anthropic's [slash command docs](https://code.claude.com/docs/en/slash-commands) say it plainly: "A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. Your existing .claude/commands/ files keep working."

So you can pick either shape:

| | Command file | Skill |
| --- | --- | --- |
| Where | .claude/commands/<name>.md | .claude/skills/<name>/SKILL.md |
| For every project on your computer | (not documented for command files) | ~/.claude/skills/<name>/SKILL.md |
| Extra files beside it | No | Yes, in the skill's folder |
| Claude can load it by itself | Yes, unless you turn it off | Yes, unless you turn it off |

A single file is enough for a saved prompt. Reach for a skill when the command needs a script or a template next to it. Our guide on [skills, subagents and MCP](https://shuriken.sh/guides/claude-code-skills-vs-subagents) covers when each fits.

## How to make your first command #

- In your project, create the folder .claude/commands/.
- Add a file named after the command, for example review.md.
- Write the prompt as plain Markdown.
- Start Claude Code in that project and type /review.

A minimal file:

markdown
Review the staged changes. List bugs first, then risky changes,
then style notes. Quote file and line for each.

Commit the folder and everyone on the project gets the same command. That's the main reason to prefer a command over a note in [CLAUDE.md](https://shuriken.sh/guides/claude-md-best-practices): CLAUDE.md loads into every session, a command loads only when you ask for it.

## Frontmatter fields you can use #

Frontmatter sits between --- lines at the top of the file. Claude Code reads it only when the opening --- is the first line. Every field is optional; the docs recommend at least a description.

| Field | What it does |
| --- | --- |
| description | What the command does and when to use it. Without it, the first non-empty line is used |
| argument-hint | The hint shown while you type, such as [issue-number] |
| allowed-tools | Tools Claude may use without asking during the turn the command starts, such as Bash(git add *) . The grant ends with your next message |
| model | The model for that turn only. It isn't saved to your settings |
| disable-model-invocation | true means only you can start it; Claude won't load it by itself |

Field names must match exactly. The docs note that an unknown field is ignored without an error, so a typo fails quietly.

## Arguments: $ARGUMENTS, $0 and $1 #

Everything you type after the command name is its argument:

- $ARGUMENTS is all of it.
- $0, $1, $2 are single arguments, counted from zero.
- Quotes group words: /migrate "Search Bar" JavaScript TypeScript gives $0 the value Search Bar.

If the file has no placeholder, Claude Code adds ARGUMENTS: <what you typed> to the end of the prompt.

The example from Anthropic's docs, slightly trimmed:

markdown
---
description: Fix a GitHub issue
argument-hint: [issue-number]
disable-model-invocation: true
---

Fix GitHub issue $ARGUMENTS following our coding standards.

/fix-issue 123 sends "Fix GitHub issue 123 following our coding standards."

Shuriken runs your coding agents on your own computers and keeps them going when an account hits its limit.

[Download](https://shuriken.sh/download)

## Put live output in the prompt with ! #

A line starting with !`command` runs that shell command before the prompt goes to Claude, and its output replaces the line:

markdown
## Context
- Staged diff: !`git diff --staged`
- Branch: !`git branch --show-current`

Write a commit message for the staged diff.

Three rules from the docs are worth knowing before you rely on it:

- A command that fails (exits non-zero) cancels the whole slash command. Claude never sees the prompt.
- The shell commands are checked against your [permission rules](https://shuriken.sh/guides/claude-code-permission-rules). One that isn't pre-approved cancels the command instead of asking.
- An admin can switch this off with "disableSkillShellExecution": true.

## Group commands in folders #

Subfolders become a prefix with a colon. .claude/commands/frontend/component.md is /frontend:component. Useful once a project has more than a handful.

## Commands worth making first #

Start with the prompts you already repeat. Three pay off in most repositories.

- /review runs your review checklist on the staged diff (see above).
- /release-note summarises git log since the last tag into your changelog's format.
- /fix-issue reads the issue with gh issue view $ARGUMENTS, writes a failing test, fixes it and runs the tests.

Keep each one short. A command is still a prompt, and the advice in our guide to [writing prompts for Claude Code](https://shuriken.sh/guides/prompts-for-claude-code) applies: say what done looks like and how to check it.

## Using your commands in Shuriken #

Shuriken runs Claude Code itself, so your project's .claude/commands/ and .claude/skills/ folders work the same in a Shuriken chat as in the terminal. Commit them and every chat's worktree checks them out too. If a chat moves to another of your accounts when one nears its limit, the commands come along, because they belong to the project, not the account.

Share

[X](https://x.com/intent/post?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-custom-slash-commands&text=Claude%20Code%20custom%20slash%20commands%3A%20make%20your%20own)[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-custom-slash-commands)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-custom-slash-commands&t=Claude%20Code%20custom%20slash%20commands%3A%20make%20your%20own)[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-custom-slash-commands&title=Claude%20Code%20custom%20slash%20commands%3A%20make%20your%20own)[E-mail](mailto:?subject=Claude%20Code%20custom%20slash%20commands%3A%20make%20your%20own&body=https%3A%2F%2Fshuriken.sh%2Fguides%2Fclaude-code-custom-slash-commands)

## Sources

- [Claude Code docs: Slash commands (custom commands and skills)](https://code.claude.com/docs/en/slash-commands) (accessed 23 October 2026)
- [Claude Code docs: Best practices (Create skills)](https://code.claude.com/docs/en/best-practices) (accessed 23 October 2026)

## Frequently asked questions

**Where do custom slash commands go in Claude Code?**

Put a Markdown file in .claude/commands/ in your project, for example .claude/commands/review.md for /review. A skill at .claude/skills/review/SKILL.md makes the same command and can add supporting files.

**Are custom slash commands the same as skills now?**

Anthropic's docs say custom commands have been merged into skills. A command file and a skill with the same name both create the same /command, and existing .claude/commands files keep working.

**How do I pass arguments to a custom command?**

Use $ARGUMENTS for everything after the command, or $0, $1 and so on for single arguments. Quoted words count as one argument, so /migrate "Search Bar" JS TS gives $0 the whole name.

**Can a slash command run a shell command first?**

Yes. A line with !`git status --short` runs before the prompt is sent, and its output takes the line's place. If that command fails, the whole command is cancelled.

**How do I stop Claude from running my command by itself?**

Add disable-model-invocation: true to the file's frontmatter. Then only you can start it by typing the slash command.

Shuriken

The harness for your coding agents.

Run Claude Code, Codex and Gemini CLI on your own computers, move chats to your next account at a limit, and follow every chat from any device.

[Download](https://shuriken.sh/download)

[Other platforms](https://shuriken.sh/download#main)

## Keep reading

- [Claude Code keyboard shortcuts and commands cheat sheet: Guide 27 Oct 2026 5 min read Every Claude Code keyboard shortcut worth knowing, for Mac and Windows, plus the slash commands that matter. One page, checked against Anthropic's docs.](https://shuriken.sh/guides/claude-code-keyboard-shortcuts)
- [How to change the model in Claude Code: Guide 27 Oct 2026 3 min read Change the model in Claude Code with /model, claude --model, an environment variable or settings.json. /model wins; Enter in its picker sets your default.](https://shuriken.sh/guides/change-model-in-claude-code)
- [Claude Code API Error 400 on tool_use: what to do: Guide 27 Oct 2026 4 min read A Claude Code API Error 400 about tool use means the saved history has a tool call out of step with its result. Update, then rewind past the broken turn.](https://shuriken.sh/guides/claude-code-api-error-400-tool-use)
- [Claude Code thinking and effort levels, explained: Guide 27 Oct 2026 4 min read Claude Code's effort levels, low to max, set how much Claude thinks before it acts. What each level is for, the defaults, ultrathink, and how to set it.](https://shuriken.sh/guides/claude-code-effort-levels)
- [Claude Code chat history deleted? Set cleanupPeriodDays: Guide 27 Oct 2026 5 min read Claude Code deletes session transcripts after 30 days by default. Raise cleanupPeriodDays in settings.json to keep them, and back up what you can't lose.](https://shuriken.sh/guides/claude-code-history-deleted-after-30-days)
- [Claude Code hooks not working? Why they don't fire: Guide 27 Oct 2026 6 min read A Claude Code hook that never fires is either not loaded (missing from /hooks) or loaded with a matcher that matches nothing. The causes and their fixes.](https://shuriken.sh/guides/claude-code-hooks-not-working)
- [Does Claude Code remember between sessions? How memory works: Guide 27 Oct 2026 6 min read Does Claude Code remember between sessions? Only through CLAUDE.md files and auto memory. A past chat comes back only when you resume it.](https://shuriken.sh/guides/claude-code-memory-between-sessions)

## Free tools

- [Claude limit reset tracker](https://shuriken.sh/tools/limit-resets/claude)
- [Codex limit reset tracker](https://shuriken.sh/tools/limit-resets/codex)
