CLAUDE.md and memory: how my rules load in every session
Every Claude Code session I start already knows my writing rules, my workflow and what I decided last week. Two rule files and a memory folder make that happen.
Three layers
Three sources load before I type a word:
Skills load differently. Claude sees the description of every skill and reads the full text of a skill only when a task matches. The skills article covers the details.
How a preference becomes a rule
When I correct something in a review, Claude saves a feedback memory. The file puts the rule first, then a "Why" line that records what went wrong, then a "How to apply" line. Claude adds a one-line pointer to the index, and every later session sees the pointer.
Rules that return graduate. My dash rule exists as three near-duplicate memory files from separate corrections. The rule now lives in the global CLAUDE.md, which loads in every session.
Rules checked by a program
A rule in a file gets forgotten under pressure, so two of my rules have automatic checks:
- Copy. A script reads any prose before I deliver the prose and fails on the patterns my rules ban. The script cannot catch every pattern, so the rules also require a reread by hand.
- Design. A hook fires after every file write in HTML, CSS, JSX or TSX. The hook starts my design checker and returns each banned pattern to Claude with an error code. Claude fixes the pattern at once.
A third hook clears leftover processes when a session starts.
Three rules and why each exists
- No em dashes or en dashes. Models add dashes by habit. The rule began when I flagged dashes in my own interface copy, and a script now checks for dashes.
- Type-check, lint, tests and build must all pass before Claude says done. A claim of done that skips the build wastes the reader's time, so the chain gates every claim of done.
- Read the source for every port, path and config value. A wrong guess looks plausible and sends work to the wrong service. A parallel rule covers facts: check every number against a primary source.
Anything about a client, a price or a person stays out of this page. Only I can read the memory files that hold those details.