Sometimes you notice a rule worth keeping right in the middle of a task. You do not have to stop and open a file. Claude Code lets you add memory on the fly by typing #.
How it works
Start a line with # and type your note. Claude saves it into CLAUDE.md for you, so it becomes part of the persistent guidance from then on:
# Always run npm run lint before committing
That single line gets folded into your memory file. Next session, Claude already knows it. No context switch, no hunting for the right file.
When to use it
The # shortcut shines for those small realizations that come up as you work. Claude keeps making the same wrong assumption, or you spot a convention worth writing down — capture it the moment you notice it. Quick capture beats a note you meant to add later and forgot.
Keep it tidy afterward
Because # is fast, notes can pile up over time. It is worth reviewing them now and then. Use /memory to open your memory files, read what has accumulated, and clean up: reword a hasty note, move it to the right section, or delete it if it no longer applies.
A quick workflow
Capture with # in the moment, review with /memory later. That pairing lets you record rules without breaking your flow while still keeping the file focused. Think of # as a fast inbox for memory and /memory as the place you sort it out.
Comments
Be the first to comment.