Claude Code
Context Commands
Context management
12 commands
Commands
Initialize CLAUDE.md
$ /init
Create project CLAUDE.md context file.
Add directory to context
$ /add-dir ./src
Add a directory to the working context.
Compact conversation
$ /compact
Condense conversation history to save tokens.
Compact with focus
$ /compact authentication
Compact conversation while preserving specific topic.
Clear conversation
$ /clear
Clear conversation history completely.
View token usage breakdown
$ /context
Display detailed token usage breakdown.
Show cost
$ /cost
Display token usage and estimated costs.
View session statistics
$ /stats
Show usage statistics and trends.
View session status
$ /status
View current session metadata.
Edit memory files
$ /memory
Edit persistent memory files.
Rewind to checkpoint
$ /rewind
Return to previous checkpoint (or press Esc twice).
Export conversation
$ /export
Save conversation to a file.