Blog
 » 

Claude

 » 
Claude Code Slash Commands: Full Reference Guide

Claude Code Slash Commands: Full Reference Guide

Explore the full reference guide for Claude Code slash commands to boost your productivity and streamline your workflow.

Jesus Vargas

By 

Jesus Vargas

Updated on

Apr 10, 2026

.

Reviewed by 

Why Trust Our Content

Claude Code Slash Commands: Full Reference Guide

Claude Code slash commands are the fastest way to control session behaviour without leaving the terminal. Most developers learn two or three and miss the rest.

This guide covers every built-in command, what it actually does, and how to build custom commands for repeated workflows. Bookmark it and run /help to confirm what is live in your version.

 

Key Takeaways

  • Slash commands control session behaviour: They modify how Claude Code operates: context, mode, and output review, not running code directly.
  • /compact is the most important command: It summarises the conversation to preserve token budget without losing working context.
  • Custom commands extend your workflow: Any Markdown file in .claude/commands/ becomes a reusable slash command for your project.
  • /init generates CLAUDE.md automatically: It scans the project and creates a starting-point memory file faster than writing one from scratch.
  • Most commands work in headless mode: /clear, /compact, and custom commands all function in CI/CD pipelines.
  • /help is always current: Running it inside a session returns the command list for your installed version.

 

AI App Development

Your Business. Powered by AI

We build AI-driven apps that don’t just solve problems—they transform how people experience your product.

 

 

What Are Claude Code Slash Commands and How Do They Differ from CLI Flags?

Slash commands are typed inside an active Claude Code session and control real-time session behaviour. CLI flags are passed at launch and cannot be changed mid-session. Both are part of Claude Code, but they operate at different layers.

Slash commands work inside a running session. CLI flags like --headless or --dangerously-skip-permissions are set at startup.

  • Session-level control: Slash commands modify behaviour in real time: clearing context, compacting memory, or triggering a code review.
  • Launch-time flags: CLI flags configure the environment before the session starts and cannot be updated mid-run.
  • Natural language vs commands: Prompts tell Claude what to do with code; slash commands trigger specific internal behaviours. Both are used together in a session.
  • Two command types: Built-in commands ship with Claude Code and are always available. Custom commands are defined by you in .claude/commands/.
  • Always check /help first: The returned list reflects your installed version, not documentation that may be out of date.

For flags, startup options, and non-interactive usage, the full CLI commands reference covers that layer of the tool separately.

 

What Does /clear Do and When Should You Use It?

/clear wipes the entire conversation context and starts a fresh session. Use it when switching to a completely unrelated task, not as a way to reduce token usage mid-task.

/clear removes all prior messages, file reads, and task history. It is a full reset.

  • Full context wipe: All prior messages, file reads, and task history are gone after /clear runs.
  • CLAUDE.md reloads automatically: Project-level memory files are reloaded on the new session. User-level memory persists across sessions by design.
  • Switch tasks cleanly: Use /clear only when moving to something completely unrelated, where carry-over context would confuse outputs.
  • Not for token management: If you want to reduce token usage without losing the working thread, /compact is the right command.
  • Cost implication: A cleared session reloads context from scratch, including any file reads Claude had already completed. Use it deliberately.

Running /clear mid-task means starting over. If you are in the middle of a multi-step change, use /compact instead.

 

What Does /compact Do and When Should You Use It?

/compact summarises the current conversation into a condensed representation, reducing token usage while preserving working context and recent decisions. Use it proactively before the window fills.

Claude Code operates within a 200K token context window. On large codebases or long sessions, this fills faster than expected.

  • Preserves working context: /compact keeps the thread alive. /clear discards it entirely.
  • Proactive use wins: Run /compact before output quality degrades, not after. By the time responses worsen, useful context may already be lost.
  • Review the summary: After compacting, Claude confirms what was retained. Check that critical decisions and file states are captured.
  • Extended sessions: /compact significantly extends the usable session on complex, multi-file tasks where context accumulates quickly.
  • Not a last resort: Treat it as routine session hygiene on any session longer than 30 minutes.

For sessions working on large features, combining /compact with plan mode vs auto mode decisions gives you the most control over token usage and task execution.

 

What Does /review Do and What Does It Actually Check?

/review triggers a structured code review of the current working state. It evaluates recent changes for correctness, potential issues, and alignment with project conventions.

/review is not the same as asking Claude to "review this code" in a prompt.

  • Structured output format: /review activates a dedicated review mode with consistent output: issues, suggestions, and a summary. Free-form prompts produce conversational responses instead.
  • Scope is the current session: It reviews code written or modified in the current session, not the entire codebase on every call.
  • Use at checkpoints: Run /review after a significant generation block, before committing, or at natural task transitions.
  • Not a constant interrupt: Running /review on every small change slows the session without proportionate benefit.
  • Action it as a checklist: The structured output of severity-labelled findings is designed to be worked through before running tests.

The /review output is most useful when you treat it as a pre-commit gate rather than a mid-task commentary.

 

What Do /help, /settings, and /release-notes Do?

These three commands handle session information and configuration. /help shows available commands, /settings manages session configuration, and /release-notes displays the changelog for your installed version.

