Drives comment cleanup using the uncomment tool: audits and removes noise comments while preserving TODO, FIXME, HACK, directives, and ~keep markers. Use for decluttering code or enforcing a comment policy.
Ships in preferences-code-and-collaboration-conventions. 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.
This skill is the operational enforcement arm of the code-comments policy defined in preferences-style-and-conventions §"Code comments"; it does not restate that policy but drives it over real trees.
It is a workflow sibling to preferences-git-history-cleanup, and like it, a comment-only cleanup is a legitimate standalone change.
The tool's own usage skill is uncomment, written by its upstream and pinned to the same release as uncomment-bin; load it for the commands, the scan record fields, keep, tag linting, configuration layering and the Rust library.
This skill adds what that one leaves out: the policy's cautions about what uncomment removes by default and why it never runs unattended, the classification gate between census and apply, and this repository's configuration, the hardened uncomment.toml template beside this file.
The workflow is built on this repository's uncomment-bin package (pkgs/by-name/uncomment-bin), a tree-sitter comment remover whose bare invocation is allow-by-default, not deny-by-default: it preserves TODO, FIXME, HACK, XXX, NOSONAR (in any case), NOTE and WARNING (upper case only), the ~keep marker, doc comments, and linting directives (eslint-disable, clippy::, noqa, and similar; these are case-sensitive, so # NOQA is removed) unless told otherwise, and removes everything else.
--remove-todo, --remove-fixme, and --remove-doc opt back into removing those specific preserved categories one at a time, and --no-default-ignores drops the pattern-based preservation (directives, license words, HACK/XXX/NOSONAR/NOTE, header markers) but still keeps TODO, FIXME, and doc comments; only --no-default-ignores -r -f -d behaves deny-by-default, and even then a ~keep comment survives.
It offers --dry-run and --dry-run --diff (no writes; --diff without --dry-run writes), --check (a dry run that prints each removable comment as path:line:col: text and exits 1 if any would be removed, 0 if none, and 2 when the check cannot complete: a missing explicit path, even next to valid ones, a rejected config, or --diff passed alongside), a scan subcommand that reports every comment with its verdict and preservation reason without writing anything, a ~keep always-preserve escape hatch, path exclusion via --exclude <GLOB> or the exclude config key, and case-sensitive substring preserve_patterns in a .uncomment.toml (global merges into per-language; -i on the command line is case-sensitive too).
A glob argument that matches nothing makes --check inspect zero files and exit 0, so read the "N file(s) checked" count rather than trusting the exit code alone.
A ~keep on any line of a contiguous run of line comments keeps the whole run (scan reports the neighbours as extended_by_neighbour_marker), so one marker can shield prose you meant to cut.
Unknown config keys are a load error that aborts the run (exit 1, or 2 under --check), and the legacy .uncommentrc.toml and bare uncomment.toml names are still read but print a deprecation warning, which is why a walk over this skill's own directory picks up the template beside it as config.
Its "warning: removed N potentially important comment(s)" message is not a dependable signal: a small --no-default-ignores run that strips SPDX and noqa lines prints no warning at all, while a large, heterogeneous tree can trigger it under plain default flags (a default run over this repository's modules/ printed it for 48 comments), and -q/--quiet suppresses it entirely, so its absence is not evidence the diff needs no review.
The behavior this section and the rest of this skill describe was established against uncomment-bin 3.12.1.
uncomment cannot be a repo-wide mutation engine; linting and formatter directives (fmt: off/fmt: on, prettier-ignore, eslint-disable, noqa, type: ignore, shellcheck disable, and the rest of that family) are preserved by default anywhere in a file — confirmed by placing one past line 10 — not only near the top.
SPDX/license/copyright word forms (SPDX-License-Identifier, Copyright, License, @license, @copyright) are preserved by default anywhere in a file, but code-generation "DO NOT EDIT"/"DO NOT MODIFY"/"Code generated"/"Generated by"/"auto-generated" markers are protected only within the first 10 lines (matched there in any case), confirmed by moving an identical marker from line 10 to line 11 and watching it start getting removed, so those markers are unprotected outside that header window, and @generated or a bare "generated" is unprotected even inside it.
It misses # SAFETY:, # -*- coding: utf-8 -*-, WORKAROUND, and bare (c) notices by default — no built-in pattern recognizes them — and it intrinsically deletes hand-written "why" prose that carries none of its recognized keywords, which is the exact rationale category the policy protects and the real reason a human-plus-agent classification gate stays between census and apply.
Its language list is not an allowlist (shell, yaml, python, javascript, and rust were all processed in the same run during verification), and while it respects .gitignore by default, a committed-but-generated or vendored tree that is not gitignored is walked and modified like any other source unless it is excluded with --exclude or the exclude config key.
Operate on one subdirectory tree at a time rather than the whole repository, e.g. uncomment modules/apps --dry-run --diff.
If the target tree has no .uncomment.toml and touches languages the hardened uncomment.toml template doesn't cover, run uncomment init --comprehensive first to generate a project-scoped baseline, then layer the template's residual-gap patterns (SAFETY:, the coding declaration) on top.
Take a complete candidate-removal inventory without touching files.
uncomment scan is the census primitive: --only removable limits the report to what a real run would strip, --group-identical collapses repeated comments into one record with a site list so a large tree stays decidable, and every record carries a stable id that uncomment keep --from <report> can later turn into ~keep markers.
Ids resolve only inside a git work tree: run outside one, keep --id and keep --from report every id as unresolved and exit 1, while keep --match <substring> still works.
The "important" warning is not a reliable census seed either way, so treat every removable record as a classification candidate regardless of whether a warning showed up.
On a large subtree, add -j 0 to auto-detect the thread count instead of the default single-threaded scan.
uncomment scan modules/apps --only removable --group-identical --format text -j 0
uncomment modules/apps --dry-run --diff -j 0
Fan out the candidate removals across parallel agents, sorting each into mandatory-keep, essential-keep, or slop-cut, seeded by the preferences-style-and-conventions §"Code comments" load-bearing carve-out list.
When a recurring pattern needs to be spared for this run without editing the shared config, re-run census with -i "<pattern>" to confirm the narrower diff before committing to that classification.
When a comment must survive permanently rather than for one run, write the decision back with uncomment keep --id <id> (or --from a filtered scan report) instead of hand-editing ~keep markers, and remember that ~keep extends over the whole contiguous comment run.
Adversarially verify every proposed cut before applying, treating a wrong deletion of a rationale comment as high-severity.
Delete only confirmed slop, in place; essential and mandatory comments never move, so there is no lossy strip-then-restore round trip.
Run the real removal with -q/--quiet once the diff has already been reviewed in census, since apply no longer needs the per-file output or inline diff that step produced.
Afterwards, uncomment <tree> --check exits 0 only when nothing removable remains, which confirms every surviving comment is either built-in-protected, pattern-protected, or ~keep-marked.
Group the applied cuts by subsystem into a small number of atomic commits; never commit one comment per commit.
Exclude vendored, generated, and upstream-mirrored trees that are not already gitignored, with --exclude <GLOB> per run or the exclude config key, since uncomment's language list is not an allowlist.
Watch for cross-branch file collisions with any active VCS chains, and keep dry-run-first discipline before every apply.
A hardened starting config ships beside this skill at uncomment.toml.
3.12.1 already preserves formatter and linting pragmas, XXX, tflint-ignore, and license/copyright word forms by default anywhere in a file, and preserves "DO NOT EDIT"/"Generated by" markers by default within the first 10 lines, so the config only needs to close what's still missing at any position: SAFETY:, the -*- coding: -*- declaration, WORKAROUND, bare copyright symbols, code-generation markers outside the header window or without the recognized phrasing, bare rustfmt, and managed-block sentinels.
Its patterns are case-sensitive (3.10.2 behaved the same), so the generation-marker entries list each spelling, while WORKAROUND, BEGIN /END , and SAFETY deliberately match upper case only: a lowercase "end of loop" is prose, and judging it is the classify step's job.
Copy it to the target repository root as .uncomment.toml and treat it as a targeted-assist config for a specific run, not a standing repo-wide policy; a pre-existing .uncommentrc.toml or uncomment.toml there still loads but should be renamed, and any key 3.12.1 does not recognize will abort the run.
uncomment init in 3.12.1 starts the file it writes with a #:schema directive pointing at upstream's JSON Schema for editor completion; the template omits it and validates against that schema as is.
The owning policy this skill enforces is preferences-style-and-conventions §"Code comments".
For the sibling cleanup workflow see preferences-git-history-cleanup; for severity grading and adversarial verification of proposed cuts see preferences-validation-assurance; for the classification fan-out see dispatching-parallel-agents and preferences-workflow-orchestration-algebra; and the tool itself is this repository's uncomment-bin package at pkgs/by-name/uncomment-bin.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
8 skills in this plugin
/preferences-change-managementChange management practices for controlled evolution of systems and codebases. Load when planning migrations, deprecations, or breaking changes./preferences-documentationDocumentation conventions including structure, formatting, and maintenance practices, including how the AMDiRE-shaped docs/development/ tree relates to an openspec/ corpus and where a satisfaction argument belongs. Load when writing or reviewing documentation, or when deciding whether content belongs in docs/ or in the openspec/ corpus./preferences-essential-complexityComplexity must pay rent in domain invariants or value delivered to its consumer. Use when designing or reviewing abstractions, type signatures, module boundaries, specifications, or proofs; when deciding what to delete versus keep; when scaling review rigor by refinement-chain position (Lean spec, public API, schema, persisted data, spec-constrained implementation); or when handling sorry, admit, unsafe, or vacuous-proof debt./preferences-git-history-cleanupGit history cleanup patterns for rewriting, squashing, and reorganizing commit history. Load when cleaning up branch history before merge./preferences-git-version-controlGit version control conventions including atomic commits, branch workflow, and commit formatting. Load when making commits or managing branches./preferences-prose-claritySentence-level prose discipline grounded in reader-expectations research (Gopen & Swan, Pinker, Williams, Thomas & Turner, McEnerney). Use when writing or editing any prose — documentation, code comments and docstrings, commit messages, working notes, published AGENTS.md or CLAUDE.md files, reports, PR descriptions — when reviewing text for clarity or AI-writing patterns, when calibrating certainty of claims, or when making the smallest safe repair to someone else's text./preferences-code-and-collaboration-conventions:preferences-comment-cleanupfrom preferences-code-and-collaboration-conventions
npx claudepluginhub cameronraysmith/vanixiets --plugin preferences-code-and-collaboration-conventionsOther plugins' skills for the same job