Skip to main content
Code Guide
M09 Intermediate Methodology

Slash Commands

Create reusable custom commands

PDF
← All cards

Principle

A slash command is a Markdown file that defines a workflow. Claude executes it as if it had received that text as a prompt, with the ability to pass dynamic arguments.

CC 2.1.3: Custom slash commands now live in .claude/skills/ with disable-model-invocation: true. The old .claude/commands/ directory is no longer used for new projects.

File locations

.claude/skills/ # Project skills (team) — since CC 2.1.3
├── commit/
│ └── SKILL.md → /commit
├── review-pr/
│ └── SKILL.md → /review-pr
└── tech/
└── deploy/
└── SKILL.md → /tech:deploy
~/.claude/skills/ # Global skills (personal)
├── release/
│ └── SKILL.md → /release
└── sync/
└── SKILL.md → /sync

Global skills are available in all sessions, regardless of the project.

SKILL.md frontmatter for user-invocable skills

---
name: commit
description: Generate a conventional commit from staged changes
allowed-tools: [Read, Bash]
disable-model-invocation: true
---

The disable-model-invocation: true flag is what makes a skill user-only — it prevents the model from auto-loading it based on context matching.

Invocation and arguments

/commit # No argument
/tech:deploy production # Positional argument
/release minor # Version bump

In the Markdown body, arguments are accessible via variables:

Deploy to environment: $ARGUMENTS[0]
With strategy: $ARGUMENTS[1]
If no argument provided: use "staging" by default.

The $0, $1 syntax is equivalent to $ARGUMENTS[0], $ARGUMENTS[1]. The old dot notation ($ARGUMENTS.0) is deprecated since v2.1.19.

# Command Name
## Objective
What this command does in one sentence.
## Process
1. **Step 1** — detailed instructions
2. **Step 2** — detailed instructions
3. **Step 3** — detailed instructions
## Arguments
- $0: target environment (default: staging)
## Output format
Description of the expected result.

Native commands (built-in since recent versions)

CommandAvailable sincePurpose
/usagev2.1.118Token usage + per-model cost breakdown
/costv2.1.118(alias for /usage)
/statsv2.1.118(alias for /usage)
/recapv2.1.108Session summary
/undov2.1.108Revert last action
/tuirecentToggle terminal UI mode
/focusrecentSet focus area for current session
/ultrareviewv2.1.120Deep multi-pass review of a file or PR
/less-permission-promptsv2.1.111Reduce permission prompts (Max users)
/effortv2.1.111Set thinking effort level interactively
/proactiverecentToggle proactive suggestions

Useful custom skills (user-invocable) to create

CommandUsage
/commitAutomatic conventional commit
/review-prPR review against project criteria
`/release [patchminor
/syncMulti-file consistency check
/security-checkQuick config scan

Skill (user) vs Skill (auto) vs Agent

MechanismWhen to use
Skill (user-invocable)One-off workflow, procedure to follow — disable-model-invocation: true
Skill (model-invocable)Reusable knowledge + embedded resources — auto-loads on context match
AgentRecurring specialist with own memory

A user-invocable skill cannot embed additional reference files without a skill folder — for that, create a full skill directory with SKILL.md plus resource files. A skill has no persistent memory — for that, use an agent.

Practical tips

One skill, one responsibility. As soon as a skill does two distinct things, split it. Name with an action verb first (commit, release, sync) so that the intent is immediately readable in the list of available commands.

Enter your email to read the full card and get the complete PDF bundle.

All content is free and open-source. We just ask for your email.

PDF: