comment-cleanup

Remove unnecessary or outdated comments from source files.

14|4|Updated Oct 20, 2025
One-click install
npx skills add https://github.com/motlin/claude-code-plugins --skill comment-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: comment-cleanup
Source: https://github.com/motlin/claude-code-plugins/tree/main/plugins/code/skills/comment-cleanup
Command: npx skills add https://github.com/motlin/claude-code-plugins --skill comment-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Excessive, outdated, or poorly formatted comments clutter code, making it harder to read, understand, and maintain. This Skill helps you eliminate comment debt and ensure comments add genuine value.

Core Features & Use Cases

  • Minimalist Commenting: Advocates for using comments sparingly and removing commented-out code entirely.
  • Action-Oriented Comments: Prohibits comments that describe the process of changing code (e.g., "added," "removed") or emphasize different code versions.
  • Structured Placement: Enforces placing comments above the code they describe, avoiding end-of-line comments for better readability.
  • Use Case: When adding, editing, or removing comments, use this skill to automatically identify and refactor comments that violate best practices, ensuring your codebase remains clean, readable, and free of unnecessary noise.

Quick Start

Review the comments in data-processor.js and remove any unnecessary or poorly formatted ones.

Frequently Asked Questions about comment-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I remove unnecessary comments from my code?

Remove unnecessary comments by identifying outdated, redundant, or overly verbose remarks that don't add clarity. Keep only comments that explain *why* code exists, not *what* it does or how it changed—place them above the relevant code block, never at the end of lines.

What are the best practices for writing code comments?

Best practices for code comments include placing them above the code they describe, keeping them minimal and focused on intent rather than process, removing commented-out code entirely, and avoiding end-of-line comments that disrupt readability.

How do I clean up commented-out code in my codebase?

Clean up commented-out code by deleting it entirely rather than leaving it as comments. Version control systems track old code, making commented blocks unnecessary clutter that obscures current logic and maintenance intent.

Why should I avoid end-of-line comments?

End-of-line comments reduce readability by splitting your visual focus between code and explanation. Placing comments above code creates clear separation, improves line length consistency, and makes logic flow easier to follow.

Can I automate the removal of poorly formatted comments?

Yes, comment-cleanup guides automated refactoring of comments that violate best practices—removing process-oriented remarks, eliminating end-of-line comments, and deleting commented-out code across source files during maintenance tasks.