
Code Comment Cleaner
Find and remove commented-out dead code across 8 languages (JS, TS, Python, Java, Go, Rust, HTML, CSS) while preserving TODOs, FIXMEs, license headers, disabled tests, and real documentation. Previews every change first and writes .bak backups before it touches a file.
- Strip abandoned logic from legacy files before a major refactor.
- Automate codebase technical debt cleanup during PR preparation.
- Identify and remove stale code blocks while keeping critical TODOs and notes.
$5
· or 25 creditsSecure checkout via Stripe
Included in download
- Strip abandoned logic from legacy files before a major refactor.
- Identify and remove stale code blocks while keeping critical TODOs and notes.
- terminal, file_read, file_write automation included
- Includes example output and usage patterns
Sample input
Run a --dry-run to find dead commented-out code in the current directory and show me what would be removed or preserved.
Sample output
PREVIEW: 3 candidate removals found.
- lib/auth.ts [L42-45]: Commented-out 'if' block.
- main.py [L12-18]: Block contains 'def' and 'return'. PRESERVED:
- utils.js [L5]: Preservation reason: Contains 'TODO'. Cleanup requires confirmation. Shall I create .bak files and proceed?
Find and remove commented-out dead code across 8 languages (JS, TS, Python, Java, Go, Rust, HTML, CSS) while preserving TODOs, FIXMEs, license headers, disabled tests, and real documentation. Previews every change first and writes .bak backups before it touches a file.
$5
· or 25 creditsSecure checkout via Stripe
Also available in a bundle
Included in download
- Strip abandoned logic from legacy files before a major refactor.
- Identify and remove stale code blocks while keeping critical TODOs and notes.
- terminal, file_read, file_write automation included
- Includes example output and usage patterns
- Instant install
Sample input
Run a --dry-run to find dead commented-out code in the current directory and show me what would be removed or preserved.
Sample output
PREVIEW: 3 candidate removals found.
- lib/auth.ts [L42-45]: Commented-out 'if' block.
- main.py [L12-18]: Block contains 'def' and 'return'. PRESERVED:
- utils.js [L5]: Preservation reason: Contains 'TODO'. Cleanup requires confirmation. Shall I create .bak files and proceed?
About This Skill
The Intelligent Surgical Cleaner for Your Codebase
Code Comment Cleaner is a specialized tool designed to automate the tedious task of "spring cleaning" technical debt. It identifies and removes dead, commented-out code blocks that clutter your files, making your codebase more readable and maintainable without the risk of losing important context.
How it Works
Unlike simple regex deletes, this skill uses a sophisticated two-pass logic. First, it identifies "code indicators" (like brackets, keywords, and assignments) within comments to detect abandoned logic. Second, it runs a strict set of preservation rules. It explicitly protects:
- TODOs, FIXMEs, and developer notes
- License headers and copyright notices
- Disabled tests and natural language documentation
- Multi-line prose and architectural explanations
Safety First Workflow
Built for a developer's peace of mind, the skill never deletes blindly. It generates a detailed preview report showing exactly which lines are targeted and why. Upon confirmation, it creates .bak backups before applying changes. It supports JavaScript, TypeScript, Python, Java, Go, Rust, HTML, and CSS.
Why Pay for This?
Prompting a generic AI to "clean my code" often results in lost documentation or broken license headers. This skill provides a deterministic, repeatable, and safe framework that handles multi-line syntax across 8+ languages while respecting the human-written notes you actually need to keep.
Use Cases
- Strip abandoned logic from legacy files before a major refactor.
- Automate codebase technical debt cleanup during PR preparation.
- Identify and remove stale code blocks while keeping critical TODOs and notes.
- Safely clean multi-language projects (JS, Python, Go) with automated backups.
Known Limitations
- Preview mode is highly recommended before deletion
- May mistake heavily commented code as explanatory (review preview)
- Does not distinguish between intentionally disabled code and dead code
- License headers preserved by default (can be overridden)
- Works best with language-native comment syntax
- Single file mode is more accurate than bulk scanning
How to Install
mkdir -p ~/.claude/skills && curl -sL https://www.agensi.io/api/install/code-comment-cleaner -o /tmp/code-comment-cleaner.zip && unzip -o /tmp/code-comment-cleaner.zip -d ~/.claude/skills && rm /tmp/code-comment-cleaner.zipFree skills install directly. Paid skills require purchase - use the download button above after buying.
Reviews
No reviews yet - be the first to share your experience.
Only users who have downloaded or purchased this skill can leave a review.
Early access skill
Be the first to review this skill.
Only users who have downloaded or purchased this skill can leave a review.
Security Scanned
Passed automated security review
Permissions
File Scopes
Code Comment Cleaner needs terminal access to run find commands for scanning multiple files and to create backup copies. File read access scans source files for commented code patterns. File write access only occurs after user explicitly confirms "yes" to cleaning; it then creates a .bak backup and writes the cleaned version. No browser, network, or environment access required.
Works with Claude Code and Codex. Creates backups as `.bak` files before any deletion. User confirms each file before changes.
Creator
JustHandled Labs builds focused agent skills for the work nobody wants to do by hand. Each one is a single repeatable job done well: catching the security and data mistakes that quietly ship, keeping docs and tests honest, gating the commands an agent is about to run, sharpening writing, and handling the founder chores around launches, outreach, and brand setup. Not generic AI productivity. Specific workflows that are easy to run, review, and repeat. Maintained by H.J. Westerfield, with a background in communications, editing, project coordination, customer support, and practical AI systems. Tools for people who want useful automation without theatrical complexity.
Also available in a bundle
Frequently Asked Questions
Learn More About AI Agent Skills
More Premium Skills

Legacy Code Modernization Planner for AI Coding Agents
Creates safe modernization roadmaps for old, messy, undocumented, or fragile codebases, including risk audits, refactor phases, dependency reviews, testing plans, migration steps, and AI coding prompts.
Multi-Agent Orchestration Master Library
Transform Claude Code into a coordinated multi-agent system. Battle-tested tmux orchestration patterns, YAML task queues, event-driven communication, and parallel worker management for 8+ agents.

inline-comment
Best way to steer your agents, effortlessly.
designing-hybrid-context-layers
Architects the right retrieval strategy for every query — teaching your agent when to use RAG, a knowledge graph, or a temporal index instead of defaulting to vector search for everything.