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 11d 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 11d 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. 11d ago Changed · -30 lines e489faac7eb2
  2. 26d ago Changed 3b6317d6a15b
  3. 1mo ago Changed 29d4d09b87bf
  4. 1mo 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 yesterday), 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

Other agents, from other repositories

code-reviewer

Comprehensive code review with scout-based edge case detection. Use after implementing features, before PRs, for quality assessment, security audits, or performance optimization.

vanducng/skills · 35 tokens

code-simplifier

Simplifies and refines code for clarity, consistency, and maintainability while preserving all functionality. Focuses on recently modified code unless instructed otherwise.

vanducng/skills · 34 tokens

codex-collaboration

Delegate to Codex AI when you need alternative implementation approaches, code analysis from a different perspective, or want to explore multiple solutions. Best for complex coding tasks that benefit from a second AI opinion.

ForteScarlet/codex-kkp · 45 tokens

edge-case-explorer

Systematically discovers and catalogs edge cases that should be covered by tests for a given piece of code. Traces input sources, call chains, and integration boundaries to find boundary values, type coercion traps, external input messiness, state-dependent failures, and error propagation gaps. Use when exploring how…

testdouble/han · 135 tokens

adversarial-validator

Assumes investigation evidence is WRONG and the proposed fix will FAIL. Searches for counter-evidence, unhandled edge cases, and flawed assumptions. Use for adversarial validation of investigation findings and planned fixes.

testdouble/han · 45 tokens

geo-routing-engineer

Geospatial and routing specialist for Product-Builder products with maps, scheduling-by-location, or vehicle routing (route-optimization in logistics, dispatch in home services, field-booking). Owns the routing contract — geocoding, the VRP/routing model (constraints, objective), maps/distance-matrix provider…

avelikiy/great_cto · 112 tokens