Library / Refactor

Rename safely

Rename a symbol everywhere without collateral edits.

Refactor rename refactor scope Claude Code
The prompt
Rename <old> to <new> across the codebase. Update all references and imports, and don't touch any unrelated code. Show me the list of files changed.

Why it works

The explicit “don’t touch unrelated code” guard rail keeps a rename from turning into a drive-by refactor. Asking for the changed-files list gives you a quick review surface.

Fill in

  • <old> / <new> — the current and desired names.

Follow-ups

  • “Also update the docs and comments that mention the old name.”