Refactoring Suggestions

Claude
zerostring February 10, 2026 Code Generation
Description

Suggest code refactoring improvements

Prompt
Review the following code and suggest refactoring improvements focused on readability and maintainability.

Specifically evaluate:
Naming of variables, functions, and classes
Function length and responsibility (single-responsibility principle)
Code structure and logical flow
Duplication and opportunities for abstraction
Comment quality (missing, redundant, or misleading comments)
Consistency in formatting and style

For each suggestion:
Explain why the change improves readability
Provide before/after code snippets where helpful
Keep behavior and output functionally identical unless explicitly stated

Avoid performance micro-optimizations unless they also improve clarity.
[PASTE CODE HERE]
Tags
#code #optimization #performance
Rate this Prompt
1 votes Login to Vote