/open-skills:audit-code-commentsfrom open-skills
Inventories code comments, classifies them (tautology, stale, excuse, decision, keep, uncertain), then prunes noise, converts excuses to issues, migrates decisions to ADRs, and optionally enforces a per-file comment ratchet. Scales from small modules to large repos with pilot batches and budget gates.
Ships in open-skills. 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.
Read when SKILL.md points to them; scripts run unread.
List every comment, judge each one beside its code, then change only what the chosen mode allows. Judgement always comes before editing.
Precedence. Safety rules below > the person's instructions > the mode table > the steps. A step never overrides a mode limit, and an instruction never overrides a safety rule.
Use the mode the request names; otherwise run report and say so.
| Mode | Touches the repository | What happens |
|---|---|---|
| report (default) | no | Inventory, classify, estimate what could go, list issue and ADR candidates. |
| issues-only | no | Find excuse comments and draft one issue per underlying problem. |
| prune | yes, on a new branch | Delete tautology and stale comments. Excuses stay until their issue is filed and linked. Decision and keep comments stay. |
| strict | yes, on a new branch | Prune, plus move each validated decision into an ADR entry. Only when the person confirms they own the repository's comment policy. |
Count first (step 3), then size the run. State the cost and wait for a yes before spending more than the small tier.
| Comments in scope | How |
|---|---|
| up to ~150 | Inline, no workers. |
| ~150 to ~2,000 | Pilot batch of ~50 comments, review it with the person, then workers of ~150 to 200 comments each. |
| above ~2,000 | report: sample 10% stratified by directory, capped by the agreed budget. issues-only, prune and strict: split by path into stages, each under ~2,000 comments, each with its own budget yes. Never fan out over the whole repository at once. |
Give every estimate in both comments and files. Observed ceiling: about 25k subagent tokens per source file for a full strict run with review; treat it as an upper bound, not a quote.
A sampled report is partial. It states the inventory total, the sampled count and how it was drawn, the unreviewed remainder, and labels every figure scaled up from the sample as an estimate.
Without subagents, run the same batches inline, one at a time, under the same budget yes.
scripts/ folder (not a copy in the repository) with --summary, per parsing; comment text is loaded only per batch in step 4. Report only counts: comments, protected comments, files with comments, and files in unsupported languages (listed by language, never called comment-free). No removal estimate yet.compare./cold-review) of the issue drafts and ADR entries, then fix confirmed findings.Human output. This skill's handler-facing output obeys the human-output contract (
human-output/SKILL.md). If that skill is not installed, keep reports direct and short.
Self-improvement. On completion, run the Self-Improvement Protocol (
self-improve/SKILL.md): apply its signal taxonomy and threshold to this run. Say nothing unless a material proposal survives; then show it and wait for the handler's approval. Never auto-apply. If that protocol is not installed, skip this step.
references/classify.md (opens in a new tab)references/destinations.md (opens in a new tab)references/field-notes.md (opens in a new tab)references/parsing.md (opens in a new tab)references/protected-comments.md (opens in a new tab)references/ratchet.md (opens in a new tab)scripts/comment-ratchet.mjs (opens in a new tab)scripts/comment-spans.mjs (opens in a new tab)scripts/py_comment_spans.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub allemaar/open-skills --plugin open-skills93 skills in this plugin
/agent-mailboxTwo or more agents — any harness, any vendor — collaborate through any shared folder: share a folder, load the skill, point at it.
/agent-outputCompact agent-to-agent communication contract for worker reports, handoffs, status, blockers, and review findings. Trigger phrases: "/agent-output", "brief the worker", "make agent reports terse". Not a transport; use /agent-mailbox for delivery.
/ask-gateThe Ask-Gate Protocol (AGP). Before surfacing an AskUserQuestion, triage whether the question is genuinely the handler's call (anti-nag); ask routine questions directly after a quality checklist, but escalate high-stakes / branching / irreversible ones through /insight-critique then /insight-assess first. Trigger via /ask-gate, or automatically before any handler-facing question. Not /caller-options (routes a skill's venue/mode) or /next-skills (recommends successors) — AGP governs the question itself.
/ask-meConstructively interview someone about an idea, task, project or decision so useful work can start. Use when explicitly asked to be interviewed, including “ask me”; ordinary task requests do not start this interview./audit-coupled-constantAudit every site of a constant whose value is duplicated across multiple call sites (retry budgets, timeouts, page sizes, magic numbers, feature flags). The author-maintained `SEE ALSO` trail is documentation, not enforcement — one missed site means the trail lies. Trigger on /audit-coupled-constant, "audit budget consistency", "find all sites of this value", "check coupled invariant", "before raising this constant", or after any edit to a constant that has SEE ALSO cross-references in its comments. Pairs naturally before /cold-review on a "raise the budget" PR. Not for extract-constant refactors that consolidate scattered values into a single named import — use /improve-codebase-architecture. Not for constants enforced by the type system (TypeScript `as const` literal imported everywhere) where the compiler is the audit — skip./budget-checkPre-wave usage gate. Before launching an expensive multi-agent wave or fan-out, check the active usage block against a threshold (default 95%) via `ccusage` and return go / no-go / unknown — fail-closed, never a fabricated go. Trigger via /budget-check, or as a reflex before any large dispatch. Not /ask-gate (governs a handler-facing question) or /orchestrate-mode and /multi-agent-mode (which run the wave) — budget-check only decides whether the wave should start.
Other plugins' skills for the same job