codebase-comment-cleanup

codebase-comment-cleanup is a command for Claude Code from btspoony/mstar-harness. It costs 44 tokens per session (815 once invoked), scanned A, original, MIT.

A code-review command for sorting existing comments into deletion, an architecture decision record, an issue, or a shaped comment that remains useful.

In plain words
What is it for?
Use it to review a collection of old comments, record defects as issues, move design decisions into ADRs, and check comment changes against a pull request.
Why use it?
It removes stale or misleading comments while preventing unresolved defects and decisions from being silently lost. A per-change check helps keep the comment cleanup from being undone.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the morning-star-harness plugin — 28 skills, 10 commands, 14 agents, 2 hooks shipped together

Good fit Use it to review a collection of old comments, record defects as issues, move design decisions into ADRs, and check comment changes against a pull request.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/btspoony/mstar-harness/codebase-comment-cleanup
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/btspoony/mstar-harness

Made for: Claude Code.

Or install morning-star-harness, the plugin that ships this one along with the rest of its 28 skills, 10 commands, 14 agents, 2 hooks.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for codebase-comment-cleanup

README.md
[![agentmods](https://agentmods.dev/badge/commands/btspoony/mstar-harness/codebase-comment-cleanup/github.svg)](https://agentmods.dev/commands/btspoony/mstar-harness/codebase-comment-cleanup)
Your own site
<a href="https://agentmods.dev/commands/btspoony/mstar-harness/codebase-comment-cleanup"><img src="https://agentmods.dev/badge/commands/btspoony/mstar-harness/codebase-comment-cleanup/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for codebase-comment-cleanup

Your own site · 80×15
<a href="https://agentmods.dev/commands/btspoony/mstar-harness/codebase-comment-cleanup"><img src="https://agentmods.dev/badge/commands/btspoony/mstar-harness/codebase-comment-cleanup.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 815 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00044 $0.00815
Opus 5.5 $0.00018 $0.00326
Sonnet 5.5 $0.00009 $0.00163
Haiku 4.5 $0.00004 $0.00081

Measured 4d ago against content hash fd916e3232a2, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

codebase-comment-cleanup scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

commands/codebase-comment-cleanup.md · 31 lines

How it starts

The opening of the file, as written. The whole thing — 31 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Comment Cleanup

Entry

  • Work mode: direct · writable
  • View: fullstack-dev
  • Boot: drt → mstar-harness-core → references/entry-contract.md → mstar-roles → references/fullstack-dev-shared.md → mstar-coding-behavior (references/comments.md + references/comment-cleanup.md) · mstar-conventions (path symbols) · mstar-doc-corpus → references/adr.md when a Decision Record is promoted
  • Exit: AC evidence report

Triage a comment corpus into four outcomes: a tautology or a stale comment is deleted; an Excuse is a confirmed defect, so it is captured per mstar-project-governance § Issue capture whether or not the fix lands here, then the code is corrected in this change when the correction fits — otherwise the fix stays with the captured issue — and the excusing comment is deleted; a decision record moves to its ADR and leaves at most one contract pointer, and everything else is kept only when its claim resolves at HEAD (a pointer, a bounded marker, @generated, a tracked TODO), and deleted otherwise; a declared prefix is not an outcome. No Decision Record is deleted before its ADR exists, and no Excuse is deleted before its defect is captured per that section.

Procedure SSOT → mstar-coding-behavior → references/comments.md (failure modes, MUST/MUST NOT shapes, gate) + references/comment-cleanup.md (classification, batching, close-out).

Execute

Execute mstar-coding-behavior → references/comment-cleanup.md end to end in this session. Input tokens: a path|subsystem narrows the pass, and no token means the whole codebase. dry-run is a read-only exit: publish the triage report plus an optional measured baseline, then stop — no edits, no issue or ADR writes, and no claimed net-change figure.

Otherwise the pass is a direct writable unit: publish the AC list before the first edit — derived from the requested scope plus this command's own conditions, at minimum that every deletion is justified by one of the four classes, that each Excuse has its defect captured before its comment is deleted, that each Decision Record has its ADR before deletion, and that the closing unclassified-comment net change is measured — then work in batches inside the declared scope. A batch that only relabels existing comments is not a cleanup: the pass deletes or points, it never re-prefixes. A Decision Record moves into {ADR_DIR} only when all three admission conditions hold.

Read the full file on GitHub · 31 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +5 lines fd916e3232a2
  2. 12d ago Changed 102a7947e61d
  3. 13d ago First seen · 26 lines · 44 tokens per session scan A 86bf62969394

Subscribe to this mod's changes

codebase-comment-cleanup is a command published in the GitHub repository btspoony/mstar-harness (74 stars, last pushed today), licensed MIT. It adds 44 tokens to every session and 815 once invoked, about $0.0002 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.

Related

codebase-comment-cleanup compared with commands from other repositories

codebase-comment-cleanup next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
codebase-comment-cleanupbtspoony/mstar-harnessCommand74todayMITA44Claude Code
auditopenplanr/planr-pipelineCommand22mo agoMITA0Claude Code
check-filedavepoon/buildwithclaudeCommand3.8ktodayMITA21Claude Code
refactor-codecentminmod/my-claude-code-setupCommand2.8k12d agoMITC0Claude Code
branch-reviewhamr0/liteagentsCommand288d agoApache-2.0A0Claude Code
review-specZts0hg/codexspecCommand72d agoMITA19Claude Code
mainframe-review-branchCATWILLgh/MAINFRAMECommand22d agoMITA0Claude Code