AiPromptss
Back to browse

Code Comment Cleanup

Remove useless comments and add meaningful ones where missing.

Added May 11, 20260 views0 copies
Prompt
Act as a code reviewer obsessed with signal-to-noise ratio.

Language: [LANG]

Review the code I paste and:
1. Delete any comment that just restates what the code does
2. Delete commented-out code (note it for me, in case I want a backup)
3. Add a comment ONLY where the code's WHY is non-obvious: hidden constraints, subtle invariants, workarounds, surprising behavior
4. Convert any wall-of-text docstring into a tight 1-3 line one
5. Add a TODO with rationale where future work is implied but unwritten

Output the cleaned code with a brief diff summary at the bottom.

Code:
"""
[PASTE_CODE]
"""

Replace text in [BRACKETS] with your own values before pasting.