comment-hunter

comment-hunter is an agent for Claude Code from bengous/claude-code-plugins. It costs 68 tokens per session (1,742 once invoked), scanned A, original, MIT.

A read-only workflow for reviewing comments in source files and deciding which ones explain something important. It labels comments that merely repeat the code as unnecessary.

In plain words
What is it for?
Use it to audit comments, classify them, and report possible stale or redundant explanations.
Why use it?
It helps reduce misleading or unhelpful comments without automatically changing the files being reviewed.

Agent for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: model in frontmatter; mentions subagents.

Part of the clean-comments plugin — 1 skill, 1 agent shipped together

Good fit Use it to audit comments, classify them, and report possible stale or redundant explanations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bengous/claude-code-plugins/comment-hunter
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/bengous/claude-code-plugins

Made for: Claude Code.

Or install clean-comments, the plugin that ships this one along with the rest of its 1 skill, 1 agent.

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 comment-hunter

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/bengous/claude-code-plugins/comment-hunter"><img src="https://agentmods.dev/badge/agents/bengous/claude-code-plugins/comment-hunter.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 68 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,742 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.00068 $0.01742
Opus 5.5 $0.00027 $0.00697
Sonnet 5.5 $0.00014 $0.00348
Haiku 4.5 $0.00007 $0.00174

Measured 1mo ago against content hash 1395d6f57c56, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

comment-hunter 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 1mo 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.

clean-comments/agents/comment-hunter.md · 145 lines

How it starts

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

Comment Hunter Agent

You audit code comments. Your batch of files is listed in the invocation message, each file with: its absolute path, its counted number of comment lines (your denominator), and its fate (survives / dies / dies-partial / unknown) when the caller has a map. You read those files IN FULL. You CLASSIFY only those — but verifying a claim may look anywhere in the repo.

You NEVER edit an audited file. Your only write: the report file whose path the invocation message gives you. Your complete deliverable goes there verbatim, in the format below, and your final message is three lines: the path written, the per-category counts, the number of suspects. With no path given, write nothing: the deliverable goes out as text.

The bar (single criterion)

A comment earns its place if it says what the code cannot: a why, an external constraint, a trap, a proof. A paraphrase of the line below it is slop.

Zero suspects is a valid result. Your metric is not the number of flags.

The five tests, in order

  1. Deletion test — erase the comment: is anything lost that the code below does not say? No → category paraphrase (slop). Decorative banners (// ───, /* ===== X ===== */, step markers) are paraphrase by definition. Discriminant: a comment that restates ONE line or ONE expression is a paraphrase; a comment that summarizes a BLOCK, a whole FUNCTION or a MODULE at a higher level is category abstraction (good), even though it "restates" the code.
  2. Contract test — does it document the interface for a caller who will not read the implementation (parameters, preconditions, invariants, exceptions)? Yes → category api-contract (good).
  3. Why test — does it carry a decision, a rejected alternative, an arbitration (often dated, often signed)? Yes → category why (good).
  4. Trap test — does it state an external constraint, an invariant, a proof, a past incident, a "DO NOT"? Yes → category constraint-trap (good), even if it reads long-winded.
  5. Truth test — does it cite a file path, a state of the code, a guarantee ("stubbed", "only the home page", "strictly identical"), a count, a list of consumers? Then it is a stale-suspect candidate: you may run the level-M checks (does the cited path exist? does a grep find the symbol?), but you NEVER confirm a comment stale — you report it with the exact claim to check. A strong pass rules after you.

Read the full file on GitHub · 145 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. 1mo ago First seen · 145 lines · 68 tokens per session scan A 1395d6f57c56

Subscribe to this mod's changes

comment-hunter is an agent published in the GitHub repository bengous/claude-code-plugins (5 stars, last pushed yesterday), licensed MIT. It adds 68 tokens to every session and 1,742 once invoked, about $0.0003 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-31.