Use this group for housekeeping and version awareness rather than task execution.

  • /help is your version-accurate reference: It returns the full list of available commands for your installed version, without leaving the terminal.
  • /settings opens configuration: Covers permission levels, tool access, and output preferences without editing config files directly.
  • /release-notes shows your version changelog: Displays changes for the installed Claude Code version, useful after an update.
  • Post-update workflow: Run /release-notes after updating to check for new commands, then run /help to confirm they are active in the current session.

Keep these three in mind after every Claude Code update. New commands ship without announcements in most terminal environments.

 

What Do /init, /terminal, and /vim Do?

/init generates a CLAUDE.md file from your project structure. /terminal opens an embedded terminal pane. /vim enables Vim keybindings. All three reduce context-switching during active development.

These commands integrate Claude Code more tightly into your working environment.

  • /init saves 15-30 minutes: It scans the current directory and generates a CLAUDE.md with your stack, structure, and key files as a starting point.
  • Edit after /init: The generated file is a draft, not a final configuration. Review and refine it before relying on it.
  • When to run /init: At the start of working with an unfamiliar codebase, or when setting up a new project before writing CLAUDE.md from scratch.
  • /terminal keeps you in context: Opens an embedded terminal pane for running commands, checking test output, or verifying file state.
  • /vim for Vim users: Enables Vim keybindings in the Claude Code editor interface, removing the input model switch cost for developers who use Vim navigation by default.

Run /init on any new project before writing a single prompt. The generated CLAUDE.md gives Claude Code its first accurate picture of your codebase.

 

How Do Custom Slash Commands Work in .claude/commands/?

Any Markdown file placed in .claude/commands/ at the project root becomes a slash command. A file named deploy-check.md is invoked as /deploy-check. Claude executes the file contents as if you had typed the prompt directly.

Custom commands turn repeated prompts into one-keystroke operations.

  • File equals command: Name the file what you want to type. pre-commit-review.md becomes /pre-commit-review.
  • Contents are executed as prompts: Write the command file as a complete instruction set in Markdown. Claude runs it with full access to the current session context.
  • Practical use cases: Pre-commit review checklists, code style enforcement prompts, structured debugging sequences, deployment verification steps.
  • User-level commands: Place .claude/commands/ in ~/.claude/commands/ to make commands available across all projects, not just the current one.
  • No argument passing: Custom commands execute static file content. Dynamic behaviour requires prompt engineering within the file itself.

Custom commands work in automated pipelines too. See the guide on running Claude Code in headless mode for how to call them non-interactively.

 

Conclusion

Slash commands are a small surface with high leverage. The difference between burning through context on a long session and managing it deliberately comes down to /compact usage.

The custom command system in .claude/commands/ is what most developers never find. It turns Claude Code from a reactive tool into a consistent workflow layer.

Run /help in your next session to see the current command list for your version. Then create one custom command for the most-repeated prompt you type manually.

 

AI App Development

Your Business. Powered by AI

We build AI-driven apps that don’t just solve problems—they transform how people experience your product.

 

 

Want to Build Consistent Claude Code Workflows at Scale?

Most teams get Claude Code working for individual developers but never reach consistent output across a team. The gap is almost always in the CLAUDE.md setup, the custom command structure, and the session management habits.

At LowCode Agency, we are a strategic product team, not a dev shop. We build AI-powered development workflows using Claude Code as an orchestration layer, configured so it produces reliable, repeatable output across every developer on the team.

  • Workflow scoping: We map your development process and identify where Claude Code commands and custom prompts reduce the most manual overhead.
  • CLAUDE.md architecture: We design the project memory file so Claude Code understands your codebase conventions from the first session.
  • Custom command library: We build the .claude/commands/ set for your specific review, deploy, and enforcement workflows.
  • Headless and CI integration: We configure Claude Code to run in your pipeline with the right commands, flags, and output handling.
  • Team rollout: We set up the shared command structure so every developer on the team uses the same workflow layer, not individual ad-hoc prompts.
  • Prompt engineering: We write the custom command files so Claude Code produces structured, actionable output on every run, not variable free-form responses.
  • Full product team: Strategy, design, development, and QA from a single team that treats your Claude Code setup as a product, not a configuration task.

We have built 350+ products for clients including Coca-Cola, American Express, and Medtronic.

If you want Claude Code producing consistent results across your entire team, talk to our team.

Last updated on 

April 10, 2026

.

Jesus Vargas

Jesus Vargas

 - 

Founder

Jesus is a visionary entrepreneur and tech expert. After nearly a decade working in web development, he founded LowCode Agency to help businesses optimize their operations through custom software solutions. 

Custom Automation Solutions

Save Hours Every Week

We automate your daily operations, save you 100+ hours a month, and position your business to scale effortlessly.

FAQs

What are Claude Code slash commands used for?

How do I access slash commands in Claude Code?

Can I customize Claude Code slash commands?

Are slash commands in Claude Code case-sensitive?

What are common errors when using slash commands in Claude Code?

Is there a way to see all available slash commands in Claude Code?

Watch the full conversation between Jesus Vargas and Kristin Kenzie

Honest talk on no-code myths, AI realities, pricing mistakes, and what 330+ apps taught us.
We’re making this video available to our close network first! Drop your email and see it instantly.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Why customers trust us for no-code development

Expertise
We’ve built 330+ amazing projects with no-code.
Process
Our process-oriented approach ensures a stress-free experience.
Support
With a 30+ strong team, we’ll support your business growth.