Guide
Claude Code slash commands: the ones that actually matter
Every Claude Code release adds commands, and /help will always be the authoritative
list for the version you're running. This is the other thing you need: the shortlist that
deserves muscle memory, grouped by what it does for you — with the honest note on where each one
stops.
Session hygiene: /compact, /clear, /resume
/compact— summarizes the session so far and continues with the compressed context. The single most underused command: run it at checkpoints and the agent stays sharp for hours instead of drowning in its own history. It's also the cheapest fix for burning your usage limits, since re-sent context is what eats them./clear— the hard reset. New task, unrelated to the last one? Clear beats compact: stale context misleads more than it helps./resume— reopens a previous session with its history. Yesterday's half-finished refactor is a command away, not a re-explanation away.
Setup and control: /model, /init, /permissions, /mcp
/model— switch models mid-session. The practical routing move given what frontier tokens cost: cheap model for the grind, escalate for the hard part, drop back down./init— generates a starter CLAUDE.md by scanning the repo. Good skeleton, generic result — tighten it by hand or with our CLAUDE.md generator, because the context file is the highest-leverage file in the repo./permissions— inspect and edit what the agent may do without asking. Worth opening once just to see what you've accumulated; the principled version of this is a pre-approval policy, not a pile of one-off "always allow" clicks./mcp— manage MCP servers: see what's connected, authenticate, debug why a tool isn't showing up.
Doing the work: /review, /background, /tasks, /agents
/review— a code review of your diff or PR from inside the session. One model reviewing its own homework has a blind spot, though — for diffs that matter, a second reviewer from a different lab is the fix./background(alias/bg) — detaches the session to keep working as a background agent and hands back your terminal;claude --bgstarts detached from the outset. The full story — including what it deliberately doesn't do — is in running Claude Code in the background./tasks— lists what's running in the background of the current session. The glanceable companion to/background./agents— define and manage subagents: focused workers with their own fresh context the main session can fan work out to.
The meta set: /help, /status, /cost, /doctor
/help is the real index. /status shows account, model, and where you
stand against limits before the lockout surprises you. /cost keeps API spending
visible per session. /doctor diagnoses a broken install before you reinstall
anything.
Write your own: custom commands
The underrated feature hiding in plain sight: any Markdown file in
.claude/commands/ becomes a slash command — filename is the command, body is the
prompt, $ARGUMENTS takes what you type after it.
# .claude/commands/write-tests.md
Write unit tests for $ARGUMENTS. Match the existing test style,
cover the edge cases, and run the suite to confirm green.
Commit the folder and the whole team gets the same /write-tests. Repeated prompts
are process; process belongs in the repo.
Frequently asked questions
How do I see all slash commands?
Type /help in a session — it lists everything your version supports, including custom commands. The set changes with releases; /help is always current.
What does /compact do and when should I run it?
Summarizes the session and continues compressed. Run at checkpoints — after a subtask, before a new area. It keeps context sharp and is the cheapest way to stretch usage limits.
Can I create my own slash commands?
Yes — Markdown files in .claude/commands/ (project) or ~/.claude/commands/ (user); $ARGUMENTS interpolates your input. Commit the project folder to share with the team.
Is there a command to run Claude Code in the background?
Yes — /background (/bg) detaches the session; /tasks lists background work. Getting notified when the detached agent needs you is the part commands don't cover — that's hooks, or an overlay.
Where Backgrind fits
Slash commands run the session; Backgrind runs the day. It wraps your
real claude CLI in an always-on-top overlay — every command above works untouched —
and adds the layer commands can't: ambient pings when any session needs a decision, inline
approve from the toast, tabs for multiple
agents, and your phone as the
answer button when the chime catches you in the kitchen. Type /bg; let the overlay
handle the part after.