Learn · Claude Code fundamentals · CCAR-F
Commands and checkpoints
/init, /context, /compact, /clear and /rewind: the commands that manage a session, and what checkpoints can and can't undo.
Key ideas
- /init generates a starter CLAUDE.md by analysing the repo.
- /context shows what is using the context window; /compact [focus] summarises to free space.
- /clear starts a fresh conversation between unrelated tasks; /resume picks up an earlier session.
- /plan or Shift+Tab enters plan mode; Shift+Tab cycles default, acceptEdits and plan.
- Every prompt creates a checkpoint; /rewind or Esc Esc restores code, conversation or both.
- Bash file changes and edits outside Claude Code aren't tracked: checkpoints are not version control.
Worked example: A first session
Initialise memory, explore, plan, execute, then compact while keeping what you agreed.
Exam traps
- Expecting /rewind to undo an rm run through Bash. Bash file changes aren't tracked.
- Treating checkpoints as a replacement for Git commits.
- Confusing /context (what uses the window) with /compact (summarise to free it).
- Piling unrelated tasks into one long conversation instead of using /clear.
Official docs
Practise CCAR-F questions · Next lesson: The CLAUDE.md hierarchy