You ask the AI to use const instead of var. It fixes it. In the next conversation, it writes var again, and you correct it again. It's true for code and for any preference, like "answer in plain English" or "skip the fluff": a correction you make in one session doesn't carry over to the next. Reflect, a mod built by Bayram Annakov (open source, MIT license), fixes that: it notices when you correct Claude Code and offers to save the rule to CLAUDE.md, the preferences file Claude reads at the start of every session.
If you don't know what a mod is yet, start with this pos:
In short, it's a change to the app itself, not just to the instructions you give the AI.
Reflect only steps in when you correct something
It doesn't turn everything you write into a rule. First comes a cheap screening: only messages from you get through, up to 500 characters, that aren't slash commands or an "ok" or "continue", and with nothing that looks like a password. Then a call to a small model (Haiku) receives your message and Claude's last reply, and decides whether it's a rule worth keeping. It works in any language. In practice:
- "no, use const instead of var": a correction that holds every time, so it becomes a rule.
- "now do something else": a one-off redirect, so it doesn't.
- "ok, continue": doesn't even pass the screening.
If the model's confidence is low, or the rule comes out too long, it's dropped. The text of your prompt isn't stored. And every message that passes the screening costs one small call, which counts toward your usage like any other.
A strip shows the rule before saving it
When it's a correction, a strip appears above the prompt with the rule already written. In practice:
You write: "no, use const instead of var". Above the prompt, the finished rule appears, something like "Use const, not var", with buttons to save, switch scope, edit or skip. You click save.
There are four buttons: save to the project file (./CLAUDE.md) or the global one (~/.claude/CLAUDE.md), depending on the scope the model suggested; switch to the other scope; edit; or skip. Edit puts remember: <rule> in the empty prompt box so you can reword it yourself. You decide, right then.
You correct it once. The rule stays written.
Each rule goes to the right file
Scope sets how far the rule reaches. const over var is your own taste and fits any project, so it belongs in the global file. "Use pnpm, not npm" only makes sense in that one repository, so it goes in the project file.
Each rule goes in as a list item inside a marked section. Before writing, Reflect re-reads the file and doesn't repeat a rule that's already there. The rule also takes effect in the current session, without waiting for the next one, as long as you stay in the project it belongs to. And if you correct the same var three times, Reflect merges them into one line, with a counter.
Three shortcuts for everyday use
remember: always answer in plain English
/reflect-queue
/reflect-pause
remember: skips the model and takes your sentence straight to the strip, handy when you already know the rule you want. /reflect-queue lists the rules it found that are still waiting for a decision, in this project and globally. /reflect-pause turns the checking off and on.
How to install it
claude plugin marketplace add bayramannakov/claude-reflect
claude plugin install reflect-mod@claude-reflect-marketplaceIt needs Claude Code 2.1.286 or newer, with mods. The same project also has a Python plugin version, and you install one or the other, never both.
Correcting the AI once is teaching. Correcting the same thing again next week is just repeating yourself. Next time you type "no, use const", it's worth asking whether that conversation really had to happen, or whether the rule could already have been written down.





Comments (0)
Comments are moderated and if they violate our Terms and Conditions of use, the comment will be deleted. Persistence in violation will result in a ban of your account.