Memory: so Claude does not start from zero
Per-project notes that Claude writes and reads by itself, a global file for my personal setup, and a hook that keeps it all in sync between my computers.
The problem
Every session starts with a blank slate. Without help I would spend the first ten minutes of each one re-explaining the project, my preferences and the things that went wrong last time.
Three layers
- Per-project memory. Each project folder has a small set of notes that Claude maintains: who I am, how I like to work, the state and decisions of the project, and pointers to where things live. Each note is one fact in its own file, and an index file is loaded at the start of every session. Over time this became one memory folder per project, with well over a hundred notes in total.
- A global instruction file. A single
CLAUDE.mdin my home folder holds what is true for every project: that all my keyboards are US layout, that I prefer systems in English, a short map of my home network and the safety rules that must always hold. It is read at every start, so I keep it short: on 19 November I moved the detail into skills that load only when needed (see Skills and plugins), and kept a full safety copy of the original. - A per-project instruction file, where a repository needs one, for rules that belong to that code only: the commands to run, what not to touch, how it gets published. This very site has one, which says for instance not to push unless I ask.
Keeping it alive
- Feedback becomes memory. When I correct Claude (“that was the wrong page”, “don’t share this on a website”) the correction is written down together with the reason, so the same mistake does not come back.
- A consolidation pass. From time to time a skill reads all the notes, merges duplicates, fixes stale dates and trims the index.
- Sync between computers. The memory folders live in a cloud drive, and a small hook at the start of each session makes sure every project points to them. See Hooks.
Cautions
Memory notes contain things that must never be public: addresses, names, now and then a secret that I should not have pasted. They stay on a private drive and never in a repository. And this is why the pages on this site about my home setup are written in a generic way: the memory knows the details, the website does not need them.