| name | file-cleaner |
| description | Improve readability of a single source file without changing behavior. Use when the user wants to clean up, refactor for readability, or improve code style. |
Use this template to improve readability of a single source file without changing behavior.
INPUTS
- PROJECT_CONTEXT
- SOURCE_FILE // full file text
- (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_CONTEXT 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: