Claude Code (Agentic CLI)
The moves that make Claude Code fast — slash commands, file references, plan mode, memory, subagents, MCP, and headless runs.
Everyday
- Reference a file
- Type
@path/to/file— pulls it into context - Slash commands
/help·/clear(reset context) ·/model·/agents- Add a memory
- Start a line with
#— Claude writes it toCLAUDE.md - Undo / rewind
/rewindor pressEsctwice to edit an earlier message- Run shell yourself
- Prefix with
!to run a bash command directly
Plan before doing
- Plan mode
⇧Tabcycles modes → Plan mode: Claude researches & proposes, edits nothing until you approve- Auto-accept edits
⇧Tabto the auto-accept mode for hands-off editing- Interrupt
Esc— stop the current action and redirect
Context & config
- CLAUDE.md
- Project instructions auto-loaded every session — conventions, commands, do/don’t
- Subagents
/agents— spawn specialized agents (own context) for parallel/isolated work- MCP servers
/mcp— connect external tools/data (databases, issue trackers, docs)- Hooks
- Shell commands that fire on events (e.g. run tests/format after an edit)
Automate (headless)
- One-shot
claude -p "summarize the diff"— print result and exit- Pipe in / out
git diff | claude -p "write a commit message"- Resume a session
claude --resume(or--continuethe latest)- In CI
- Headless mode + a scoped prompt = code review, triage, or codemods in a pipeline