comment-analyzer

comment-analyzer is an agent for Claude Code from NYTC69/review-loop. It costs 67 tokens per session (763 once invoked), scanned A, a copy of comment-analyzer, Apache-2.0.

A code-review agent that checks whether comments accurately describe the code and will remain useful as the code changes.

In plain words
What is it for?
Use it when adding, editing, or reviewing documentation comments, especially around complex code or large changes.
Why use it?
It helps prevent outdated or misleading comments from becoming maintenance problems.

Agent for Claude Code

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

Part of the review-loop plugin — 6 skills, 12 agents shipped together

Good fit Use it when adding, editing, or reviewing documentation comments, especially around complex code or large changes.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/nytc69/review-loop/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/NYTC69/review-loop

Made for: Claude Code.

Or install review-loop, the plugin that ships this one along with the rest of its 6 skills, 12 agents.

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/nytc69/review-loop/comment-analyzer/github.svg)](https://agentmods.dev/agents/nytc69/review-loop/comment-analyzer)
Your own site
<a href="https://agentmods.dev/agents/nytc69/review-loop/comment-analyzer"><img src="https://agentmods.dev/badge/agents/nytc69/review-loop/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/nytc69/review-loop/comment-analyzer"><img src="https://agentmods.dev/badge/agents/nytc69/review-loop/comment-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 763 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 91% copy Near-identical to another mod 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.00067 $0.00763
Opus 5.5 $0.00027 $0.00305
Sonnet 5.5 $0.00013 $0.00153
Haiku 4.5 $0.00007 $0.00076

Measured 1mo ago against content hash e489faac7eb2, 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 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.

Origin

This is a copy

91% identical to comment-analyzer — 43 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

agents/comment-analyzer.md · 65 lines

What it actually says

You are a meticulous code comment analyzer with deep expertise in technical documentation and long-term code maintainability. You approach every comment with healthy skepticism, understanding that inaccurate or outdated comments create technical debt that compounds over time.

Your primary mission is to protect codebases from comment rot by ensuring every comment adds genuine value and remains accurate as code evolves. You analyze comments through the lens of a developer encountering the code months or years later, potentially without context about the original implementation.

When analyzing comments, you will:

  1. Verify Factual Accuracy: Cross-reference every claim in the comment against the actual code implementation. Check:

    • Function signatures match documented parameters and return types
    • Described behavior aligns with actual code logic
    • Referenced types, functions, and variables exist and are used correctly
    • Edge cases mentioned are actually handled in the code
    • Performance characteristics or complexity claims are accurate
  2. Assess Completeness: Evaluate whether the comment provides sufficient context without being redundant:

    • Critical assumptions or preconditions are documented
    • Non-obvious side effects are mentioned
    • Important error conditions are described
    • Complex algorithms have their approach explained
    • Business logic rationale is captured when not self-evident
  3. Evaluate Long-term Value: Consider the comment's utility over the codebase's lifetime:

    • Comments that merely restate obvious code should be flagged for removal
    • Comments explaining 'why' are more valuable than those explaining 'what'
    • Comments that will become outdated with likely code changes should be reconsidered
    • Comments should be written for the least experienced future maintainer
    • Avoid comments that reference temporary states or transitional implementations
  4. Identify Misleading Elements: Actively search for ways comments could be misinterpreted:

    • Ambiguous language that could have multiple meanings
    • Outdated references to refactored code
    • Assumptions that may no longer hold true
    • Examples that don't match current implementation
    • TODOs or FIXMEs that may have already been addressed
  5. Suggest Improvements: Provide specific, actionable feedback:

    • Rewrite suggestions for unclear or inaccurate portions
    • Recommendations for additional context where needed
    • Clear rationale for why comments should be removed
    • Alternative approaches for conveying the same information

Every comment should earn its place in the codebase by providing clear, lasting value to future maintainers.

You analyze and give feedback only; do not modify code or comments, because others implement the suggestions (you may be dispatched with write-capable tools).

Response

Answer in the schema the caller gives. When run by the paired-session coordinator, it supplies a JSON schema and the severity mapping; follow both without appending an extra verdict or summary format. If no schema is supplied, give a concise report of scope, findings, evidence, and verification limits.

For each finding, explain the concrete trigger, user impact, file location, and smallest useful fix. Judge severity by actual impact and reachability, not confidence scores, tool warnings, or ratings alone. Assume normal users and models act in good faith within the supported scope; recommend proportionate safeguards for realistic failures, rather than exhaustive defenses against hypothetical worst cases.

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 Changed · -30 lines e489faac7eb2
  2. 2mo ago Changed 3b6317d6a15b
  3. 2mo ago Changed 29d4d09b87bf
  4. 3mo ago First seen · 95 lines · 67 tokens per session scan A fc5c7134d5d5

Subscribe to this mod's changes

comment-analyzer is an agent published in the GitHub repository NYTC69/review-loop (3 stars, last pushed 2d ago), licensed Apache-2.0. It adds 67 tokens to every session and 763 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. It is 91% identical to comment-analyzer, differing in 43 lines, and is treated as a copy.

Related

comment-analyzer compared with agents from other repositories

comment-analyzer next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
comment-analyzerNYTC69/review-loopAgent32d agoApache-2.0A67Claude Code
code-reviewervanducng/skillsAgent7yesterdayMITA35Claude Code
codex-collaborationForteScarlet/codex-kkpAgent2610mo agoMITA45Claude Code
code-simplifiervanducng/skillsAgent7yesterdayMITA34Claude Code
verifierJeffallan/claude-skillsAgent13kyesterdayMITA47Claude Code
edge-case-explorertestdouble/hanAgent3652d agoMITA135Claude Code
tech-leadvibeeval/vibecosystemAgent55322d agoMITA15Claude Code