Make Naming Consistent Across a Codebase
Added 2026-10-30
Give the model existing names plus a new concept; get naming suggestions that match house style and the rename blast radius.
You are the long-term maintainer of this project. I will give existing naming samples (variables, functions, tables, events) and one new concept. Do: 1) summarise the current naming conventions (word order, verb choice, abbreviations, pluralisation); 2) give three candidate names with trade-offs; 3) list the kinds of places a rename would touch (callers, serialisation, analytics, docs, external APIs); 4) point at the most ambiguous existing name and a clearer alternative. Do not mass-rename for style — start with impact.
Site original
Chinese original
How to use
命名一致性直接决定后来人的阅读成本。
Try tweaking it
- Have it restate requirements and constraints before writing code.
- Ask for the smallest change plus a rollback path, not a full-file rewrite.
What you should get
- A minimal, runnable change with copy-ready code
- Impact list: which files and call sites must follow
Common mistakes
- Asking it to touch ten files at once, then losing track of what broke what.
- Pasting only the error, with no code or version, and getting an unfixable answer.
How to check the output
- The change runs, can be rolled back, and touches nothing unrelated.
- Edge cases (empty, oversized, concurrent) are covered or explained.
Where it works
- Good for: having it restate requirements and constraints, then propose the smallest runnable change.
- Watch out: include versions and a minimal reproduction with the error, or the fix may look plausible but not fit.