I keep adding one boring rule to Claude Code setups: Before editing, it has to prove it is looking at the right file. The check is simple:
- show the exact path it plans to edit
- quote the relevant lines it inspected
- name the boundary it thinks the change belongs to
- name the verification command it expects to run This catches more real mistakes than most longer prompt rules I have tried. The failures are usually not dramatic. They are things like editing a generated file, patching an old structure from memory, creating a parallel helper because it did not search first, or changing a sibling module with a similar name. It slows the first minute down. It saves the cleanup hour. What pre-edit rule has actually reduced bad edits in your Claude Code workflow? submitted by /u/anderson_the_one
Originally posted by u/anderson_the_one on r/ClaudeCode
You must log in or # to comment.
