comment-analyzer

comment-analyzer is an agent for Claude Code from rjmurillo/ai-agents. It costs 60 tokens per session (1,488 once invoked), scanned A, original, MIT.

A reviewer that checks whether comments and documentation accurately describe the code they accompany.

In plain words
What is it for?
Use it to review docstrings, large documentation comments, pull requests that change comments, and technical debt caused by outdated explanations.
Why use it?
It finds stale, misleading, or unnecessary comments before they confuse future maintainers.

Agent for Claude Code

Written for Claude Code: argument-hint in frontmatter.

Part of the project-toolkit plugin — 125 skills, 25 commands, 33 agents, 5 hooks shipped together

Good fit Use it to review docstrings, large documentation comments, pull requests that change comments, and technical debt caused by outdated explanations.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/rjmurillo/ai-agents/comment-analyzer
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/rjmurillo/ai-agents

Made for: Claude Code.

Or install project-toolkit, the plugin that ships this one along with the rest of its 125 skills, 25 commands, 33 agents, 5 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 comment-analyzer

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/rjmurillo/ai-agents/comment-analyzer"><img src="https://agentmods.dev/badge/agents/rjmurillo/ai-agents/comment-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 60 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,488 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.00060 $0.01488
Opus 5.5 $0.00024 $0.00595
Sonnet 5.5 $0.00012 $0.00298
Haiku 4.5 $0.00006 $0.00149

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

Security

Grade A, and why

comment-analyzer 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 18d 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.

.claude/agents/comment-analyzer.md · 121 lines

How it starts

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

Comment Analyzer Agent

You verify comments against the code they describe. You flag mismatches with file:line evidence and propose a specific change. You never modify code or comments directly; the implementer or pr-comment-responder agent applies the change.

Reasoning Protocol

Before flagging any comment, work through three questions in order:

  1. Does this comment add information the code itself cannot convey? (Names, types, and structure carry the rest; if the comment paraphrases the code, it earns no place.)
  2. Is the claim accurate per the current code? (Read the code at the cited location, not the surrounding context, not the docstring elsewhere.)
  3. Would a reader be misled by it? (Outdated parameter names, wrong return semantics, stale TODOs, references to removed functions.)

Apply the questions in order, but perform a minimal accuracy check before finalizing Remove. A comment that fails question 1 and still matches the current code is Remove. A comment that mismatches current code is Update per the precedence order, even if it also restates the code. A comment that passes 1 and 2 but fails 3 needs the misleading element removed.

Tool Use Directive

Before flagging a comment as stale or wrong, read the code it describes:

  • Use Read on the file and line range the comment covers.
  • Use Grep for symbols the comment references (function names, type names, constant names) to confirm they still exist.
  • Use Grep for the docstring's claimed exceptions or error returns; confirm at least one branch raises or returns each.

Do not flag a comment without reading the code at the cited location. Do not assert "this references a removed function" without grepping the codebase for the function name. If the codebase is too large to grep within reason, say so and downgrade the finding to "needs author confirmation."

Triage Categories

Classify every comment into one of three buckets. State the bucket in the finding.

  • Preserve: implementation-intent, invariant, performance rationale, legal notice, security context, ADR reference. The comment carries information the code cannot. Leave it.
  • Update: the comment mismatches the current code at the cited file:line. State the mismatch verbatim. Propose the minimum edit.
  • Remove: the comment restates the code without adding information, references a state that no longer exists, or repeats a name that the function already carries.

Read the full file on GitHub · 121 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. 18d ago Changed · +10 lines 83f7e49c8feb
  2. 1mo ago Changed · -1 lines 4856dfbf32f6
  3. 1mo ago First seen · 112 lines · 60 tokens per session scan A be14b44b239e

Subscribe to this mod's changes

comment-analyzer is an agent published in the GitHub repository rjmurillo/ai-agents (48 stars, last pushed today), licensed MIT. It adds 60 tokens to every session and 1,488 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-08-30.

Related

Other agents, from other repositories

devops-architect

DevOps and CI gate expert for the ClosedLoop plugin monorepo. Reviews build toolchain correctness (ruff, pyright, uv), plugin versioning discipline (semver per plugin.json), hook lifecycle contracts, pre-push CHANGELOG enforcement, marketplace registration, and cross-plugin coordinated version bumps. Triggers on…

closedloop-ai/claude-plugins · 95 tokens

nw-platform-architect-reviewer

Use for review and critique tasks - Platform design, CI/CD pipeline, infrastructure, observability, deployment readiness, and production handoff review specialist. Runs on Haiku for cost efficiency.

nWave-ai/nWave · 44 tokens

10-Challenger

Standalone adversarial review wrapper. Runs challenger-review-subagent, then runs the shared Per-Finding Decision Protocol so the user can Apply selected fixes and hand off to the next step. For orchestrated workflows, the subagent is auto-invoked by parent agents.

jonathan-vella/apex-accelerator · 60 tokens

reviewer

Review changes against spec, plan, code quality heuristics, and repo rules. Supports local (ADOS pipeline) and remote (PR/MR) modes.

juliusz-cwiakalski/agentic-delivery-os · 34 tokens

review-feedback-applier

Classify and apply accepted review feedback from PR/MR.

juliusz-cwiakalski/agentic-delivery-os · 17 tokens

github-actions-expert

GitHub Actions specialist focused on secure CI/CD workflows, action pinning, OIDC authentication, permissions least privilege, and supply-chain security.

fabioc-aloha/Alex_Skill_Mall · 33 tokens