From ring-default
Removes redundant and obvious comments following clean code principles while preserving meaningful documentation. Supports git scope filtering for staged, unstaged, branch, or commit-range changes.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ring-default:cleaning-comments [file-pattern=<pattern>] [git-scope=<scope>] [dry-run][file-pattern=<pattern>] [git-scope=<scope>] [dry-run]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
- Code has excessive, redundant, or obvious comments
Runs after: ring:exploring-codebases (optional, for architecture context)
Complementary: ring:exploring-codebases — run first for architecture-aware cleaning that preserves critical documentation
Analyze comments in code and remove those that violate clean code principles while preserving valuable ones. You can focus on git changes for faster, more relevant cleaning, or analyze the entire codebase.
Recommended workflow: Run ring:exploring-codebases first to understand the architecture, then clean comments with that context. This preserves architectural documentation, understands which comments are critical for complex modules, and respects project-specific documentation standards.
i++; // increment i} // end of if block style commentsBefore:
// Check if user is eligible for discount
if (user.age >= 65 && user.membershipYears >= 5) {
// Apply senior discount
total = total * 0.9 // multiply by 0.9 to get 10% discount
} // end if block
After:
if (user.isEligibleForSeniorDiscount()) {
total = total * SENIOR_DISCOUNT_RATE
}
If git-scope is specified, determine files in scope:
| Scope | Git command |
|---|---|
staged | git diff --cached --name-only --diff-filter=ACMR |
unstaged | git diff --name-only --diff-filter=ACMR |
all-changes | git diff HEAD --name-only --diff-filter=ACMR |
last-commit | git diff HEAD~1..HEAD --name-only --diff-filter=ACMR |
branch | git diff $(git merge-base HEAD main)..HEAD --name-only --diff-filter=ACMR |
commit-range=<range> | git diff <range> --name-only --diff-filter=ACMR |
If file-pattern is also specified, filter the git results to match. Show git statistics: scope name, file count, and first 10 filenames.
Clean Bad Comments
Preserve Good Comments
Suggest Code Improvements
npx claudepluginhub p/lerianstudio-ring-default-defaultRemoves unnecessary comments from git-scoped code files: branch changes since main, unstaged files, or commit ranges like HEAD~5..HEAD.
Rewrites unprofessional code comments into clear, professional ones and performs non-semantic cleanup such as removing dead code comments and fixing formatting. Useful before code review, handoff, or open-sourcing.
Enforces guidelines for clean code comments: use sparingly, ban commented-out code and change descriptions, avoid end-of-line comments. Use when adding, editing, or removing comments.