MVP Factory
ai startup development

Claude Code Slash Commands That Actually Save You Hours

KW
Krystian Wiewiór · · 6 min read

TL;DR

Claude Code ships with a growing list of slash commands, but most sessions only need a handful. After months of daily use, I’ve worn a groove into a small set: /compact and /clear for context hygiene, Shift+Tab for mode cycling, /model for cost control, and /permissions for uninterrupted flow. This guide covers when and how to use each one, and which commands I skip entirely.


The context problem most developers ignore

Most people start typing prompts without thinking about context budget. Your session arrives with a meaningful chunk of the context window already consumed. Project files, system instructions, CLAUDE.md contents — they eat into it before you type a word.

That overhead compounds. By mid-session, if you’re debugging a complex issue across multiple files, you may be working against a degraded context window without realizing it. The commands below help you manage this, and honestly, learning to manage context changed how I use Claude Code more than any single feature.


The commands that matter

Context management

CommandPurposeWhen to use
/costCheck token usage and spendStart of session, periodically
/compactCompress history, free contextProactively at ~50% usage
/clearFull conversation resetBetween unrelated tasks

/cost shows your current token consumption and API spend. Run it at the start of a session to establish your baseline, and periodically during long sessions. Knowing how much context you’ve already consumed before your first prompt changes how you frame your requests.

/compact compresses your conversation history to reclaim context space. The key thing I learned the hard way: run it proactively around 50% usage, not when you’re at 95% and responses are already degrading. By that point, you’ve lost signal in the compression. Think of it like garbage collection. You want it running before you’re out of memory.

/clear is a full reset. Use it between unrelated tasks. Switching from debugging an API to writing a new feature? Clear the slate. Residual context from the previous task actively hurts the next one.

Planning and mode control

Shift+Tab cycles between three modes: normal, auto-accept, and plan. It replaces what would otherwise be multiple separate commands.

  • Plan mode: Claude explores your codebase and proposes an approach without writing code. I’ve learned this the painful way on production systems — the cost of a bad implementation is 10x the cost of spending five minutes planning first. Use plan mode before any non-trivial change.
  • Auto-accept mode: Claude executes without prompting for permission at each step. Use it when you trust the scope and want uninterrupted flow.
  • Normal mode: Standard behavior with per-action approval.

/model switches between Opus, Sonnet, and Haiku mid-session. This is how you control cost vs. capability:

ModelBest forTrade-off
OpusComplex architecture, multi-file refactorsSlower, highest cost
SonnetGeneral development, code reviewBalanced
HaikuQuick questions, simple editsFastest, cheapest

I start in Sonnet, switch to Opus for the architecturally complex part, then drop to Haiku for cleanup. Matching model to task complexity saves real money over a week of heavy use.

Workflow efficiency

/permissions pre-allows safe operations so you’re not approving every file read or test run manually. Configure it once at session start. The friction of constant permission prompts breaks flow state, and you end up rubber-stamping approvals anyway — which defeats the purpose of having permissions in the first place.

/init generates a CLAUDE.md file for your project. You run it once, but it’s probably the most valuable command on this list. A well-written CLAUDE.md front-loads context about your architecture, conventions, and constraints into every session automatically.

/memory manages your CLAUDE.md and memory files. Use it to update project context as your codebase evolves. Stale memory files are worse than no memory files. They inject misleading context at the start of every session, and you won’t notice until Claude starts making weird decisions.


What I skip

Not every command earns a spot in daily use. I skip specialized commands that duplicate what a well-structured prompt already achieves. My rule of thumb: if a command saves fewer than ten seconds compared to just typing the instruction in natural language, it’s not worth the cognitive overhead of memorizing it. Run /help for the full list and decide what fits your workflow, but resist the urge to learn everything. A smaller toolkit you actually use beats a large one you half-remember. Commands also change between releases, so verify behaviors against the current docs before building muscle memory around something that might shift.


A real session flow

1. Start session
2. /cost                   → Check baseline token usage
3. /permissions            → Pre-allow test runs, file reads
4. Shift+Tab → plan mode   → Design approach before coding
5. Shift+Tab → normal      → Implement the plan
6. /compact                → Free context at ~50% usage
7. /model haiku            → Switch for simple fixes
8. /clear                  → Reset before next task

This sequence keeps context clean, matches model to task, and separates planning from execution. I don’t follow it rigidly every time, but it’s the spine of how I work.


What to take from this

Monitor context instead of guessing at it. Run /cost at session start and /compact proactively around 50% usage, not once responses have already started to degrade.

Plan before you build. Shift+Tab into plan mode for any non-trivial task. Five minutes of read-only analysis prevents thirty minutes of undoing a wrong approach. I still skip this step sometimes when I’m impatient, and I still regret it.

Match model to task. Use /model to switch between Opus, Sonnet, and Haiku mid-session. There’s no reason to pay Opus prices for Haiku-level work.

Context discipline is the single most useful habit I’ve built with Claude Code. The commands themselves are simple. The hard part is actually using them consistently — checking your budget, compressing proactively, resetting between tasks. Start with the session flow above and adapt it. It won’t take long before it’s second nature.


Share: Twitter LinkedIn