/nlsmdn:review-comments [targets...] [--all | --staged | --unpushed | --changed | --fix | --report]from nlsmdn
Review and clean up code comments for necessity, accuracy, non-duplication, clarity, and concise explanation of rationale. Use when comments may restate code, repeat a "why" already explained in the file, contain stale or vague claims, or need tightening before a PR.
Ships in nlsmdn. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Review each comment in its full-file context, then offer actionable removals, rewrites, or code refactors.
--staged - git staged files--unpushed - files changed across all unpushed commits--changed - git unstaged changes--all - entire codebase (parallel agents)--fix - apply safe comment-only removals and rewrites without prompting--report - report findings only: no prompt and no edits; cannot combine with --fixtargets - one or more source files or directories; overrides scope flags--staged --changed combined; when both are empty, --unpushed/review-comments # staged + changed, else unpushed (default)
/review-comments --all # entire codebase
/review-comments --fix # review and auto-fix
/review-comments src/auth # review a file or directory
// @ts-ignore, // eslint-disable, // noinspection) look like "what" comments but are functional. Removing them silently breaks linting or type checking.--staged on a clean working tree (everything already committed) reviews nothing and reports "No files to review" — which looks like a passing review. Use --all after committing.From $ARGUMENTS, determine scope:
| Flags Present | Scope |
|---|---|
| (none) | --staged --changed; if both are empty, --unpushed |
--all | Entire codebase |
--staged | Staged files only |
--unpushed | Files changed across unpushed commits |
--changed | Unstaged files only |
--staged --changed | Both |
| targets provided | Target files or directories; overrides scope flags |
Strip known flags from $ARGUMENTS. Treat any remaining non-flag arguments as targets.
For targets:
Review each source file directly. For each directory, recursively find source files under it using the same exclusions as --all. Deduplicate the combined list. If no target exists or none contains source files, report "No files to review" and stop.
For --staged:
git diff --cached --name-only
For --unpushed:
# Range from oldest unpushed commit's parent to HEAD.
git diff --name-only "$(git rev-list HEAD --not --remotes | tail -1)^"..HEAD
If nothing is unpushed, or there is no remote/upstream (or the range walks back to the root commit) so it can't be determined reliably, stop and ask the user to pick another scope.
For --changed:
git diff --name-only
For the default: combine the --staged and --changed lists. If both are empty, use the --unpushed list and say so (Clean working tree — reviewing unpushed commits). If that is empty or unresolvable too, report "No files to review" and ask for a target or scope.
For --all:
# Use Glob to find all source files
**/*.{ts,tsx,js,jsx,py,go,java,kt,swift,rs,c,cpp,h,hpp,cs,rb,php}
Filter to only source code files (exclude node_modules, build dirs, etc.).
Apply any comment conventions from the repository's applicable agent instructions in addition to this rubric.
For targets or --staged/--changed/--unpushed (small file lists): Read each file in full and analyze its comments against the surrounding declarations, control flow, and other comments in that file. Review comments outside the changed hunks too when they duplicate or contradict a comment in the changed code.
For --all (large codebase): Split files into balanced batches that each worker can read in full:
Prompt per batch:
---
Review comments in these files for quality issues:
{file_list}
Read every assigned file in full. For each comment, determine whether it:
1. Repeats rationale already explained elsewhere in the same file, even with different wording
2. Explains a useful constraint or tradeoff less clearly or concisely than it could
3. Restates code or compensates for weak naming/structure
4. Makes an inaccurate, stale, vague, or unverifiable claim
5. Leaves old code commented out instead of relying on version control
6. Uses TODO/FIXME without naming the concrete action, blocker, or stable issue reference
7. Adds no information a maintainer needs
Do not flag a comment merely because it is long or uses a particular style. Report only actionable findings. Preserve functional directives, legal notices, generated markers, and comments whose repetition is necessary at separate hazardous call sites.
Apply any comment conventions in the repository's applicable agent instructions.
Return findings in this format:
## {filename}
- Line {n}: "{comment}" → {issue type}; {remove, exact rewrite, or refactor}. If duplicated, cite the earlier authoritative line.
---
## Comment Review: {scope}
### Issues Found
#### {filename}
| Line | Current Comment | Issue | Suggestion |
|------|-----------------|-------|------------|
| {n} | "{comment}" | {Duplicate rationale / Verbose rationale / Unclear rationale / Stale claim / What not why / Commented-out code / Vague TODO / Noise} | {exact removal, rewrite, or refactor} |
### Summary
- Files reviewed: {count}
- Issues found: {count}
- Most common issue: {type}
If --report flag is present: Stop after the Step 4 report. Do not prompt and do not edit any file.
If --fix flag is present: Skip the prompt and apply safe comment-only dispositions: remove duplicates, noise, and commented-out code; rewrite useful but unclear or verbose rationale. Do not rename symbols, extract functions, restructure executable code, or invent missing rationale. Leave refactor-only and unverifiable findings unchanged and list them as deferred in the cleanup summary.
Otherwise, if issues were found, ask the user:
Found {n} comments with actionable improvements. How would you like to proceed?
1. **Apply recommendations** - Remove, rewrite, or refactor each finding as reported
2. **Remove only** - Delete only comments classified as duplicate or noise
3. **Cherry-pick** - Show me each one and I'll decide
4. **Skip** - Keep the report, don't change anything
Based on user choice:
Option 1 (Apply recommendations):
Option 2 (Remove only):
Option 3 (Cherry-pick):
// increment counter - Remove? (y/n/stop)"Option 4 (Skip):
Judge comments by meaning, not by whether they superficially fit the "why" pattern.
For every non-functional comment:
Report only findings with a concrete improvement. For a rewrite, provide replacement text rather than saying only "make concise." For duplicate rationale, cite both locations and say which one should remain.
TODO: fix this without a concrete action or traceable blockerInstead of "what" comments, prefer:
# Loop through users and check if active
for user in users:
if user.is_active:
active_users.append(user)
active_users = [u for u in users if u.is_active]
# Use binary search here because users list is sorted and can exceed 100k items
index = bisect.bisect_left(sorted_users, target_user)
# Preserve insertion order because the export format is user-visible.
ordered_fields = collect_fields(schema)
# Keep these fields ordered so exports remain stable for users.
return serialize(ordered_fields)
Keep the first comment if it establishes the invariant for the whole operation; remove the second because it adds no new constraint. Keep both only if the locations can be changed independently and each is unsafe without the local warning.
# We need to make a copy of this list here. The reason is that callers often retain
# the original list and later compare it with the result, and sorting the same list
# in place would therefore create surprising behavior for them.
items = list(items)
Rewrite as:
# Copy before sorting so callers' lists remain unchanged.
items = list(items)
Solution: Skip license headers, legal notices, generated markers, and regulatory annotations. Assess API documentation (JSDoc, docstrings) against its public contract rather than forcing it into the "why" rubric; flag it only when it is inaccurate, duplicated, or needlessly unclear.
Solution: Focus on structural patterns (e.g., comments restating the next line of code are low-quality in any language). For framework-specific annotations or directives you do not recognize, leave them in place and flag them for manual review rather than removing them.
--all on large codebases, parallel agents significantly speed up reviewWhat SKILL.md sets; muted values are Claude Code's defaults
mediumnpx claudepluginhub nielsmadan/skills --plugin nlsmdn65 skills in this plugin
/blind-spotsSurface consequential decisions a plan, design, or research brief left silently assumed, by interviewing the user in dependency order. Use when the user says "blind spots", "grill me", "stress-test this plan", "poke holes in this", "what am I missing", "interrogate this design", "what haven't I decided", or needs a loose idea or research brief clarified before work begins. Do NOT use for a clear factual lookup, to explain a previous reply in more detail (use `huh`), to generate ideas when it is unclear what to build (use `ideation`), or to review an already-written plan with agents (use `review-plan`)./brainstormWork out how to solve a problem the user can already name — interview them with `blind-spots` to understand it, generate structurally different approaches, validate each with an independent critic, then present the survivors with trade-offs and a recommendation. Use when the user says "brainstorm", "brainstorm approaches", "how should we solve/approach/tackle X", "what are our options", "compare approaches", "think this through with me", or wants solutions weighed before committing. Works on any topic, with codebase recon when a repo is involved; `--debate` adds external advisors for high-stakes calls. Do NOT use when stuck on what to build or what the problem is (use `ideation`), to probe an already-chosen plan (use `blind-spots`), or to pick a library or service (use `evaluate-tech`).