Slash Commands: The Power Shortcuts Most Developers Overlook
A practical guide to the Claude Code commands worth building into muscle memory.
Slash commands are how you steer Claude Code from inside a session. Some are built-in controls. Some are bundled skills. Some come from your own skills, project files, plugins, or MCP servers.
Type / in Claude Code to see what is available in your environment. The exact list changes by platform, plan, version, and plugins, so treat this as a practical map rather than a frozen catalog.
The Commands to Learn First
/help
Shows available commands.
Use it when you are unsure what your current Claude Code setup supports. It is also the fastest way to discover project, user, plugin, and MCP-provided commands.
/status
Shows account, model, connectivity, and environment status.
Use it when something feels off: wrong model, wrong account, tool integration missing, or a remote/local mismatch.
/doctor
Checks the health of your Claude Code installation.
Use it when permissions, IDE integration, shell setup, or configuration seems broken.
Context and Session Control
/plan
Enters plan mode. You can pass a description directly:
/plan add Google OAuth to the existing auth flow
Use this before multi-file work, unfamiliar code, architectural changes, or anything where you are not yet sure of the approach.
/compact
Summarizes the conversation so the session can continue with less context pressure.
Good use:
/compact focus on the invoice cancellation plan, failing tests, and files already changed
After compaction, re-anchor the task:
Continue with Task 3 in `plans/invoice-cancellation.md`.
/clear
Starts a new conversation with empty context while preserving the previous conversation for resume.
Use it between unrelated tasks or when a session has accumulated too much wrong context.
Before clearing, write a handoff sentence.
/resume
Resumes a previous conversation.
Use it for long-running workstreams. Pair it with /rename so old sessions are findable.
/rename
Names the current session.
Good names are task-shaped:
/rename invoice-cancellation-api
Code Workflows
/review
Requests code review.
Use it before opening a PR or after Claude finishes a meaningful diff.
Good prompt:
/review
Review the current diff for correctness, missed edge cases, security issues, and missing tests.
/security-review
Reviews pending changes for security issues.
Use it for auth, permissions, user input, file handling, payment flows, secrets, and infrastructure changes.
/simplify
A bundled skill that reviews recently changed files for opportunities to reduce complexity and improve reuse or quality.
Use it when a change works but feels heavier than it should.
Example:
/simplify focus on duplicated validation logic
/debug
A bundled skill for Claude Code debugging and troubleshooting. In current docs, it enables or uses debug logging for the current session and helps inspect session issues.
Use it when Claude Code itself is behaving unexpectedly, or when you need help troubleshooting the agent session.
For application bugs, you may still have a custom debugging skill in your environment. Check /skills.
Scaling Work
/batch
A bundled skill for large changes that can be decomposed into many independent units. It plans the work, then can spawn background agents in isolated worktrees.
Use it only when the work is truly parallelizable.
Good candidate:
/batch migrate independent packages under `packages/*` from one lint rule to another
Bad candidate:
/batch redesign the shared auth system
Shared state kills parallelism.
/tasks
Lists and manages background tasks.
Use it after launching long-running shell commands or background agent work.
/agents
Manages agent configurations.
Use it when you want specialized subagents for repeated roles such as code exploration, review, or documentation.
Memory and Configuration
/memory
Shows loaded memory files and auto-memory controls.
Use it to inspect CLAUDE.md, CLAUDE.local.md, rules files, and auto memory. This is the command to reach for when Claude keeps forgetting a project convention.
/permissions
Manages allow, ask, and deny rules for tools.
Use it to reduce repeated prompts for safe tools or block risky actions. Permissions define baseline access; hooks can add workflow-specific checks.
/hooks
Browses configured hooks.
Use it to inspect hook events, matchers, source files, and handlers. To make durable changes, edit the relevant settings file or ask Claude to do it.
/config
Opens settings.
Use it for theme, model, output style, and other session preferences.
/model
Changes the active model.
Use it intentionally: Sonnet for most coding, Opus or higher effort for difficult planning or review, and faster models for simple tasks when appropriate.
GitHub and Remote Work
/pr-comments
Older versions used this to view PR comments. Current docs note it was removed in v2.1.91; ask Claude directly to view pull request comments instead.
This is a good example of why command posts age quickly. Always verify with /help in your installed version.
/autofix-pr
Starts a Claude Code on the web session that watches a PR branch and pushes fixes when CI fails or reviewers leave comments. Requires gh and access to Claude Code on the web.
Use it when the PR is already scoped well and the requested fixes are mechanical or review-driven.
/ultrareview
Runs a deeper cloud-based review when available for your plan.
Use it for high-risk PRs where a normal local review is not enough.
Creating Your Own Slash Workflows
Custom slash commands have evolved. Current Claude Code docs recommend skills as the main way to add your own commands.
Two paths still matter:
.claude/skills/<name>/SKILL.md: preferred for reusable workflows, supporting files, automatic discovery, and richer configuration..claude/commands/<name>.md: legacy command files that still work and are useful for simple one-file prompts.
If you are starting today, create a skill unless the prompt is tiny and purely local.
Minimal example:
---
name: explain-file
description: Explain a file clearly and concisely. Use when the user asks what a file does.
disable-model-invocation: true
argument-hint: [file]
---
Explain `$ARGUMENTS` in under 250 words:
1. Purpose
2. Important inputs and outputs
3. Main dependencies
4. One gotcha
Invoke it with:
/explain-file src/services/billing.ts
The Slash Command Habit
Build the reflex:
Is there a command or skill for this?
If yes, use it. If no, do the work manually. If you do the same manual workflow three times, turn it into a skill.
That is how Claude Code stops being a chat window and becomes a development environment.
Sources
- Claude Code commands reference
- Extend Claude with skills
- Claude Code best practices
- Model configuration
Part 5 of a seven-part series on using Claude Code efficiently.