function loadOrders() {
// const data = await legacyApi.get("/orders");
// const items = data.items;
// return items;
// TODO: add pagination before 10k orders
// Keep batching low to protect the upstream rate limit.
return fetchOrders();
}
Code Comment Cleaner
Preview code-like comment candidates across JavaScript, TypeScript, Python, Java, Go, Rust, HTML, and CSS, then confirm only the reviewed ranges you want removed.
What it does
Code Comment Cleaner builds a review queue of code-like comment blocks across JavaScript, TypeScript, Python, Java, Go, Rust, HTML, and CSS. It looks for implementation signals such as assignments, calls, control flow, brackets, and multi-line syntax, then applies preservation rules before proposing any removal.
The result is a preview, not a blind search-and-delete. You see which lines were classified as candidates and why before deciding whether the cleanup should be written.
Package boundary: the purchase contains a procedural SKILL.md workflow and language-specific reference patterns. It does not bundle a deterministic scanner executable, so results depend on the agent's implementation and still require review.
See the preview-first workflow
The walkthrough shows the intended sequence: read the preservation rules, preview exact candidates without changing files, keep a TODO, confirm the reviewed cleanup, create a .bak backup, remove only the approved block, and run the repository check.
Representative run: this is a truthful walkthrough of the published procedural workflow, not a deterministic bundled scanner. Your agent's implementation and repository results can vary, so review every proposed removal.
Preview what leaves—and what stays
This illustrative example shows the published two-pass behavior. The review step remains necessary for project-specific comments.
- candidateLines 2–4: three adjacent code-like comment lines.
- keepLine 5: actionable TODO marker.
- reviewLine 6: project-specific prose still needs human judgment.
What it is designed to preserve
- TODO, FIXME, NOTE, and XXX markers.
- License and copyright terms covered by the reference patterns.
- Disabled-test comments containing both
testandskipordisabled. - A narrow natural-language sentence pattern: capitalized, period-ended, and without a code indicator.
These defined preservation patterns win over detection. Project-specific directives, docstrings, examples, generated sections, and unusual prose can fall outside them and must be reviewed manually.
Where it helps
- Cleaning an inherited repository before a larger refactor.
- Removing abandoned experiments and debug calls before code review.
- Reducing comment clutter after an AI-assisted implementation pass.
- Separating obsolete source code from the documentation future maintainers still need.
- Creating a narrow, reversible cleanup commit instead of mixing deletions into feature work.
How to run
Get it on Agensi and run it with any agent that reads SKILL.md, such as Claude Code, Codex, or Cursor. Define the directories and file types in scope, review the candidate report, inspect the proposed diff, and confirm only the removals you accept.
Safety and permissions
The published listing declares terminal access for scanning and backup creation, read access to supported source files, and write access for source and .bak files only after explicit confirmation. It declares no browser, network, or environment access.
The confirmed workflow writes backup copies before modifying a file. Keep the repository on a clean branch and run its normal tests, lint, type checks, and build afterward; a comment classifier cannot prove that every project-specific directive or embedded example is harmless to remove.
Use it as a reversible cleanup
Comment cleanup should separate obsolete implementation from documentation, legal text, TODOs, tool directives, disabled tests, and explanations of intent. Follow the preview-first commented-code cleanup guide to define the scope, classify candidates, inspect the diff, and verify the repository after the write.
Questions
How does it distinguish dead code from useful comments?
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. Everything else remains a heuristic candidate that must be reviewed.
Which languages does it support?
JavaScript, TypeScript, Python, Java, Go, Rust, HTML, and CSS.
Will it delete comments without a preview?
No. It produces a proposed removal set first. File writes occur only after explicit confirmation, and backup copies are created before confirmed changes.
What permissions does it use?
Terminal access for scanning and backups, read access for supported source files, and confirmed write access for source and .bak files. The package is a procedural workflow with reference patterns, not a bundled executable scanner.
Add Code Comment Cleaner to your toolkit.
Current price and purchase option are shown on Agensi. Instant download. Works with any agent that reads SKILL.md.
Get Code Comment Cleaner on Agensi