PhraseryPhrasery homeGet Phrasery
Code review & debugging21 categories

Delete as much of this as possible

Code that works but feels bigger than the problem.

Longrefactoringsimplification
Make this code smaller without changing what it does.

Look for:
- Abstractions with exactly one caller
- Options and flags nobody uses
- Defensive checks for states that cannot occur
- Hand-rolled logic the language or standard library already provides
- Intermediate variables and helpers that only get used once
- Comments explaining code that could just be clearer

Show the rewritten version, then list what you removed and why it was safe to remove. If something looks redundant but you are not certain it is, flag it separately rather than deleting it.

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

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