Claude Code slash command generator

Describe the command, add arguments and allowed tools, and get a ready-to-save skill or .claude/commands file — plus the full list of built-in Claude Code commands.

Start from a recipe
Format
Scope
allowed-tools — pre-approved while the command runs (clears on your next message)
Bash(gh issue view *)
No issues found
Save as

.claude/skills/fix-issue/SKILL.md

Run it as /fix-issue [issue-number]

---
description: Fix a GitHub issue
argument-hint: "[issue-number]"
allowed-tools: Bash(gh issue view *)
disable-model-invocation: true
---

Fix GitHub issue $ARGUMENTS following our coding standards.

1. Read the issue with `gh issue view $ARGUMENTS`
2. Understand the requirements and find the relevant code
3. Implement the fix
4. Write tests that fail before the fix and pass after
5. Create a commit that references the issue
Or create it from your terminal (run in the project root)
mkdir -p .claude/skills/fix-issue && cat > .claude/skills/fix-issue/SKILL.md <<'EOF'
---
description: Fix a GitHub issue
argument-hint: "[issue-number]"
allowed-tools: Bash(gh issue view *)
disable-model-invocation: true
---

Fix GitHub issue $ARGUMENTS following our coding standards.

1. Read the issue with `gh issue view $ARGUMENTS`
2. Understand the requirements and find the relevant code
3. Implement the fix
4. Write tests that fail before the fix and pass after
5. Create a commit that references the issue
EOF

The quoted 'EOF' keeps $ARGUMENTS and backticks literal, so the shell doesn't expand them. Claude Code picks up new skills without a restart; run /reload-skills if it doesn't show up.

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

1. Read the issue with `gh issue view 123`
2. Understand the requirements and find the relevant code
3. Implement the fix
4. Write tests that fail before the fix and pass after
5. Create a commit that references the issue

