audit-comment-residue

audit-comment-residue is a skill for Claude Code from melodic-software/claude-code-plugins. It costs 96 tokens per session (2,503 once invoked), scanned A, original, MIT.

A read-only checker that classifies comments containing references to past code, planning sessions, requests, tickets, pull requests, or branches.

In plain words
What is it for?
Use it to find comments that should be removed or reviewed, such as obsolete history, task notes, conversational asides, and links to past development work.
Why use it?
It identifies comments that make sense only in the context of old work or conversations and may confuse people reading the current code.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: mentions CLAUDE.md.

Part of the code-tidying plugin — 5 skills shipped together

Good fit Use it to find comments that should be removed or reviewed, such as obsolete history, task notes, conversational asides, and links to past development work.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/melodic-software/claude-code-plugins/audit-comment-residue
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.

Any agent
npx skills add melodic-software/claude-code-plugins --skill audit-comment-residue
Clone the repo
git clone --depth 1 https://github.com/melodic-software/claude-code-plugins

Made for: Claude Code.

Or install code-tidying, the plugin that ships this one along with the rest of its 5 skills.

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 audit-comment-residue

README.md
[![agentmods](https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-comment-residue/github.svg)](https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-comment-residue)
Your own site
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-comment-residue"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-comment-residue/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 audit-comment-residue

Your own site · 80×15
<a href="https://agentmods.dev/skills/melodic-software/claude-code-plugins/audit-comment-residue"><img src="https://agentmods.dev/badge/skills/melodic-software/claude-code-plugins/audit-comment-residue.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 96 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,503 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.00096 $0.02503
Opus 5.5 $0.00038 $0.01001
Sonnet 5.5 $0.00019 $0.00501
Haiku 4.5 $0.00010 $0.00250

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

Security

Grade A, and why

audit-comment-residue 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 6d ago.

The scan reads SKILL.md. This mod also ships 7 executable files (evals/fixtures/origin-notes.sh, evals/fixtures/residue-snippet.py, scripts/added-lines.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

plugins/code-tidying/skills/audit-comment-residue/SKILL.md · 133 lines

How it starts

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

Pre-computed context

Uncommitted code files (empty = none matched or the probe returned nothing): !${CLAUDE_SKILL_DIR}/scripts/changed-code-files.sh 10 2>/dev/null || echo "(git status unavailable)" Residue findings (sample): !${CLAUDE_SKILL_DIR}/scripts/detect.sh 2>/dev/null | grep -E '^(Summary total:|Finding shape:)' | head -20 || echo "none"

Purpose

Residue is comment text that only makes sense outside the code's present state: what the code used to be, the plan or session that produced it, asides to the requester, back-references to a ticket, PR or branch, and notes on where a block came from or when it was added. Version control owns history; a comment describes the present. It also flags a workaround comment with no link and no removal condition: nothing in it tells a reader the workaround is temporary, so the next author copies it. This skill surfaces candidates with a treatment and changes nothing. Whether a comment captures what the code cannot (a non-obvious why, a constraint, a contract) is the author's call; the shapes below are the comments that fail it.

Residue shapes and treatments

Detection reads only the comment portion of a line, so residue-shaped words in identifiers or string literals are never flagged. Exact cues and boundaries per shape, for explaining a finding or a missing one: reference/shapes.md.

Shape Looks like Tier Treatment
history-narration "used to…", "no longer…", "previously", "renamed from X", "we switched from…", "now returns…" 1 Delete. Keep only a load-bearing reason, rewritten as present-tense rationale ("must stay ordered because…")
plan-reference "Task 2 replaces the old…", "as planned", "in this PR/commit/refactor" 1 Delete; fold any surviving intent into a present-tense why
conversational-antecedent "per your request", "as you asked", "like you said", "per our discussion" 1 Delete; the conversation is invisible to every later reader
history-narration-weak "as before", "has always used", "the old <word>", a bare phase number ("(ci-perf Phase 6b)") 2 Review: each cue also opens ordinary prose, so delete the narration or keep a present-tense rewrite
ticket-pr-residue "see PR #45", "dotfiles#647", "from the feature branch", "JIRA-123" 2 Review: delete a bare back-reference; a TODO(#issue) tracking open work is sanctioned and not flagged
unjustified-workaround A comment naming a workaround (workaround, work around, works around, working around) with neither a link nor a removal condition: "# Workaround: write twice, the cache drops the first write" 2 Review: the workaround is open root-cause work. Fix the cause, or give the comment a link (a URL, an issue or PR number such as #412 or owner/repo#77, an RFC number) or a removal condition (until a version or a release or fix, such as until v5, until Node 22, until #123 lands or until upstream fixes; remove when, drop it once, once ... ships; a bare until, as in retry until it succeeds, is not one). Either one on any line of the same comment run justifies the whole run, and that issue reference is not also reported as ticket-pr-residue
origin-note "ported from the dotfiles profile", "Merged 2026-07-24 from dot_bashrc", "Added 2026-08-10 while wiring telemetry" 1 Delete; git owns origin. A dated freshness stamp ("verified 2026-09-03 against v2.1.259") stays; marker comments and license or attribution header blocks are exempt

Read the full file on GitHub · 133 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. 6d ago Changed · +10 lines · +10 tokens per session c249c3b6e446
  2. 10d ago Changed · -5 lines · -15 tokens per session 10e024ae48ae
  3. 18d ago Changed · +4 lines d2c3eaa41ed8
  4. 19d ago Changed · -88 tokens per session fb10f7c2f463
  5. 28d ago Changed · +3 lines · +30 tokens per session b6affa79c62d
  6. 1mo ago Changed · +7 lines 9c1172450da1
  7. 1mo ago Changed · +10 lines 3ac9acda4b3c
  8. 1mo ago Changed 79459417dc02
  9. 1mo ago First seen · 104 lines · 159 tokens per session scan A ec537e3a6594

Subscribe to this mod's changes

audit-comment-residue is a skill published in the GitHub repository melodic-software/claude-code-plugins (26 stars, last pushed today), licensed MIT. It adds 96 tokens to every session and 2,503 once invoked, about $0.0004 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-08-30.