# 🧹 Code Comment Cleaner

> Preview code-like comment blocks across JavaScript, TypeScript, Python, Java, Go, Rust, HTML, and CSS. Preservation rules run before candidate detection; confirmed cleanups create .bak backups and remove only reviewed ranges.

🧹 Code Comment Cleaner is a paid AI agent skill on Agensi by JustHandled Labs, in Code Quality & Review. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $5 (one-time purchase)
- Creator: [JustHandled Labs](https://www.agensi.io/creators/justhandled)
- Category: [Code Quality & Review](https://www.agensi.io/skills/code-quality-review)
- Uses: 1
- Version: 1.2
- Last updated: 2026-10-15
- Security: scan passed (2026-06-09); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/code-comment-cleaner
- Tags: code-review, refactoring, clean-code, javascript, python

## About this skill

### Review commented-out code before deleting it

Use Code Comment Cleaner to build a file-and-line preview of comment blocks that look like abandoned implementation across supported source files. It treats uncertain matches as review candidates, not proof of dead code.

### Apply explicit preservation rules first

The workflow keeps blocks that match TODO, FIXME, NOTE, or XXX markers; license or copyright terms; and disabled-test patterns. It also preserves a narrow natural-language sentence pattern. Project-specific directives, docstrings, examples, generated sections, and unusual prose still need human review.

### Require confirmation before a write

Preview mode changes nothing. Clean mode repeats the preview, asks for confirmation, creates a .bak beside each changed file, rechecks the proposed ranges, and removes only the reviewed blocks from bottom to top.

### Cover eight language families

Rules are defined for JavaScript and TypeScript, Python, Java, Go, Rust, HTML, and CSS comment styles. Unknown file types require a decision before scanning.

### Know the limitation

This is a procedural SKILL.md workflow with reference patterns, not a bundled parser or deterministic executable. Results depend on the agent's scanner implementation and can produce false positives or false negatives; review the diff and run the repository's normal checks afterward.

## Known limitations

- Procedural workflow only; no bundled executable scanner or parser.
- Heuristics can produce false positives and false negatives, especially in docstrings, directives, templates, and unusual syntax.
- Single-line detection requires runs of at least 3 adjacent code-like comment lines; shorter runs are not candidates under the published rule.
- Preservation rules are narrow and cannot recognize every project-specific note, example, directive, or intentionally disabled block.
- Preview and confirmation are required; after cleanup, review the diff and run tests, lint, and build.
- Unknown file types require an explicit decision.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the 🧹 Code Comment Cleaner skill from Agensi" and describe your task.
3. Buy it on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### How does the skill differentiate between 'dead code' and important notes?

It applies preservation patterns before candidate detection. TODO, FIXME, NOTE, and XXX markers, license or copyright terms, disabled-test patterns, and a narrow prose-sentence rule are preserved. Everything else remains a heuristic candidate that must be reviewed.

### Which programming languages is this skill compatible with?

Rules are defined for JavaScript and TypeScript (.js, .jsx, .mjs, .cjs, .ts, .tsx), Python (.py, .pyw), Java (.java), Go (.go), Rust (.rs), HTML (.html, .htm), and CSS (.css). Unknown file types require a decision before scanning.

### Will this skill permanently delete my comments without any preview?

No. The workflow requires a full preview before clean mode, explicit confirmation before any write, and a .bak backup beside each changed file. Review the resulting diff and run the project tests afterward.

### What is included with my purchase of the Code Comment Cleaner?

You receive the SKILL.md workflow and reference pattern guide for the supported comment styles. The package does not include a deterministic scanner executable.

### Can't I just ask a standard AI agent to 'clean my code' for free?

The value is the repeatable preview, confirmation, backup, and verification workflow plus an explicit pattern guide. It does not make heuristic classification infallible; you still review every candidate before removal.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
