Walkthrough

Slash Commands

The built-ins worth memorizing: /init, /clear, /resume, /memory, /compact.

Slash commands are first-class shortcuts in Claude Code. Each one fires a specific behavior — write a memory file, clear context, summarize the session. Knowing them is the difference between fighting the chat and steering it.

Steps · 0 / 4 done
  1. Try /init

    Generates or updates CLAUDE.md by reading your repo. Use it once per project, then prune the output.

    /init
    VerifyA CLAUDE.md is written or updated at the project root.
  2. Use /clear when context drifts

    /clear wipes the conversation but keeps your project memory. Run it when you switch tasks — fresh context produces sharper plans.

    /clear
    VerifyThe chat starts a new session; CLAUDE.md is still loaded.
  3. Resume a long session with /resume

    If you closed Claude Code and want to pick up where you left off, /resume loads the previous session.

    /resume
    VerifyThe agent restates the goal of the prior session before you continue.
  4. Compact when you must keep going

    /compact summarizes the conversation so far so context doesn't blow up. Less destructive than /clear when you need continuity.

    /compact
    VerifyThe session continues with a much smaller context window than before.
Check your understanding
Q1. What's the difference between /clear and /compact?
· Tick off the 4 step(s) above.
· Score 100% on the quiz.