This chapter lists Claude Code's slash commands (2026 edition) by category. One row = one command, with what it does and when to use it. Reading time: 8 minutes.
What is a slash command?
A shortcut that triggers a specific behavior. You type /name, Claude runs it without you writing a long prompt.
Three families:
- Native: built into Claude Code (session, plan, usage, etc.)
- Skills and plugins: one-click install (code, review, commit, etc.)
- Your own: drop a markdown file in
~/.claude/skills/and you're done
Workflow, drive your session
The fuel gauge of your agent. Skip this category and you're flying blind.
| Command | What it does | When to use it |
|---|---|---|
/clear | Wipes the entire conversation | You fully switch topic (bug fix to new feature) |
/compact | Summarizes the session and frees context | As soon as you hit 50-60% context. Don't wait for 80% |
/context | Shows context size and what's filling it | You want to see where your tokens go |
/resume | Picks up a previous session with full context | You come back to a task you paused yesterday |
/rewind (or Esc Esc) | Undoes recent changes AND rolls back the convo | Claude heads the wrong way. Rewind early, not late |
/plan (or Shift+Tab) | Switches to plan mode (read-only, plan before acting) | Non-trivial task, 3+ steps, architecture call |
/loop | Reruns a command on an interval (up to 3 days) | Watch a deploy, poll a build, babysit a PR |
/usage | Shows token usage and remaining budget | Check where you stand on your plan |
/fast | Toggles fast mode (shorter reasoning, same model) | Small tweaks, simple questions. Flip back for complex work |
Tasks, daily execution
The trio that covers 80% of a dev session.
| Command | What it does | When to use it |
|---|---|---|
/commit | Reads the diff, writes a clean message, creates the commit | After every completed feature or fix. Never on WIP |
/review | Re-reads the diff, flags bugs, security issues, inconsistencies, dead code | Before every meaningful commit. Your safety net |
/debug | Reproduce, isolate, diagnose, fix, verify | Unexpected behavior and you can't pinpoint the cause |
Code generation
The commands that replace 20 minutes of manual setup.
| Command | What it does | When to use it |
|---|---|---|
/component | Generates a typed React component (props, state, styles) | New UI block from a description |
/form-builder | Full form (Zod + react-hook-form + shadcn/ui) | Creation, edit, onboarding forms |
/test-gen | Unit tests for existing code | You just wrote a critical action and want coverage |
/migration-sql | Supabase migration with table, RLS and indexes | New table, schema change |
/pr | GitHub Pull Request (title, description, test checklist) | Feature ready, you want it reviewed |
System, configure your agent
The infrastructure of your Claude Code. Learn it once, forget it after.
| Command | What it does | When to use it |
|---|---|---|
/init | Scans the repo and writes a starter CLAUDE.md | First launch inside a project with no Claude setup |
/agents | Lists and manages available subagents | Build a specialized agent (e.g. /front, /api) |
/skills | Lists and manages installed skills | Install a skill from the registry |
/plugin | Manages plugins (MCP servers, external integrations) | Hook up Notion, Supabase, Linear, Figma |
/memory | Edits memory files (user, feedback, project, reference) | Save an architecture decision for the next session |
/output-style | Changes response tone (concise, verbose, teaching) | Match Claude to context (pair programming vs docs) |
/statusline | Configures the status line (model, tokens, context, git) | Customize what stays in your terminal view |
Build your own command in 30 seconds
Want a /my-workflow command that does exactly what you need? Drop a markdown file in ~/.claude/skills/my-workflow.md with this frontmatter:
---
name: my-workflow
description: What the command does
---
The full prompt Claude should execute.
You can reference files, conventions, steps.
That's it. Claude picks it up on next launch and /my-workflow is available. The Skills chapter covers the advanced patterns (arguments, subagents, allowed tools).
Takeaway, top 5 to learn first:
/reviewbefore every commit, catches bugs before prod/committo save, clean messages with no effort/debugwhen things break, structured diagnosis instead of guessing/compactat 50% context, keeps answer quality high/rewindwhen Claude drifts, faster than fixing by hand
The rest comes once you're comfortable with the workflow.