Claude Code Slash Commands: /compact, /review, Fast Mode, and Terminal Productivity Across Agentic Coding Workflows
- May 13
- 12 min read

Claude Code slash commands are best understood as the terminal productivity layer that lets developers control context, reviews, model behavior, command execution, cost visibility, and workflow state without leaving the coding session.
That matters because Claude Code is not only a conversational assistant for programming questions, since it is a terminal-based agentic coding environment where long sessions can involve codebase exploration, file edits, shell commands, review cycles, tool calls, and repeated context management.
Slash commands give developers a way to steer that environment deliberately, making them central to how Claude Code remains useful across longer coding tasks, debugging sessions, reviews, and interactive development workflows.
·····
Slash commands turn Claude Code into a terminal workflow interface rather than a simple prompt box.
Slash commands matter because they give developers direct control over the Claude Code session through concise commands that work inside the same terminal where the coding task is already happening.
Typing a slash command can switch workflow modes, compact context, launch a review, inspect usage, open diffs, manage memory, or invoke project-specific tools without forcing the developer to move into another interface.
This makes the terminal session feel less like a chat window and more like a command center for agentic software work.
The developer can alternate between asking Claude to reason, reviewing what it changed, running commands, managing context, and adjusting the model’s behavior as the task evolves.
That is especially useful in long sessions where productivity depends on keeping the environment organized rather than only asking better prompts.
Slash commands therefore act as the control surface that keeps Claude Code manageable as the workflow becomes more complex.
........
Why Slash Commands Matter in Claude Code
Command Role | Why It Improves Terminal Productivity |
Context control | Keeps long sessions usable and focused |
Review workflows | Helps developers inspect changes before committing |
Model and mode control | Adjusts behavior according to speed, cost, and task difficulty |
Usage visibility | Helps track token consumption and cost during work |
Extensibility | Allows skills, plugins, and MCP prompts to become command-driven workflows |
·····
/compact is the main command for preserving useful context while reducing session weight.
The /compact command is one of the most important Claude Code productivity tools because long agentic sessions can accumulate conversation history, file contents, command outputs, rejected attempts, and intermediate reasoning that eventually make the session heavier and less focused.
Compaction summarizes the conversation so far while freeing context space, which allows the developer to continue the same task without carrying every detail from the earlier session in full.
This is especially useful when the work is still active but the session has grown too large or too noisy.
The most effective use of /compact includes instructions that tell Claude what the summary should preserve, such as API changes, code samples, architectural decisions, failing tests, files touched, or unresolved implementation details.
That matters because compaction is not only about shrinking history.
It is about preserving the right working memory so the session can continue productively.
A poorly guided compaction may keep generic information while losing the details that matter most for the next step.
A well-guided compaction turns a long and cluttered session into a smaller continuation point that still carries the task forward.
........
How /compact Supports Long Claude Code Sessions
Context Problem | How /compact Helps |
Long conversation history | Replaces accumulated detail with a compressed summary |
Noisy intermediate work | Removes clutter from failed paths and side discussions |
Large file context | Preserves the relevant conclusions without keeping every token |
Ongoing task continuity | Allows the same task to continue after compression |
Focus preservation | Lets developers specify which details should remain important |
·····
/compact should be used differently from /clear because they solve different session problems.
The difference between /compact and /clear is important because both commands reduce context pressure, but they do so in very different ways.
The /compact command is best used when the developer wants to keep working on the same task but reduce the amount of session history that Claude must carry forward.
The /clear command is better when the current thread has become unhelpful, the task has changed, or the previous reasoning path is now more likely to confuse the model than help it.
This distinction matters because not every long session should be compressed.
Sometimes the better productivity move is to start fresh with a sharper prompt, especially when the conversation contains repeated corrections, abandoned ideas, or conflicting instructions.
In other cases, clearing the session would waste useful project knowledge, and compaction is the better choice because it preserves the important state while removing unnecessary weight.
Developers should therefore treat /compact as a continuation tool and /clear as a reset tool.
........
When to Use /compact Instead of /clear
Session Situation | Better Command |
Same task but too much accumulated history | /compact |
Same goal but context needs a sharper summary | /compact with focus instructions |
Completely new task | /clear |
Repeated failed attempts have polluted the thread | /clear |
Old context is now misleading | /clear |
·····
/review provides fast local feedback while deeper review commands serve higher-confidence pre-merge workflows.
The /review command is designed for quick local pull request review inside the current Claude Code session, making it useful when a developer wants fast feedback while still actively iterating on a change.
That kind of review is valuable because it can catch obvious mistakes, implementation gaps, inconsistent patterns, or areas that deserve closer inspection before the developer asks for a heavier review process.
The important distinction is that /review is not the only review-oriented command in the Claude Code workflow.
Deeper review paths, such as cloud-based multi-agent review, are better suited to substantial changes where broader coverage, independent checking, and higher pre-merge confidence matter more than speed.
Security-oriented review commands serve a different purpose again by focusing on vulnerabilities, risky diffs, authentication problems, injection risks, and potential data exposure.
This means review commands should be chosen based on the purpose of the review rather than treated as interchangeable shortcuts.
A quick local review helps during active development.
A deeper review helps before merge.
A security review helps when the risk profile of the change deserves specialized attention.
........
How Claude Code Review Commands Serve Different Needs
Review Type | Best Use |
/review | Fast local review during active development |
Deeper cloud review | Higher-confidence review before merging larger changes |
Security review | Focused inspection for vulnerabilities and risky patterns |
Diff inspection | Manual review of what changed before committing |
Iterative feedback | Repeated local checks while refining implementation |
·····
Fast mode is a latency tradeoff for interactive work rather than a universal model upgrade.
Fast mode should be described carefully because it is not a separate model and not a universal acceleration feature for every Claude Code configuration.
It is a speed-focused configuration for Opus 4.6 that trades higher per-token cost for lower latency while preserving the same model quality and capabilities.
This makes fast mode useful when the developer is working interactively and the cost of waiting is more important than the cost of tokens.
Rapid debugging, live iteration, and tight edit-test-review loops are good examples because the developer benefits from faster back-and-forth movement through the task.
However, fast mode is less appropriate for long autonomous tasks, background automation, batch work, or cost-sensitive workflows where latency is less important than total spend.
The practical rule is that fast mode should be used when responsiveness directly improves the development experience.
It should not be treated as the default choice for every long coding session.
........
Where Fast Mode Helps and Where It Does Not
Workflow Type | Fast Mode Fit |
Live debugging | Strong fit because responsiveness matters |
Rapid code iteration | Strong fit for interactive back-and-forth work |
Long autonomous tasks | Weaker fit because token cost can accumulate |
Batch processing | Weaker fit because speed may not justify cost |
Cost-sensitive sessions | Weaker fit unless latency is the primary constraint |
·····
Fast mode requires cost awareness because enabling it mid-session can make accumulated context more expensive.
Fast mode is most useful when developers understand its cost behavior before using it in long sessions.
Because Claude Code sessions can accumulate large amounts of context, switching into a higher-cost speed configuration after the conversation has already grown can make the entire carried context more expensive to process.
That creates a practical workflow lesson.
If fast mode is needed for a live debugging session or a rapid iteration session, it may be better to enable it early in a fresh or compacted session rather than after hours of accumulated context.
The cost issue becomes especially important for teams and organizations where many developers may run multiple concurrent sessions.
A persistent fast-mode setting can increase spend if it remains active longer than intended or if users forget that the session is operating in a higher-cost mode.
This is why enterprise controls and per-session opt-in behavior matter.
Fast mode can improve productivity, but it should be paired with usage awareness, session discipline, and organizational cost controls.
........
Why Fast Mode Needs Session Discipline
Cost Factor | Why It Matters |
Accumulated context | Larger sessions become more expensive under higher-cost processing |
Mid-session switching | Can apply fast-mode pricing to a large existing context |
Multiple concurrent sessions | Increases the risk of persistent high-cost usage |
Long autonomous tasks | Can spend more without improving developer experience proportionally |
Team settings | Admin controls can reduce accidental cost escalation |
·····
/context, /usage, and related commands help developers manage capacity and cost during long work.
Claude Code productivity improves when developers actively monitor context and usage rather than waiting for the session to become slow, expensive, or unfocused.
The /context command helps developers understand how much of the working window is being used and which categories of content are contributing to context pressure.
This is useful because long coding sessions often accumulate hidden weight from file reads, tool outputs, repeated prompts, and background discussion.
Usage and cost commands serve a related purpose by making token consumption and spending more visible during active work.
That matters because developers can adjust behavior when they see that a session is becoming expensive or context-heavy.
They can compact the conversation, clear the session, reduce unnecessary file loading, narrow the task, or switch models and modes when appropriate.
These commands turn context and cost management into an active part of terminal productivity rather than a surprise at the end of the session.
........
How Context and Usage Commands Support Productivity
Command Purpose | Productivity Benefit |
Context visibility | Shows when the session is becoming too large |
Usage inspection | Helps track token consumption during work |
Cost awareness | Encourages better model and mode choices |
Optimization suggestions | Helps reduce unnecessary context pressure |
Session planning | Supports better decisions about compacting or clearing |
·····
/diff and review-oriented commands make Claude Code changes easier to inspect before committing.
A coding agent is only useful if its changes can be reviewed clearly.
The /diff command and related review workflows help developers inspect what Claude has changed before committing or asking for deeper review.
This matters because agentic coding can modify several files across a task, and the developer needs a reliable way to understand the final state of the work.
A diff-oriented workflow turns Claude’s edits into something closer to a normal software review process.
The developer can inspect uncommitted changes, compare per-turn edits, and identify whether the agent touched files that were outside the intended scope.
This creates a healthier relationship between automation and control.
Claude can help implement and revise, but the developer still reviews the code as code rather than accepting the conversational explanation alone.
That inspection step is especially important for multi-file changes, refactors, migrations, and bug fixes where the agent’s reasoning may sound plausible even if the actual diff needs correction.
........
Why Diff Inspection Matters in Agentic Coding
Review Need | Why It Matters |
Change visibility | Shows exactly what the agent modified |
Scope control | Helps detect edits outside the intended task |
Review confidence | Supports normal developer inspection before commit |
Regression prevention | Reveals risky or unnecessary changes |
Iterative refinement | Helps guide the next prompt or correction |
·····
/btw supports side questions without polluting the main task context.
The /btw command is useful because developers often need quick side answers during a coding session without wanting those answers to become part of the main conversation history.
That matters because long Claude Code sessions can become cluttered when every small clarification, unrelated curiosity, or side question remains in the active thread.
A side question may be useful in the moment, but it may not deserve to influence the coding task that Claude is currently executing.
Using a side-question command keeps the main context cleaner while still allowing the developer to ask for clarification.
This is especially helpful during debugging or refactoring, where the primary thread should remain focused on the task, files, failures, and decisions that matter for implementation.
The result is better context hygiene.
The developer can still ask incidental questions, but the main session does not become diluted by unrelated material.
........
Why Side Questions Should Stay Out of the Main Context
Side-Question Problem | Why /btw Helps |
Context pollution | Keeps unrelated questions out of the main thread |
Task focus | Preserves the active coding objective |
Short clarifications | Allows quick answers without long-term context impact |
Debugging discipline | Prevents side topics from distracting the model |
Long-session hygiene | Reduces unnecessary growth in conversation history |
·····
Shell mode and background tasks make terminal productivity stronger when developers need direct command control.
Claude Code productivity is not only about slash commands because the terminal environment also supports direct shell interaction and background task handling.
Shell mode allows developers to run commands directly while keeping the result connected to the coding session when useful.
This is important because not every command should be delegated to Claude.
Sometimes the developer knows exactly what command to run and wants the output available as context for the next step.
Background task support is equally important for long-running commands such as builds, test suites, package installs, development servers, Docker operations, or infrastructure tooling.
Instead of blocking the entire session, a long command can continue running while the developer and Claude keep working on other parts of the task.
This improves flow because coding work often involves waiting for processes that do not require continuous attention.
Terminal productivity comes from combining agentic assistance with direct developer control over the shell.
........
How Shell and Background Work Improve Claude Code Sessions
Terminal Capability | Why It Improves Productivity |
Direct shell commands | Lets developers run known commands without delegating them |
Output as context | Makes command results available for follow-up reasoning |
Background tasks | Prevents long commands from blocking the session |
Development servers | Supports live work while services keep running |
Test and build workflows | Allows ongoing execution alongside coding work |
·····
Rewind, undo, and interruption controls help developers recover when a session moves in the wrong direction.
Long agentic coding sessions need recovery mechanisms because not every path will be correct.
Claude may start solving the wrong problem, make an edit that the developer does not want, or follow a reasoning path that becomes less useful after new information appears.
Commands and shortcuts that stop, rewind, or undo work are therefore important productivity tools.
They give developers a way to recover without abandoning the entire session unnecessarily.
Stopping the agent mid-action can preserve useful context while preventing further unwanted work.
Rewinding can return the conversation and code state to an earlier point when a later branch of work became unproductive.
Undoing changes can restore the project after an unwanted edit.
These controls matter because agentic coding is iterative.
The system becomes more usable when developers can correct direction quickly and safely rather than treating every mistake as a full reset.
........
Why Recovery Controls Matter in Claude Code
Recovery Need | Why It Matters |
Stop unwanted action | Prevents the agent from continuing down a bad path |
Restore earlier state | Recovers from unhelpful reasoning or edits |
Undo changes | Reverses modifications that should not remain |
Preserve useful context | Avoids unnecessary full-session resets |
Improve iteration speed | Lets developers correct direction quickly |
·····
Slash commands become more powerful when they are extended through skills, plugins, and MCP servers.
Claude Code slash commands are not limited to a fixed built-in list because they can also represent bundled skills, user-authored skills, plugin commands, and prompts exposed by MCP servers.
This makes the slash-command system an extensibility surface as well as a productivity surface.
A team can create repeatable workflows that appear as commands, allowing developers to trigger project-specific actions without rewriting long prompts each time.
An MCP server can expose prompts that behave like commands, which means connected external tools can become part of the terminal command menu.
This matters for organizations because it turns common workflows into shared interface elements.
A team might create commands for release checks, migration reviews, documentation updates, issue triage, or service-specific debugging routines.
The result is that slash commands can encode team knowledge into repeatable terminal workflows.
That makes Claude Code more consistent across developers and projects.
........
Why Extensible Commands Matter for Teams
Extension Source | Workflow Value |
Bundled skills | Provide ready-made repeatable capabilities |
User-authored skills | Let individuals package personal workflows |
Plugin commands | Add functionality beyond built-in commands |
MCP prompts | Bring connected tool workflows into the command menu |
Team workflows | Standardize repeated development procedures |
·····
Claude Code slash commands matter most when developers actively manage context, cost, review, and execution from the terminal.
The strongest way to understand Claude Code slash commands is to treat them as a workflow control system for agentic coding rather than as a list of shortcuts.
The commands matter because they let developers keep long sessions focused, reduce context pressure, review code changes, control speed and cost, inspect usage, recover from bad paths, and invoke repeatable workflows from the same terminal where the work is happening.
The most important commands each solve a different productivity problem.
/compact keeps ongoing work usable when the session becomes heavy.
/review provides quick local feedback while the work is still in motion.
Fast mode improves responsiveness when live iteration matters more than cost.
/context, /usage, /diff, /btw, shell mode, background tasks, and recovery controls help developers manage the practical realities of long coding sessions.
Together, these commands make Claude Code more effective because they give developers control over the agent’s working environment.
That control is what turns Claude Code from a coding assistant into a practical terminal workflow system.
·····
FOLLOW US FOR MORE.
·····
DATA STUDIOS
·····
·····



