If you use Claude Code every day, you already type the same prompts over and over: “review this diff”, “write a commit message from these changes”, “summarise what changed since yesterday”. Claude Code slash commands turn those repeated prompts into a single keystroke. Type /commit and Claude Code runs the whole workflow — no pasting, no re-explaining, no drift between sessions.
This guide covers the built-in commands worth memorising, how to build your own custom commands in about a minute, and the one 2026 change that makes most older tutorials wrong: custom commands have been merged into skills. Everything below was checked against the official Claude Code documentation on 15 November 2026, so the file paths, frontmatter fields, and argument syntax here are current.
What Claude Code slash commands actually are
A slash command is anything you invoke by typing / at the start of a message. Claude Code shows every command available in that session; keep typing letters to filter the list. Anything you type after the command name becomes its arguments — /compact focus on the auth changes passes “focus on the auth changes” to /compact.
There are three kinds of entries in that / menu:
- Built-in commands — fixed logic coded into the CLI, such as
/clearor/model. - Bundled skills — prompt-based commands that ship with Claude Code, such as
/code-review,/loop,/debug, and/batch. They hand Claude detailed instructions and let it do the work with its tools. - Your own commands — skills or command files you write yourself, plus prompts exposed by MCP servers.
One rule governs all three: a command only runs when it starts your message. If you write go ahead and /deploy to staging, nothing runs directly — the name only counts as your permission for Claude to run it while it responds. To write about a command without permitting a run, leave off the slash.
The built-in Claude Code slash commands worth memorising
The full commands reference lists more than a hundred entries, and not every command shows for every user — availability depends on your version, plan, and platform. Treat /help as the source of truth on your machine. These are the ones that cover most daily work:
| Command | What it does |
|---|---|
/help |
Lists everything available right now, including custom commands and plugin-provided ones. |
/clear |
Starts a new conversation with empty context. Add a name to label the old one in the /resume picker. |
/compact |
Summarises the conversation so far to free context, keeping the important decisions and state. |
/init |
Generates a starter CLAUDE.md for the project. |
/model |
Switches the model for the session. |
/resume / /rewind |
Reopen a past session, or restore the conversation and files to an earlier checkpoint. |
/usage |
Shows what the session is costing you. |
/permissions |
Reviews and edits the permission rules for the session. |
/status |
Shows session info, including whether managed settings apply. |
/config |
Opens settings — this is also where editor mode lives now, since /vim was removed. |
/ide |
Connects the editor integration for VS Code (and forks) or JetBrains IDEs. |
/mcp |
Manages MCP servers and their prompts, which can also appear as slash commands. |
Two bundled skills deserve special mention. /doctor runs a setup checkup: installation health, unused skills and MCP servers, CLAUDE.md files that duplicate checked-in ones, permission suggestions, and — on Claude Code v2.1.305 or later — usage recommendations measured over the last 7 days. It reports findings first and asks before changing anything. Run claude doctor in your terminal instead if you want read-only diagnostics without starting a session.
/run and /verify launch your app and confirm a change against the running app instead of tests alone. They infer the launch from your project type and README, package.json, or Makefile. When that inference is unreliable — a database, an env file, a multi-step build — /run-skill-generator records the recipe once as a skill at .claude/skills/run-<name>/, and every later run follows it.
The 2026 change: custom commands are now skills
If you followed a Claude Code tutorial from before mid-2026, it probably told you to drop a Markdown file into .claude/commands/. That still works — the official docs are explicit that the older format keeps working. But Anthropic has merged custom commands into the skills system, and the skill format is what you should write for new work, because a skill folder can hold supporting files alongside the instructions.
The two formats create exactly the same thing. A file at .claude/commands/deploy.md and a skill at .claude/skills/deploy/SKILL.md both create /deploy and work the same way. The difference is only what you can put around the instructions: a skill can reference checklists, templates, and scripts in its folder, while a command file is a single Markdown document.
Skills follow the Agent Skills open standard, which works across multiple AI tools, with Claude Code extensions on top. The practical payoff for you is context: unlike CLAUDE.md content, which loads into every session, a skill’s body loads only when it is used. Only its description sits in context until then, so a long reference document costs almost nothing until you actually invoke it.
How to create a custom slash command in 60 seconds
A custom command is a folder named after the command, containing a SKILL.md file. The frontmatter carries the name and description; the body is the prompt Claude runs.
Step 1: pick where it lives
| Location | Path | Who gets it |
|---|---|---|
| Personal | ~/.claude/skills/<name>/SKILL.md |
You, in every project on this machine |
| Project | .claude/skills/<name>/SKILL.md |
Everyone on the repo, once you commit it |
| Nested | <subdir>/.claude/skills/<name>/SKILL.md |
Sessions started in or below that subdirectory |
| Plugin | <plugin>/skills/<name>/SKILL.md |
Wherever the plugin is enabled, as /plugin-name:skill-name |
Project skills are the team play: commit .claude/skills/ and your whole team gets /release-notes or /code-review for free. Personal skills are for your own workflows — a /standup command that only makes sense for you.
Step 2: write the file
Save this as .claude/skills/summarize-changes/SKILL.md:
---
name: summarize-changes
description: Summarize uncommitted changes and flag anything risky. Use when asked about current changes.
---
Summarize the uncommitted changes in this git repository.
!`git status --short`
!`git diff HEAD --stat`
For each changed file, say what changed in one line. Flag anything risky: secrets, migrations, config changes, or deletions. Do not edit any files.
Only name and description are required. The description is the most important line in the file: it is what Claude matches against when it decides whether to run your skill on its own, so write it like a trigger — what the command does, and when to use it. The body becomes the system prompt for that run.
Claude Code watches the skills folders and picks up changes within seconds, so there is nothing to restart once the folder exists. The old /agents wizard no longer exists — since v2.1.198 it only reminds you to ask Claude or edit the folders yourself. The fastest route is a sentence: “Create a project skill in .claude/skills/ that reviews my uncommitted changes, is read-only, and uses Haiku.” Claude writes the file; read it before you rely on it.
Pass arguments to your commands
Whatever you type after the command name is available inside the skill through placeholders. The official docs define four:
| Placeholder | What it expands to |
|---|---|
$ARGUMENTS |
Everything typed after the command name, as one string |
$ARGUMENTS[N] |
One argument by 0-based index — $ARGUMENTS[0] is the first |
$N |
Shorthand for $ARGUMENTS[N] — $0 is the first argument, $1 the second |
$name |
A named argument declared in the arguments frontmatter list, mapped to positions in order |
Wrap multi-word values in quotes to pass them as a single argument: /my-skill "hello world" second makes $0 expand to hello world and $1 to second. Two edge cases trip people up. An indexed placeholder with no argument at its position — $2 when only one argument was passed — stays in the content unchanged. And if your skill body contains no placeholder at all, Claude Code appends ARGUMENTS: <your input> to the end, so Claude still sees what you typed.
Named arguments read better in a team-shared skill. Declare them in frontmatter and use the names in the body:
---
name: fix-issue
description: Work a GitHub issue end to end. Use when given an issue number.
arguments: [issue, branch]
---
Fix GitHub issue #$issue on branch $branch. Read the issue, reproduce it, fix it, and run the tests. Do not merge.
Run it as /fix-issue 123 fix/login-race and $issue becomes 123, $branch becomes fix/login-race. A named placeholder with no matching argument expands to an empty string rather than staying literal.
Pull live data into a command before Claude reads it
A skill body is static text — unless you inject live data. A line starting with ! followed by a backticked shell command runs before Claude sees the file, and the output replaces the line. The summarize-changes example above uses this: !`git diff HEAD` puts the real diff into the prompt, so the summary is grounded in your actual working tree instead of whatever Claude can guess from open files.
Use it for anything that is stale the moment you write it down: the current diff, the failing test output, the list of open PRs, the contents of a log file. Two substitutions help you reference files reliably inside those commands:
${CLAUDE_SKILL_DIR}— the directory containing the skill’sSKILL.mdfile. Use it to reference scripts bundled with the skill, regardless of the current working directory.${CLAUDE_PROJECT_DIR}— the project root. Use it for project-local scripts, such as${CLAUDE_PROJECT_DIR}/.claude/hooks/helper.sh.
Keep injected commands read-only by default. A skill that runs git diff is safe to auto-invoke; a skill that runs git push is not, and the next section is how you keep Claude from deciding to run it.
Control when Claude can run your command
By default, both you and Claude can invoke any skill. Claude loads a skill automatically when your request matches its description. Two frontmatter fields let you restrict that:
disable-model-invocation: true— Claude cannot invoke the skill on its own. Only you can start it with/name. Use this for workflows with side effects or timing you want to control, like/commit,/deploy, or/send-slack-message. You do not want Claude deciding to deploy because your code looks ready. A skill with this field set does not even put its description in Claude’s context.user-invocable: false— only Claude can invoke the skill. Use this for background knowledge that is not actionable as a command: a skill explaining how an old system works is useful for Claude to know when relevant, but/legacy-system-contextis not a meaningful action for a user to type.
Two more fields matter for real workflows. allowed-tools pre-approves tools for the turn that invokes the skill, so Claude can use them without prompting you — but the grant clears when you send your next message, and it does not restrict which tools are available. The official docs carry a warning worth heeding: a skill can grant itself broad tool access, so review the allowed-tools of skills checked into a repository before you run Claude Code there. context: fork runs the skill in its own subagent context instead of your conversation — the subagent does not see your history, so the skill’s instructions have to stand on their own. Pair it with agent: Explore for a read-only review pass, or leave the agent unset for a general-purpose fork.
One more behaviour to know: if your repo has a skill named verify or simplify in place, Claude Code’s commit instructions tell Claude to run it right before each commit, except for changes to docs or tests. That is how you turn a slash command into a gate.
Five copy-paste commands to start with
These are the five commands that earn their keep fastest. Save each one as .claude/skills/<name>/SKILL.md in the repo, or under ~/.claude/skills/ if it is personal.
1. /commit — write the message from the real diff
---
name: commit
description: Write a commit message from the real diff and commit it. Use when asked to commit.
disable-model-invocation: true
allowed-tools: Bash(git diff:*), Bash(git status:*), Bash(git add:*), Bash(git commit:*)
---
!`git status --short`
!`git diff HEAD`
Write a conventional-commit message from the diff above. One line summary under 72 characters, then a body only if the change needs explaining. Stage the changed files and commit. Do not push.
The disable-model-invocation line is the point: committing is a side effect, so only you trigger it.
2. /fix-issue — work a GitHub issue end to end
---
name: fix-issue
description: Work a GitHub issue end to end. Use when given an issue number.
arguments: [issue]
allowed-tools: Bash(gh issue view:*), Bash(gh issue comment:*)
---
Fix GitHub issue #$issue. Read the issue with `gh issue view $issue`, reproduce the bug, fix it, and run the affected tests. Report what changed and what you verified. Do not merge and do not close the issue.
3. /review-diff — a second opinion that cannot touch your files
---
name: review-diff
description: Review the uncommitted diff for bugs and security issues. Use before committing.
context: fork
agent: Explore
---
!`git diff HEAD`
Review this diff as a senior engineer. List real bugs, security issues, and logic errors with file and line. Skip style nits. Do not edit any files.
Running it as a fork means the review happens in its own context window, and only the findings come back to your session.
4. /standup — your own command for every repo
---
name: standup
description: Summarize yesterday's and today's work for standup. Personal command.
---
!`git log --since="yesterday" --oneline --author="$(git config user.name)"`
!`git status --short`
Write a three-bullet standup update: what I finished yesterday, what I am working on today, and anything blocked. Keep it under 80 words.
Keep this one personal, under ~/.claude/skills/ — your standup format is not your team’s business.
5. /changelog — draft the release notes from the log
---
name: changelog
description: Draft changelog entries from commits since the last tag. Use when preparing a release.
---
!`git log $(git describe --tags --abbrev=0)..HEAD --oneline`
!`git tag --sort=-v:refname | head -5`
Draft changelog entries grouped under Added, Fixed, and Changed, one line per commit, in the project's existing changelog voice. Do not write the file; show the draft for review.
Share commands with your team — and keep them safe
Project skills ship with the repo. Commit .claude/skills/ and everyone who clones gets the commands. That is the whole pitch — a team’s workflows become version-controlled code, reviewed in pull requests like everything else. Three rules keep that safe:
- Review
allowed-toolsin pull requests. A skill that pre-approvesBash(*)hands Claude a blank cheque for the invoking turn. Approve the tool list the way you would approve a dependency. - Put side effects behind
disable-model-invocation: true. Deploy, publish, and send-message commands should never fire because Claude thought the moment was right. - Keep secrets out of skill files. A skill that needs a token should read it from the environment or the project’s existing secret setup, never from a string committed to the repo.
Plugins namespace their skills, so a skill in my-plugin/skills/review/SKILL.md becomes /my-plugin:review. The same colon namespacing works for command files in subdirectories: .claude/commands/frontend/component.md becomes /frontend:component. If two definitions share a name, a personal skill beats a project skill, and a skill beats a .claude/commands/ file with the same name.
When your command does not show up
The most common failures, in the order to check them:
- The name has a bad character. Claude Code refuses command names containing a zero-width space, a control character, a private-use glyph,
<or>, or odd spacing such as a no-break space or two spaces in a row. Rename the folder or file. To find the refused name, start Claude Code withclaude --debugand search the debug log for[names]. - The file is in a directory Claude Code does not watch yet. Skills in a
.claude/skills/directory below where you started do not load at startup — they load the first time Claude reads or edits a file in that subdirectory. Move the skill up, or run/add-dirwith the subdirectory. - A reserved name. Do not name a skill folder
synced, and do not useanthropic-skillsor a name starting with it outside a plugin — those names do not load. - A name collision. Check the precedence rules above: a personal skill or another skill with the same name may be winning.
- You are in a cloud session. Personal skills do not run in Cowork or cloud sessions, and project skills do not load in cloud threads in a project. That is by design, not a bug.
After a rename or a name: edit, restart the session — unless the file is in a directory Claude Code watches for changes, in which case the fix picks up within seconds.
Slash commands, subagents, and hooks — which one do you need?
Claude Code has three extension points and they solve different problems. A slash command is a reusable prompt you trigger on purpose. A subagent is a separate worker Claude delegates to when a task matches its description — you define those as Markdown files in .claude/agents/, and they run in their own context window and return only a summary. A hook is code that runs automatically on an event, like before a tool call. If you find yourself typing the same instructions, write a command. If Claude keeps doing noisy side work that only needs a summary back, write a subagent. If something should happen every time without anyone asking, write a hook.
Start with one command. Pick the prompt you typed three times this week, save it as a skill, and use it tomorrow. The compounding is the point: each command is a small, version-controlled piece of your workflow that every future session — and every teammate who clones the repo — gets for free.
Further Reading & References
- Extend Claude with skills — Claude Code Docs — the official reference for everything in this post: skill locations, frontmatter, arguments, and invocation control.
- Agent Skills — the open standard — the standard Claude Code skills follow, which works across multiple AI tools.
- Claude Code Slash Commands: Built-in and Custom Guide — claudcod.com — a thorough walkthrough of the built-in set and the commands-to-skills merge, checked against the official docs.
- Claude Code Custom Slash Commands: 8 Examples to Copy — agentkitco.com — eight copy-paste commands with arguments, live data, and precedence rules, checked against Anthropic’s docs on 22 October 2026.
- The Complete Guide to Claude’s Slash Commands & Shortcuts — garagelabstech.com — the full built-in list plus the commands-vs-skills format comparison.
- Claude Code Slash Commands: The Ones That Matter and How to Write Your Own — kaku.tw93.fun — the daily set, custom commands as Markdown files, and three commands to copy.
- Slash Commands and Settings — dive.vladyslavpodoliako.com — a cheat sheet verified against the official Claude Code docs, including the
/ideeditor integration. - Claude Code Subagents: How to Use Them vs Parallel Sessions — teleclod.com — the companion piece for when a command is not enough and you need a separate worker.
Verified 15 November 2026 against the official Claude Code documentation. Claude Code changes quickly — if a command in this post does not exist on your machine, /help is the source of truth.


