Files
claude-code-best-practice/best-practice/claude-commands.md
T
2026-03-13 16:18:06 +05:00

9.1 KiB

Commands Best Practice

Last Updated
Implemented

Claude Code commands — frontmatter fields and official built-in slash commands.

← Back to Claude Code Best Practice Claude

Frontmatter Fields (4)

Field Type Required Description
description string Recommended What the command does. Shown in autocomplete and used by Claude for auto-discovery
argument-hint string No Hint shown during autocomplete (e.g., [issue-number], [filename])
allowed-tools string No Tools allowed without permission prompts when this command is active
model string No Model to use when this command runs (e.g., haiku, sonnet, opus)

Official (56)

# Command Tag Description
1 /login Auth Authenticate with Claude Code via OAuth
2 /logout Auth Log out from Claude Code
3 /config Config Open the interactive settings interface with search
4 /keybindings Config Customize keyboard shortcuts per context and create chord sequences
5 /output-style Config Pick an output style preset
6 /permissions Config View or update tool permissions
7 /privacy-settings Config Manage privacy and telemetry preferences
8 /sandbox Config Configure sandboxing with dependency status
9 /statusline Config Set up Claude Code's status line UI
10 /stickers Config Choose sticker packs shown in the UI
11 /terminal-setup Config Enable shift+enter for newlines in IDE terminals
12 /theme Config Change the color theme
13 /vim Config Enable vim-style editing mode
14 /context Context Visualize current context usage as a colored grid with token counts
15 /cost Context Show token usage statistics for the current session
16 /extra-usage Context Configure pay-as-you-go overflow billing for subscription plans
17 /status Context Show a concise session status summary
18 /stats Context Visualize daily usage, session history, streaks, and model preferences
19 /usage Context Show plan usage limits and rate limit status (subscription plans only)
20 /bug [description] Debug Alias for /feedback
21 /doctor Debug Check the health of your Claude Code installation
22 /feedback [description] Debug Generate a GitHub issue URL for reporting bugs or feedback
23 /help Debug Show slash-command help
24 /release-notes Debug Show recent Claude Code release notes
25 /tasks Debug List and manage background tasks
26 /copy Export Copy the last assistant response to the clipboard
27 /export [filename] Export Export the current conversation to a file or clipboard
28 /agents Extensions Manage custom subagents — view, create, edit, delete
29 /chrome Extensions Manage Claude in Chrome browser integration
30 /ide Extensions Connect to IDE integration
31 /mcp Extensions Manage MCP server connections
32 /reload-plugins Extensions Reload installed plugins without restarting
33 /memory Memory View and edit memory files
34 /fast Model Toggle fast mode — same Opus 4.6 model with faster output
35 /model Model Switch models (haiku, sonnet, opus) and adjust effort level
36 /passes [number] Model Set the number of review passes for certain workflows
37 /plan Model Enter read-only planning mode — suggests approaches without making changes
38 /add-dir Project Add additional working directories to the current session
39 /diff Project Review the current git diff in the active repo
40 /init [prompt] Project Initialize a new project with a CLAUDE.md guide
41 /pr-comments Project Review or reply to pull-request comments
42 /review Project Review the current code changes
43 /security-review Project Run a focused security review on current changes
44 /desktop Remote Connect to or manage the desktop companion app
45 /install-github-app Remote Install the GitHub app for PR-linked workflows
46 /install-slack-app Remote Install the Slack app for notifications and sharing
47 /mobile Remote Connect to or manage the mobile companion app
48 /remote-control Remote Continue the current session from another device
49 /remote-env Remote Inspect or copy the remote-control environment setup
50 /clear Session Clear conversation history and start fresh
51 /compact [prompt] Session Compress conversation to free context window. Optional prompt focuses the compaction
52 /exit Session Exit the REPL
53 /fork Session Fork the current conversation into a new session
54 /rename <name> Session Rename the current session for easier identification
55 /resume [session] Session Resume a previous conversation by ID or name, or open the session picker
56 /rewind Session Rewind conversation and/or code to an earlier point

Bundled skills such as /debug can also appear in the slash-command menu, but they are not built-in commands.


Sources