Back to Blog

coding-agents

Clean Up Comment Noise with ring:cleaning-comments

Use ring:cleaning-comments to strip redundant comments in git-scoped code while preserving meaningful documentation.

OpenAgentSkillPublished:

Where this fits

You’ve just finished a refactor. The logic is clearer, but the code is still littered with comments like // increment counter and // get user by ID. Deleting them manually is tedious, and you’re not sure which comments carry context worth keeping. That’s where ring:cleaning-comments fits: it acts as a focused cleanup pass for your agent, targeting only comment noise in the files you’re about to commit, while respecting the documentation that matters.

Why agents benefit

  • Scoped cleanup without context loss: The skill filters by git scope — staged, unstaged, branch, or commit range — so your agent only touches comments in the relevant diff, not the whole codebase.
  • Preserves meaningful documentation: It follows clean code principles and distinguishes obvious noise from comments that explain non-obvious decisions, APIs, or domain rules.
  • Safe for review workflows: With dry-run support, your agent can show proposed deletions before making changes, making it suitable for code review checklists.
  • Reduces manual review overhead: Instead of asking an agent to "clean comments" and hoping for the best, you get a repeatable skill with explicit skip conditions for docs, generated code, and third-party files.
  • Composes with exploration: Pairing it with ring:exploring-codebases first gives your agent architectural context, so it won’t delete comments that document critical system invariants.

Practical scenarios

Pre-commit cleanup after a refactor

You’ve extracted a function and renamed variables. The surrounding comments are now stale or redundant. Run the skill with git-scope=staged to clean only the files you’re about to commit, keeping the diff readable for reviewers.

Code review pass on a feature branch

While reviewing a pull request, your agent can scan the full branch diff and flag obvious comment clutter: commented-out code blocks, placeholder comments, and lines that simply restate the code. The reviewer then focuses on actual logic and design.

Removing commented-out code blocks

Commented-out legacy code accumulates over time. The skill identifies these blocks in your working tree or a commit range, letting your agent safely remove them while preserving any explanatory note that accompanies them.

Add it to your agent workflow

Install with:

npx skills add LerianStudio/ring --skill ring:cleaning-comments

Then invoke it with optional arguments:

[file-pattern=<pattern>] [git-scope=<scope>] [dry-run]

Example: let your agent clean only unstaged changes and preview what would be removed.

npx skills run ring:cleaning-comments --git-scope=unstaged --dry-run

For a broader perspective on how this skill fits into agent skill discovery, you can also browse its listing at OpenAgentSkill.

Compare before adopting

Before making it a permanent part of your workflow, evaluate a few signals. Check whether the skill’s clean-code definition matches your team’s documentation standards; quality signals like clear README examples and active issue responses matter more than star count. Look at maintenance freshness — is the repo updated for recent agent runtime changes? Consider alternatives: writing your own LLM prompt may be simpler, but a maintained skill gives you scoping, dry-run, and skip logic out of the box. Finally, test it on a small branch to see if the output aligns with your review expectations.

Why it is worth tracking

With 210 stars and steady development from LerianStudio, ring:cleaning-comments is a practical example of a narrowly scoped agent skill that solves a real developer annoyance. It’s worth evaluating now because comment hygiene problems are universal, and a reusable, git-aware skill is more reliable than ad-hoc prompting. Revisit it if your codebase grows, your review standards tighten, or you start combining it with architecture-aware skills like ring:exploring-codebases.

Featured Skill

ring:cleaning-comments

Skill by LerianStudio