You tell Claude "don't use that word". It fixes it. Then a new session starts and the mistake is back.
Claude Code has auto memory, where Claude writes notes about your corrections and preferences itself. That is useful, but you do not choose what it keeps. This guide is the other route: a file you control. You decide which corrections count, and each one is a note you can read and edit.
01 / 06
The setup in three parts
Make a file called
corrections.mdin your project folder.In your
CLAUDE.md, the fileClaude Code reads at the start of every session, add a line that says to read
corrections.mdbefore any job.Add the line that makes it stick: every time you correct
Claude, it asks whether it should add the correction to the file.
Now each fix takes one yes. You do not have to do the parts by hand. This one prompt does all three.
02 / 06
The setup prompt
Open Claude Code in your project folder, then paste this.
The @corrections.md line is an import. Anthropic's memory docs say CLAUDE.md files can import other files with @path, and that Claude reads CLAUDE.md at the start of every session.
03 / 06
What a filled-in file looks like
# Corrections Things I (Claude) got wrong in this project and was told how to fix. Read this at the start of every session and obey it. ## Rules (newest first) - 2026-03-12 WRONG: wrote prices as "$1,200.00". RIGHT: write whole-dollar prices as "$1,200" with no cents. WHY: the shop never charges cents. - 2026-03-09 WRONG: put the call to action at the top of every email. RIGHT: put it in the last paragraph, one per email. WHY: readers drop off when asked too early. - 2026-03-02 WRONG: renamed files while tidying the folder. RIGHT: never rename or move files without asking first. WHY: other tools point to those names.
A good rule names the situation. "Be more concise" is too vague to help. "Client emails stay under 120 words" works.
Download the ZIP for the setup prompt and the example file.
04 / 06
Keep the file short
Clean the file out once a month. Delete rules that no longer apply. A long file gets followed less closely: Anthropic's docs say longer CLAUDE.md files use more context and reduce how closely Claude follows them, and suggest staying under 200 lines. The prompt also makes Claude ask before it cuts anything past 30 rules.
05 / 06
Test it safely
Correct
Claude on something small, such as "always write dates like 3 Mar 2026".
Claude should fix it, then ask "Should I add this to corrections.md?" and show the rule. Say yes.
Check that one line was added to
corrections.md.Start a new session (type
/clearor open a new window) and ask for a task with a date in it. It should follow the rule without being told.
Where was this tested? The author ran the prompt on a dummy project. Claude created the file and block, asked before saving, saved after a yes, and a fresh session followed the date rule on dates it had not seen. Not tested: files over 20 lines, the 30-rule cap, a correction that conflicts with an older one, and the import loading in a live Claude Code session. A rule loaded this way is a request to Claude, not a lock, so check its work.
Common mistakes
Vague rules. Name the file, tool or situation.
Saving one-off fixes. If a correction applies to only one task, do not save it.
Never cleaning the file. Read it once a month.
Putting facts about your business here. This file is for fixes to
Claude's behaviour. Facts belong in
CLAUDE.mditself.Committing a private file. In a team, commit
corrections.mdso everyone benefits. If it holds anything private, add it to.gitignoreinstead.
How is this different from auto memory?
Auto memory is notes Claude writes itself. This file is one you write and approve. Every correction is saved only after your yes, and you can edit it.
Will Claude always obey the rules?
Not always. Claude treats these files as context, not enforced settings. They make a repeat mistake much less likely, so keep checking.
Do I need to code?
No. You paste one prompt and say yes to the first correction.
What if two rules conflict?
The prompt tells Claude to replace the older rule and say so.
Finish line
What to do next
Paste the setup prompt into one project.
Correct
Claude once and say yes.
Open a new session and check it follows the rule. Put a monthly reminder in your calendar to clean the file.
Back to all the free guides. Two that pair well with this one: teach Claude your business and AI guardrails that hold.
You reached the end of the guide