Video summary

Slash Commands in Claude Code | CampusX

Main summary

Key takeaways

Technology

Overview

This tutorial (CampusX, speaker: Nitesh) is a practical walkthrough of using slash commands in Claude / Cloud Code. It explains what slash commands are, how they integrate with Cloud Code sessions, best practices for managing sessions, and demonstrates the most useful commands for everyday development.

Key concepts

  • Slash commands: short prebuilt shortcuts that start with / and are typed inside a Cloud Code session to trigger predefined workflows instead of writing long prompts.
  • Sessions: a single conversation with Cloud Code. Start a session by running the CLI and end it with /exit. Each session has a unique ID, stores the full message history, is saved automatically, and can be resumed later.
  • Command types:
    • Built-in commands: provided by Cloud Code.
    • Custom commands: user-created for repetitive workflows.

Session management and best practices

  • Start or resume sessions:
    • Resume past sessions from the CLI with the flag claude -r.
    • Switch/resume between sessions using /resume.
  • Rename sessions immediately with /rename <name> so context is clear later.
  • Keep one task per session (for example, one feature per session) to avoid context pollution.
  • Commit frequently inside sessions when you reach milestones.
  • Export important sessions to your project before major refactors, e.g. /export filename.md.

Tip: Use /btw for side lookups so those answers don’t become part of the main conversation history and don’t pollute session context.

Practical commands

Grouped by purpose. Use the CLI’s / to view the full list interactively.

Session control

  • /exit — close session
  • /resume — switch/resume another session
  • /rename <name> — rename current session
  • /export <file>.md — save conversation into a project file

Ephemeral / reference queries

  • /btw (by the way) — ask side questions whose answers do NOT become part of the main conversation history (useful for lookups)

Account / login / usage

  • /logout — log out of Cloud Code
  • /login (or launching the CLI) — start the login flow (browser auth, account options)
  • /usage — show session and weekly token usage
  • /extra-usage — top up usage (pay to add tokens)
  • /stats — basic usage statistics
  • /insights — generate a detailed HTML report about your usage and recommendations

Model selection and strategy

  • /model — choose among Anthropic models:
    • Opus: most powerful and most expensive; best for planning, architecture, and specs.
    • Sonet: balanced/default; best for code generation and implementation.
    • HQ: cheapest and fastest; for simple repetitive tasks.
  • Recommended pattern: use Opus for planning/specs, Sonet for the actual code generation and implementation.

Tools, permissions and configuration

  • /config — change Cloud Code settings (thinking mode, verbose, progress bar, language, etc.)
  • /permissions — allow/ask/deny tools (file read/write, bash, web search). Permissions rules can be saved locally, globally (project), or per user.
    • Caution: do not allow dangerous bash commands to run unattended.

UI and input modes

  • /theme — change CLI theme (dark, light, etc.)
  • /voice — toggle voice input (hold space to speak)

Notes on workflow and usage

  • Sessions are resumable even after terminal close; they’re stored automatically and can be exported for future refactor/context.
  • Use /btw to keep a session’s context clean — side queries won’t pollute history.
  • Monitor /usage often — Opus consumes tokens quickly, so prefer Sonet for most implementation work.
  • /insights and /stats become more meaningful after many sessions; run /insights after ~10–15 sessions to review patterns.
  • You can view the complete list of slash commands by typing / in the CLI and scrolling.

Speaker and sources

  • Speaker: Nitesh (CampusX YouTube channel)
  • Product / provider referenced: Claude / Cloud Code (Anthropic models: Opus, Sonet, HQ)

Rate this summary

Your feedback will help improve summaries.

Improve this summary

Reprocess with a stronger model when the summary feels incomplete or inaccurate.

Pro

Translate summary in another language

Pro

Ask questions to this video

Chat for follow-up questions, clarifications, and source-backed answers.

Coming soon

Share this summary

Original video