! commands run on your machine when the command is invoked; here they show as placeholders.

  • /add-dir<path>
    Add a working directory Claude can read and edit for the rest of the session
  • /advisor[model|off]
    Turn the advisor tool on or off — a second model consulted at key moments
  • /agents
    Points you at creating subagents by asking Claude or editing .claude/agents/ (older versions opened a manager UI)
  • /artifacts
    List your artifacts, then attach one to the session, open it, or copy its link
  • /auto-mode-setup
    Draft auto mode environment rules from your project and save them to user settings
  • /autocompact[auto|<tokens>]
    Set how full the context window gets before Claude Code compacts automatically
  • /autofix-pr[prompt]
    Start a cloud session that watches your branch's PR and pushes fixes for CI failures and review comments
  • /background[prompt]
    Detach this session to keep running as a background agent · alias /bg
  • /batch<instruction>
    Bundled skillPlan a codebase-wide change, split it into independent units, and run each in its own worktree
  • /branch[name]
    Branch the conversation here to try another direction without losing this one
  • /btw[question]
    Ask a side question without adding it to the conversation history
  • /bug[report]
    Report a bug or share the conversation, after a consent screen · alias /share
  • /cd<path>
    Move the session to another working directory, keeping the conversation
  • /chrome
    Configure Claude in Chrome
  • /claude-api[migrate|upgrade|…]
    Bundled skillLoad Claude API and Managed Agents reference for your project's language
  • /clear[name]
    Start a new conversation with empty context (project memory stays) · alias /reset, /new
  • /code-review[level] [--fix] [--comment] [pr#|branch|path]
    Bundled skillReview the current diff or a PR for correctness bugs; --fix applies findings, ultra runs a deep cloud review · alias /review
  • /color[color|default]
    Set the prompt bar color for this session
  • /compact[instructions]
    Summarize the conversation so far to free up context, optionally with focus instructions
  • /config[key=value …]
    Open settings (theme, model, output style…) or set keys directly, e.g. /config theme=dark · alias /settings
  • /context[all]
    Show what's filling the context window as a colored grid, with suggestions
  • /copy[N]
    Copy the last (or nth-latest) response, or pick individual code blocks
  • /cost
    Alias for /usage
  • /dataviz[request]
    Bundled skillDesign guidance for charts, graphs, and dashboards
  • /debug[description]
    Bundled skillTurn on debug logging for the session and troubleshoot from the log
  • /deep-research<question>
    WorkflowFan out web searches, cross-check sources, and write a cited report
  • /design[brief]
    Bundled skillDraft UI mockups and screen flows as artboards on a design canvas
  • /design-login
    Authorize design-system access for /design-sync
  • /design-sync[hint]
    Bundled skillConvert your repo's React design system and upload it to Claude Design
  • /desktop
    Continue this session in the Claude Code desktop app · alias /app
  • /diff
    Review the changes in your working tree, including Claude's edits
  • /doctor
    Bundled skillSetup checkup: diagnose install, settings, unused skills and slow hooks, and offer fixes · alias /checkup
  • /effort[level|auto|status]
    Set the effort level: low, medium, high, xhigh, max, ultracode, or auto
  • /exit
    Exit the CLI (detaches from a background session) · alias /quit
  • /export[filename]
    Export the conversation as plain text to a file or the clipboard
  • /fast[on|off]
    Toggle fast mode
  • /feedback[report]
    Send product feedback about Claude Code
  • /fewer-permission-prompts
    Bundled skillScan your transcripts for common read-only commands and add an allowlist to project settings
  • /focus
    Toggle the focus view: last prompt, a tool summary, and the final answer (fullscreen only)
  • /fork[prompt]
    Copy the conversation into a new background session and keep working here
  • /goal[condition|clear]
    Keep Claude working across turns until a condition is met
  • /heapdump
    Write a heap snapshot for diagnosing memory use (hidden — type it in full)
  • /help
    Show help and the commands available to you
  • /hooks
    Browse your configured hooks by event (read-only)
  • /ide
    Manage IDE integrations and show their status
  • /import[codex|gemini|cursor]
    Bring instructions, MCP servers, commands, and skills over from another coding agent
  • /init
    Initialize the project with a CLAUDE.md guide
  • /insights
    Generate an HTML report analyzing your recent sessions
  • /install-github-app
    Install the Claude GitHub app and optional actions workflows for a repo
  • /install-slack-app
    Install the Claude Slack app
  • /keybindings
    Open your keyboard shortcuts file
  • /list-agents
    List the subagents, teammates, and sessions Claude can message · alias /peers
  • /login
    Sign in to your Anthropic account
  • /logout
    Sign out of your Anthropic account
  • /loop[interval] [prompt]
    Bundled skillRun a prompt repeatedly while the session is open, e.g. /loop 5m check the deploy · alias /proactive
  • /mcp[reconnect|enable|disable …]
    Manage MCP server connections and OAuth
  • /memory
    Edit CLAUDE.md files and manage auto memory
  • /mobile
    Show a QR code to get the Claude mobile app · alias /ios, /android
  • /model[model]
    Switch the model and save it as your default
  • /output-style[style]
    List output styles or switch to one
  • /passes
    Share a free week of Claude Code (eligible accounts only)
  • /permissions
    Manage allow, ask, and deny rules for tools · alias /allowed-tools
  • /plan[description]
    Enter plan mode, optionally starting on a task
  • /plugin[subcommand]
    Manage plugins: list, install, enable, disable
  • /powerup
    Discover features through short interactive lessons
  • /pr-comments
    RemovedRemoved in v2.1.91 — ask Claude to read the PR comments instead
  • /privacy-settings
    View and update privacy settings (Pro and Max)
  • /radio
    Open Claude FM lo-fi radio in your browser
  • /rate-limit-options
    Ways to keep working when a usage limit blocks you (hidden — type it in full)
  • /recap
    One-line summary of the current session
  • /release-notes
    Browse the changelog by version
  • /reload-plugins[--force]
    Apply pending plugin changes without restarting
  • /reload-skills
    Re-scan skill and command folders so new files show up without a restart
  • /remote-control
    Make this session controllable from claude.ai or the Claude app · alias /rc
  • /remote-env
    Choose the default cloud environment for cloud sessions
  • /rename[name]
    Rename the session (auto-generates a name without one)
  • /resume[session]
    Resume a conversation by ID or name, or pick from a list · alias /continue
  • /review[level] [--fix] [--comment] [pr#|branch|path]
    Alias of /code-review with the same levels and flags, e.g. /review 1234 (before v2.1.223 it was a separate single-pass PR review)
  • /rewind
    Roll code and/or conversation back to a checkpoint, or summarize from a message · alias /checkpoint, /undo
  • /run
    Bundled skillLaunch and drive your app to see a change working
  • /run-skill-generator
    Bundled skillRecord how to build and launch your app as a project skill for /run and /verify
  • /sandbox
    Toggle sandbox mode (supported platforms only)
  • /schedule[description]
    Create, update, list, or run routines that execute in the cloud · alias /routines
  • /scroll-speed
    Adjust mouse wheel scroll speed (fullscreen only)
  • /security-review
    Check your branch's changes for security vulnerabilities
  • /setup-bedrock
    Configure Amazon Bedrock auth, region, and models (hidden until enabled)
  • /setup-vertex
    Configure Google Cloud agent platform auth and models (hidden until enabled)
  • /simplify[target]
    Bundled skillReview changed code for reuse, simplification, and efficiency, then apply fixes
  • /skill-doctor
    Show what each skill costs in context and how often it's used
  • /skills
    List available skills and cycle their visibility
  • /stats
    Alias for /usage, opened on the stats tab
  • /status
    Show version, model, account, connectivity, and loaded setting sources
  • /statusline
    Configure Claude Code's status line
  • /stickers
    Order Claude Code stickers
  • /stop
    Stop the background session you're attached to
  • /subtask<task>
    Spawn a forked subagent that inherits the conversation and reports back
  • /tasks
    View and manage background work in this session · alias /bashes
  • /team-onboarding
    Generate an onboarding guide for teammates from your usage history
  • /teleport
    Pull a cloud session into this terminal · alias /tp
  • /terminal-setup
    Install a Shift+Enter newline binding for your terminal or editor
  • /theme
    Change the color theme, including colorblind-friendly and custom themes
  • /tui[default|fullscreen]
    Switch the terminal renderer and relaunch into it
  • /ultraplan
    RemovedRemoved — use plan mode (/plan) instead
  • /ultrareview[pr or branch]
    Deep multi-agent review in a cloud sandbox — same as /code-review ultra
  • /update-config[request]
    Bundled skillDescribe a settings change (allow a command, add a hook) and Claude edits settings.json
  • /upgrade
    Open the upgrade page to switch plans
  • /usage
    Session cost, plan usage limits, and activity stats · alias /cost, /stats
  • /usage-credits
    Configure usage credits, or request them from your admin
  • /verify
    Bundled skillBuild and run your app to confirm a change works, not just tests
  • /vim
    RemovedRemoved in v2.1.92 — toggle Vim mode in /config → editor mode
  • /voice[hold|tap|off]
    Toggle voice dictation
  • /web-setup
    Connect GitHub for cloud sessions using your local gh credentials
  • /workflow-authoring
    Bundled skillReference for writing dynamic workflow scripts
  • /workflows
    Watch, pause, resume, or save running workflows

From the official commands reference, checked September 2026 (Claude Code v2.1.28x). What you see depends on your version, plan, and platform — type / in a session for your exact list.

Custom slash commands in Claude Code, as of 2026

A custom slash command is a Markdown file Claude Code turns into a prompt when you type its name. The official docs now describe custom commands as merged into skills: a file at .claude/commands/review.md and a skill at .claude/skills/review/SKILL.md both create /review and work the same way. Command files are the older format and keep working; skills are recommended for new work because the folder can hold scripts and reference files next to the prompt. This generator writes either format.

Where it livesPathWho gets it
Project skill.claude/skills/<name>/SKILL.mdEveryone who clones the repo — commit it
Personal skill~/.claude/skills/<name>/SKILL.mdYou, in every project on this machine
Project command file.claude/commands/<name>.mdSame as a project skill (legacy format)
Personal command file~/.claude/commands/<name>.mdSame as a personal skill (legacy format)
Nested (monorepo)packages/web/.claude/skills/<name>/SKILL.mdSessions working in that folder
Plugin<plugin>/skills/<name>/SKILL.mdWherever the plugin is enabled, as /plugin:name

The command name comes from the file system, not the frontmatter: a skill's folder name, or a command file's name without .md. Subfolders of commands/ become namespaces, so .claude/commands/frontend/component.md is /frontend:component. If two share a name, personal beats project and a skill beats a command file. A skill of yours named like a bundled skill (say code-review) replaces it, but not its aliases.

Custom slash commands documentation: every frontmatter field

All fields are optional, and only description is recommended. Keys are lowercase with hyphens (except when_to_use), and an unknown key is silently ignored — so a typo like allowed_tools just doesn't work. Frontmatter only parses when the opening --- is the file's first line.

FieldWhat it does
descriptionWhat the command does and when to use it — Claude reads this to decide when to load it. Without it, the first non-empty line of the body is used
argument-hintShown in autocomplete, e.g. [issue-number] or [filename] [format]. Quote it in YAML, since a bare [ … ] parses as a list
argumentsNamed positional arguments: arguments: issue branch makes $issue the first argument and $branch the second
allowed-toolsTools Claude can use without asking during the turn that runs the command, e.g. Read Bash(git status *). Space- or comma-separated, or a YAML list
disable-model-invocationtrue = only you can run it; Claude won't trigger it automatically. Use it for commit, deploy, send
modelModel for the rest of that turn: sonnet, opus, haiku, a full model ID, or inherit
effortlow, medium, high, xhigh, or max for that turn (depends on the model)
contextfork runs the command in a subagent with no conversation history — the body becomes its whole prompt
agentWhich subagent runs a forked command: Explore, Plan, general-purpose (default), or one of yours
disallowed-toolsTools removed from Claude's pool while the command is active
user-invocablefalse hides it from the / menu so only Claude can load it (background knowledge, not a command)
when_to_useExtra trigger phrases, appended to the description
pathsSkills only: globs that limit automatic loading to matching files
hooksHooks registered while the skill is in use — see the Claude Code hooks generator

Command files accept the same fields as skills except name and paths. If you plan to upload a skill to claude.ai or the Skills API, stick to name, description, allowed-tools, license, compatibility, and metadata — anything else is rejected there.

$ARGUMENTS, $0, $1 and named arguments

$ARGUMENTS expands to everything typed after the command. For individual words, use $0, $1, $2 — or the long form $ARGUMENTS[0] — and note they count from zero: $0 is the first argument. Some older guides show $1 as the first, which now points at the second. Arguments split like a shell, so quotes group words:

---
description: Migrate a component from one language to another
argument-hint: "[component] [from] [to]"
---

Migrate the $0 component from $1 to $2.
Preserve all existing behavior and tests.

# /migrate-component SearchBar "Java Script" TypeScript
# → Migrate the SearchBar component from Java Script to TypeScript.
  • An indexed placeholder with no argument, like $2 when you passed one word, stays in the text as-is; a named argument with no value becomes empty.
  • If the body has no placeholder at all, Claude Code appends ARGUMENTS: <what you typed> so nothing is lost.
  • To write a literal dollar amount, escape it: \$1.00.
  • Skills also get ${CLAUDE_SKILL_DIR}, ${CLAUDE_PROJECT_DIR}, ${CLAUDE_SESSION_ID}, and ${CLAUDE_EFFORT}.

Inject live context with ! commands and @ files

A line with !`git status --short` runs that shell command before Claude sees the prompt, and the output replaces the placeholder — so a /commit command arrives with the actual diff inlined. The ! has to start a line or follow whitespace. For several commands, open a fenced block with ```!. @path/to/file attaches a file's contents the same way.

  • A command that exits non-zero aborts the whole invocation (grep-style exit 1 is tolerated). Append || true to anything that may legitimately fail.
  • Injected commands never prompt. Outside auto mode, one your permission rules don't allow aborts the command — pre-approve it in allowed-tools, which the generator above can suggest for you.
  • They run with the Bash tool's 2-minute timeout, in the session's current directory; use ${CLAUDE_PROJECT_DIR} for stable paths.
  • Admins can turn this off with "disableSkillShellExecution": true in settings.

Claude Code commands cheat sheet: which to use when

The full searchable list is in the tool above. These are the Claude Code commands that matter at each stage of a session, per the official workflow guide:

MomentCommands
First session in a repo/init writes a starter CLAUDE.md, /memory edits it, /mcp connects servers, /permissions sets approval rules
During a task/plan before a big change, /model and /effort to tune, /context to see what's filling the window, /compact to free it, /btw for a side question
Work in parallel/tasks for background work, /background to detach, /batch for codebase-wide changes in worktrees
Before you ship/diff to see changes, /code-review (alias /review) for bugs, /security-review for vulnerabilities
Between sessions/clear for a fresh start, /resume to go back, /branch or /fork to try another direction
Something is wrong/rewind to a checkpoint, /doctor for setup issues, /debug for runtime issues, /feedback to report

Claude Code terminal shortcuts

KeysWhat they do
/Command or skill at the start of a message
!Shell mode: run a command directly and add its output to the session
@File path mention with autocomplete
EscInterrupt Claude mid-response, or close a dialog
Esc EscClear the draft, or on an empty prompt open the rewind menu
Shift+TabCycle permission modes (manual, accept edits, plan, and auto or bypass when available)
Ctrl+CInterrupt, or clear input; press again on empty input to exit
Ctrl+OToggle the transcript viewer with full tool output
Ctrl+RReverse-search your prompt history
Ctrl+BSend running Bash commands and agents to the background
Ctrl+GEdit the prompt in your $EDITOR
Option+P / Alt+PSwitch model without clearing the prompt
\ + Enter, Shift+Enter, Ctrl+JNew line in the prompt
?On an empty prompt: show the shortcut help

On macOS, the Option/Alt shortcuts need your terminal set to use Option as Meta. Rebind keys with /keybindings.

Claude Code CLI commands list

CommandWhat it does
claudeStart an interactive session
claude "query"Start a session with an initial prompt
claude -p "query"Print the answer and exit — for scripts and pipes (cat logs.txt | claude -p "explain")
claude -cContinue the most recent conversation in this directory
claude -r <session>Resume a session by ID or name
claude updateUpdate to the latest version
claude mcpConfigure MCP servers
claude doctorRead-only install and settings diagnostics
claude agentsOpen agent view to monitor background sessions
--model <alias|id>Model for this session: sonnet, opus, haiku, or a full name
--permission-mode <mode>Start in default, acceptEdits, plan, auto, dontAsk, or bypassPermissions
--allowedTools / --disallowedToolsAllow or deny rules for this session, e.g. "Bash(git log *)"
--add-dir <path>Give Claude access to another directory
-w, --worktree [name]Start in an isolated Git worktree
--settings <file|json>Layer extra settings over your files for one session
--debug-file <path>Write debug logs (hooks, skills, MCP) to a file

Claude Code allow all commands — and when not to

allowed-tools in a command only lasts one turn. To stop being asked about the same commands every session, add allow rules to settings.json(or answer a prompt with "Yes, and don't ask again", which saves one to .claude/settings.local.json):

{
  "permissions": {
    "allow": ["Bash(npm run *)", "Bash(git commit *)"],
    "deny": ["Bash(git push *)", "Read(./.env)"]
  }
}
  • A bare rule allows everything for a tool. "Bash" (or Bash(*)) matches every shell command. Put the * after the subcommand — Bash(git log *), not Bash(git *) — or you allow far more than you meant.
  • Auto mode lets a classifier approve routine actions and block risky ones, with no prompt. It's the default on Pro, Max, and Team plans and the sensible way to cut prompts on your own machine.
  • --dangerously-skip-permissions (identical to --permission-mode bypassPermissions) skips permission prompts entirely, including writes to .git and .claude. The docs say to use it only in isolated containers or VMs without internet access. It refuses to start as root or under sudo, deny rules still block, and a hook that denies still wins.

Warning: bypass mode gives Claude your full user permissions with no checkpoint. On a laptop with your SSH keys and cloud credentials, a single bad command is enough. Prefer scoped allow rules or auto mode.

Keep going

Commands tell Claude what to do when you ask. To make something happen every time — format after each edit, block writes to .env, get a notification when Claude needs you — use the Claude Code hooks generator. For the standing instructions Claude reads every session, start from the CLAUDE.md generator.

Frequently asked questions

What are the Claude Code slash commands?

Slash commands are what you type at the start of a message in Claude Code to control the session: built-in commands like /clear, /compact, /model, /permissions, /memory, /init, /context, /resume and /config, bundled skills like /code-review, /doctor, /batch and /loop, and any custom commands or skills you add yourself. Type / in a session to see the list available to you, or search the full reference on this page.

How do I create a custom slash command in Claude Code?

Create a Markdown file with optional YAML frontmatter. The recommended format is a skill at .claude/skills/<name>/SKILL.md, which becomes /<name>; the older format, a single file at .claude/commands/<name>.md, still works the same way. Put the instructions Claude should follow in the body, use $ARGUMENTS for whatever you type after the command, and save it — this generator builds the file and a one-line shell command to create it.

Are custom commands and skills the same thing now?

Yes. The Claude Code docs say custom commands have been merged into skills: .claude/commands/deploy.md and .claude/skills/deploy/SKILL.md both create /deploy and behave the same. Existing command files keep working. Skills add a folder for supporting files and scripts, and if a skill and a command share a name, the skill wins.

Where do Claude Code custom commands go — project or personal?

Project commands live in .claude/skills/ (or .claude/commands/) inside the repository, so you can commit them and your team gets them too. Personal ones live in ~/.claude/skills/ (or ~/.claude/commands/) and work in every project on your machine. When names clash, personal beats project.

How do I pass arguments to a Claude Code slash command?

Everything after the command name is the argument string. $ARGUMENTS inserts all of it; $0, $1, $2 (or $ARGUMENTS[0] and so on) insert individual arguments, counting from zero, with shell-style quoting so "two words" stays one argument. You can also declare named arguments in frontmatter (arguments: issue branch) and use $issue and $branch. If the body has no placeholder, Claude Code appends ARGUMENTS: <what you typed> so Claude still sees it.

What does allowed-tools do in a custom command?

allowed-tools pre-approves the listed tools for the turn that runs the command, so Claude can use them without a permission prompt — for example Bash(git add *) Bash(git commit *) for a commit command. It doesn't restrict other tools, and the grant clears when you send your next message. Deny and ask rules in your settings still win.

How do I namespace custom commands?

Put command files in subfolders: .claude/commands/frontend/component.md becomes /frontend:component. Skills are named after their folder and don't take a subfolder namespace; plugin skills are namespaced by the plugin, like /my-plugin:review.

How do I allow all commands in Claude Code?

You can pre-approve commands with permission rules in settings.json — "Bash(npm run *)" for a family, or a bare "Bash" for every shell command — or start in a permission mode. The all-access option is --dangerously-skip-permissions (the same as --permission-mode bypassPermissions), which skips prompts entirely; the docs say to use it only in isolated containers or VMs, it refuses to run as root, and deny rules still apply. Auto mode is the safer way to cut prompts on a normal machine.

What are the Claude Code CLI commands?

From your terminal: claude starts an interactive session, claude "query" starts one with a prompt, claude -p "query" answers and exits (for scripts), claude -c continues the latest conversation, claude -r <session> resumes one, claude update updates, claude mcp manages MCP servers, and claude doctor prints install diagnostics. Flags such as --model, --permission-mode, --allowedTools, --add-dir and --worktree customize a session.

Why doesn't my custom command show up?

Check the path and name: skills need .claude/skills/<name>/SKILL.md (the folder name is the command), command files need .claude/commands/<name>.md. The frontmatter only parses if the opening --- is the very first line. A new top-level skills folder created mid-session needs a restart; otherwise /reload-skills rescans without one. Running claude --debug shows frontmatter parse errors.

Can Claude run my slash command on its own?

Yes, by default Claude can load a skill or command when its description matches what you're asking. Add disable-model-invocation: true to the frontmatter for anything with side effects — commit, deploy, send — so it only runs when you type it.

Related free tools

See all free tools →

Built something? Put it online in seconds

host0 is the cloud for small software: bring any coding agent, build the tool only you need — like this one — and say "deploy to host0". Live at a shareable URL, no servers to run.