Command reference ยท Claude Code
/memory
Edits CLAUDE.md memory files, toggles auto-memory on/off, and shows auto-memory entries.
Edits CLAUDE.md memory files, toggles auto-memory on/off, and shows auto-memory entries.
โ WHEN TO USE IT?
Capture a permanent rule for all future sessions
Use /memory to write a standing instruction like 'always use TypeScript strict mode' into CLAUDE.md instead of repeating it every time.
Review auto-memory entries
Run /memory to see which rules Claude has automatically saved as auto-memory from earlier sessions.
โ WHEN NOT TO?
An instruction only applies to the current task
/memory writes to CLAUDE.md, which persists beyond the session โ unnecessary for a one-off instruction and it clutters the file.
Better: Give the instruction directly in the current session's prompt without saving it to CLAUDE.md.
SOURCES
- Claude Code Doku (offiziell) โ code.claude.com