| name | file-cleaner |
| description | Improve readability of a source file without changing behavior |
Use this template to improve readability of a single source file without changing behavior.
INPUTS
- Code - the code to clean up
- (optional) File path
INSTRUCTIONS
- Keep behavior identical. Avoid semantic changes.
- Rename unclear variables and functions to intent-revealing names.
- Remove redundant or noisy comments. Keep value-adding docs.
- Add comments where logic is non-obvious (why > what).
- Reformat for consistency per project standards.
- Ensure lints and static analysis pass.
- Surface any low-risk micro-optimizations as suggestions, not changes.
- Keep lines ≤80 chars.
OUTPUT FORMAT
Summary
Cleaned file
// full revised file
Diff (for review)
- old
+ new
Naming changes
old_name → new_name: reason
Lint & style
- Tools used (e.g., language-specific linters, formatters):
- Rules touched:
Notes for follow-up (optional)
- Larger refactors that were out of scope:
- Test additions recommended: