Code review & debugging21 categories
Better names for these things
When you've written `data2`, `handleThing`, or `utils`.
Suggest better names for the identifiers in this code. For each one worth renaming: - The current name, and specifically what is wrong with it - Three alternatives - Which you'd pick and why Prefer names that say what something *is* or *does* over what type it is. Avoid `data`, `info`, `manager`, `helper`, `utils`, `handle`, `process` unless genuinely accurate. Match the conventions already present in the surrounding code โ tell me what those conventions appear to be. Code:
Making it yours
- Paste your own material where the prompt asks for it. Everything above that line is instruction, not content.
- Delete any rule that does not apply to you. A shorter prompt that fits beats a thorough one that does not.
- If the answer comes back vague, add a line saying what you do not want. Constraints work better than encouragement.
Refactoring and design calls. Cutting code down, naming things properly, and choosing between two workable options.
Related prompts
Delete as much of this as possibleCode that works but feels bigger than the problem.Improve these error messagesErrors that say "something went wrong".Critique this API designBefore other people start depending on an interface you're designing.Should I add this dependency?Before `npm install` on something you could write yourself.Name this functionYou've called it doThing and you know it.Two fixes, pick oneTwo plausible approaches and no strong feeling about either.
Keep this one
Phrasery saves prompts with a right-click and puts them back the same way. Add this to your own library in one click.
Add to your browser โ free