Auto-Update CLAUDE.md Every Time You Correct Claude
Every correction you make to Claude is a missed opportunity if you don't capture it permanently.
The pattern is simple: whenever Claude does something wrong and you correct it, follow up with "add a rule to CLAUDE.md so you never do this again." Claude will write the rule itself and apply it to all future sessions on that project.
# After correcting Claude Code:
"Add a rule to CLAUDE.md so you never make this mistake again."
This turns your corrections into institutional memory. Over time, your CLAUDE.md becomes a curated set of guardrails that reflect exactly how you like to work — your preferred error handling style, your naming conventions, when to ask vs. when to proceed, all of it.
A few rules worth seeding manually to get started:
# In CLAUDE.md
- Before writing any code, describe your approach and wait for approval.
- If a task touches more than 3 files, stop and break it into smaller steps first.
- After writing code, list what could break and suggest tests to cover it.
- When fixing a bug, write a failing test first, then fix until the test passes.
But the real power is that the file grows on its own. Every project ends up with a CLAUDE.md that is genuinely tailored — because you trained it, correction by correction.
Treat every mistake as a CLAUDE.md entry, and you'll make that mistake exactly once.
via @svpino
Log in to leave a comment.
The autoUpdatesChannel setting pins Claude Code to a stable release track that skips versions with major regressions.
The language setting makes Claude respond in your preferred language by default, across every session and project.
The attribution setting lets you customize or completely remove Claude's Co-Authored-By trailer from git commits and pull requests.