Most people use Claude Code like a chat box: ask for a fix, paste an error, accept a patch, move on. It works—but it’s leaving a lot of power on the table.
Claude Code ships with a built-in command palette (type /), plus bundled skills like /batch, /simplify, and /debug. Not every command shows up for every user—some depend on platform, plan, or environment—so the real move is learning what each command is for and how to chain them into repeatable workflows.
Below are the 12 commands/skills that consistently deliver the biggest practical wins for developers and sysadmins—plus advanced combos that make them feel like “features” rather than “commands.”
Quick cheat table: what each command is for
| Command | Type | What it solves | Use it when… |
|---|---|---|---|
/insights | Built-in | Analyzes your Claude Code sessions (patterns + friction) | You want to improve your workflow, not just your code |
/batch | Bundled skill | Bulk refactors/migrations across many files | You’re changing a repeated pattern in 10+ files |
/simplify | Bundled skill | Cleans up your diff (clarity, duplication, polish) | Right before opening a PR |
/security-review | Built-in | Security review of your current branch diff | You touched auth, input handling, data flows, secrets |
/context | Built-in | Shows current context usage as a visual grid | Claude starts “forgetting” or answers get weird |
/compact [instructions] | Built-in | Compresses the conversation, keeps focus | Long sessions, or you’re switching to a new subtask |
/rewind | Built-in | Undo: revert to an earlier point in the session | Claude took the refactor in the wrong direction |
/debug | Bundled skill | Diagnoses tool/session weirdness | Tools fail, MCP flakes, behavior feels inconsistent |
/hooks | Built-in | Automates actions on events (pre/post tool use, etc.) | You want auto-format, auto-test, guardrails |
/stats | Built-in | Usage analytics (sessions, streaks, model prefs) | You want to understand how you actually work |
/remote-control (/rc) | Built-in | Continue the same local session from phone/browser | You need to keep going away from your desk |
/voice | Rolling out | Dictate instructions / voice mode in Claude Code | Hands-free prompts, long specs, rapid triage |
The built-in list (including /insights, /context, /compact, /hooks, /security-review, /stats) is documented in the Interactive Mode reference.
Bundled skills are highlighted in Claude Code’s “Extend Claude Code” docs.
1) /insights: your “workflow post-mortem” in one command
If you want to level up how you use Claude Code—not just what Claude outputs—start here.
What it does: generates a report that analyzes your sessions: where you spend time, what kinds of interactions repeat, and where friction shows up. It’s like a personal retrospective, but based on real usage.
Run it
/insights
How to use it like a pro
- Run it every 2–4 weeks, not daily—insights need data.
- Use it to identify prompts you keep repeating → turn those into a skill or a reusable checklist.
- If it flags “lots of back-and-forth” on certain tasks, that’s often a signal you need:
- better project memory (CLAUDE.md),
- more aggressive
/compact, - or automation via
/hooks.
2) /batch: bulk changes without turning your repo into rubble (bundled skill)
What it does: helps you orchestrate large, repetitive changes across the codebase—think dependency swaps, API migrations, naming shifts, framework refactors. Claude Code explicitly calls out /batch as a bundled skill that ships “out of the box.”
Examples
/batch Replace moment.js with dayjs everywhere and update the common call sites./batch Migrate all routes from /v1/* to /api/v1/* and update matching tests./batch Convert all logger calls to the new structured logging wrapper in src/logging/.
Advanced tips
- Make your request testable: “and update tests” / “and run lint” / “and ensure builds pass.”
- If the change has cross-file dependencies, include ordering constraints:
“Update shared types first, then update callers.”
Best combo
/batch→/diff(to inspect) →/simplify→/security-review
(/diffis a built-in command that opens an interactive diff viewer. )
3) /simplify: pre-PR cleanup that pays back immediately (bundled skill)
This is the “make it look like a human who slept wrote it” command.
What it does: cleans up your current changes for readability and maintainability. It’s shipped as a bundled skill.
Run it
/simplify
Targeted usage
/simplify Focus on readability and remove duplication in src/services./simplify Prioritize performance regressions and unnecessary allocations.
Why sysadmins should care
Even if you’re not writing product code, your infra scripts (Ansible, Terraform wrappers, Bash, Python automation) benefit from:
- fewer foot-guns,
- clearer logic,
- more consistent patterns.
4) /security-review: security scanning that understands your diff
What it does: analyzes pending changes on your current branch for security vulnerabilities (injection risks, auth issues, data exposure, etc.). It’s explicitly documented as a built-in command that reviews your git diff.
Run it
/security-review
When it’s non-negotiable
- you touched auth/session handling,
- you introduced new endpoints,
- you changed input parsing/validation,
- you added logging around user data,
- you wired new secrets/env vars,
- you updated crypto or permissions logic.
The winning pattern
/simplify/security-review
Clean code is easier to audit—and you’ll typically get fewer false positives.
5) /context: stop guessing when you’re running out of context
When Claude starts repeating questions or forgetting decisions, it’s often not “model quality.” It’s context pressure.
What it does: shows a colored grid of current context usage.
Run it
/context
Practical rule
- If you’re above ~70% and you’re still mid-task → plan to
/compact. - If you’re above ~90% → compact or reset before the session degrades.
6) /compact [instructions]: compress history, keep what matters
What it does: compacts the conversation; you can add instructions to preserve key details and drop the rest.
Basic
/compact
Focused
/compact Keep only what matters for the auth middleware refactor./compact Drop frontend context; focus on DB migrations and rollback safety.
Sysadmin move
Use /compact before switching from “debugging” to “hardening”:
- “Keep root cause + fix; drop exploratory attempts.”
That keeps the session sharp and reduces drift.
7) /rewind: your time machine for bad turns
What it does: lets you roll back to an earlier point when the session went sideways. It’s a built-in command in interactive mode.
Run it
/rewind
Why it’s underrated
- It encourages experimentation.
- You can let Claude try a bold refactor because you can always rewind if it’s not what you want.
8) /debug: diagnose Claude Code itself (bundled skill)
Sometimes the bug isn’t in your code—it’s in the tooling interaction:
- an MCP server stops responding,
- a hook behaves weirdly,
- a tool doesn’t run as expected.
What it does: the docs call /debug a bundled skill shipped with Claude Code.
Run it
/debug
Make it useful
/debug MCP server stopped responding after the last config change./debug Tool calls started failing after enabling sandboxing.
9) /hooks: automate your workflow and add guardrails
Hooks are where Claude Code starts behaving like a personalized devops assistant, not just a chat.
What it does: manages hook configurations for tool events. Hooks can run shell commands, HTTP endpoints, or prompt-based decisions at specific lifecycle points (pre/post tool use, session start/end, etc.).
Open hook manager
/hooks
Hook ideas that work in real teams
Auto-format after file writes (PostToolUse)
- Prettier for JS/TS
- Black for Python
- gofmt for Go
Run “fast tests” after touching certain paths
pytest tests/api -qgo test ./...in a modulenpm test -- <focused suite>
Block dangerous commands (PreToolUse)
Sysadmin-friendly guardrails:
- prevent
rm -rf /-style disasters, - block edits to critical files (
prod.tf,kubeconfig, etc.) unless explicitly allowed, - require confirmation before running high-risk tools.
Claude’s hooks reference documents event schemas and advanced options like prompt-based hooks.
10) /stats: understand your habits (and fix them)
What it does: visualizes daily usage, session history, streaks, and model preferences.
Run it
/stats
Use it like a sysadmin
- Identify your “peak hours” where Claude actually helps.
- Spot projects where you burn tokens with little output → refine prompts, add memory, create skills.
11) /remote-control (/rc): keep your local session alive from phone/browser
This is not “cloud Claude Code.” It’s your local session (filesystem, tools, MCP servers) being controlled remotely.
What it does: connects claude.ai/code (or the Claude mobile app) to a Claude Code session running on your machine. Your session keeps running locally; the remote UI is a window into it.
Start from inside an existing session
/remote-control
Name it
/remote-control Prod incident: webhook latency
Start from the CLI
claude remote-control --name "My Project"
Important constraints
- Requires subscription access (Pro/Max/Team/Enterprise) and API keys aren’t supported for Remote Control sessions.
- Your local session makes outbound HTTPS requests and does not open inbound ports; traffic is routed via Anthropic’s API over TLS.
- One remote session at a time; terminal must stay open.
Why sysadmins will love it
You can start an incident triage at your desk, then continue from your phone while walking to a meeting—without losing local logs, tooling, or repo state.
12) /voice: voice mode is rolling out (and it’s more than a gimmick)
Voice mode is actively being rolled out and shows up in Claude Code’s changelog as “voice mode” fixes/flags (e.g., voiceEnabled).
Tech reporting indicates it can be toggled via /voice inside Claude Code during the rollout.
What it’s good for
- Dictating long, high-context prompts (requirements, bug narratives, reproduction steps).
- Hands-free interaction while you’re staring at logs, dashboards, or terminals.
Practical guidance
Treat it as an input method—not a replacement for precise technical text. Use voice for the “story,” then refine with keyboard for exact flags, paths, and constraints.
Three advanced workflows worth stealing
A) The “PR Hardening Pipeline” (fast and repeatable)
/simplify/security-review/diffto inspect changes turn-by-turn (especially useful after tool runs)
B) The “Long Session Survival Loop”
- Every time you switch subtasks:
/context/compact Focus on <new subtask>
C) “Ops Guardrails” with Hooks
PostToolUse: auto-format + quick testsPreToolUse: block dangerous commands or edits- Pair with
/debugwhen something acts up
Honorable mentions (not in the 12, but very real)
If you want to go further, these are also high impact:
/diff— interactive diffs by file and by Claude turn/pr-comments— pull PR comments viagh/memory— edit CLAUDE.md files and toggle auto-memory/output-style— switch into Explanatory/Learning mode for teaching-style help/doctor— verify install + settings
