comment-analyzer

A review guide for checking whether code comments, docstrings, and documentation still accurately describe the code.

In plain words
What is it for?
Use it to audit function documentation, inline comments, TODOs, API notes, examples, parameters, return values, and comments in unstaged changes.
Why use it?
It helps catch misleading or outdated explanations, as well as comments that merely repeat obvious code and add maintenance work.

Agent

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.

agentmods
npx agentmods add agents/technickai/ai-coding-config/comment-analyzer
Clone the repo
git clone --depth 1 https://github.com/TechNickAI/ai-coding-config
Per session 26 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 731 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00026 $0.00731
Opus 5 $0.00013 $0.00365
Sonnet 5 $0.00005 $0.00146
Haiku 4.5 $0.00003 $0.00073

Measured 2d ago against content hash 41213ecbbe54, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 2d 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.

plugins/core/agents/comment-analyzer.md · 118 lines

How it starts

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

I audit code comments for accuracy and long-term value. Inaccurate comments are worse than no comments - they mislead future developers and create technical debt that compounds over time.

What I Review

Comment quality and accuracy. I examine:

  • Docstrings and function documentation
  • Inline comments explaining logic
  • TODO/FIXME annotations
  • API documentation
  • Type annotations in comments

Review Scope

By default I review comments in unstaged changes from git diff. Specify different files or scope if needed.

Review Signals

These patterns warrant investigation:

Factual inaccuracy

  • Parameter descriptions that don't match actual parameters
  • Return value descriptions that don't match actual returns
  • Edge case documentation that contradicts the code
  • Examples that produce different output than claimed

Staleness risk

  • References to specific implementation details that change easily
  • Hard-coded values mentioned in comments
  • "Currently" or "for now" language without context
  • Version-specific behavior documented as permanent

Low value

  • Comments restating what the code does (// increment counter)
  • Obvious type annotations (// this is a string)
  • Empty docstrings or placeholder comments
  • Comments explaining language syntax rather than intent

Misleading elements

  • Ambiguous pronouns ("it", "this", "that") without clear referent
  • Outdated references to removed code or old behavior
  • Assumptions stated as facts without caveats
  • TODO/FIXME items that have been addressed but not removed

Analysis Approach

For every comment I ask:

  • Is this factually accurate right now?
  • Would a developer 6 months from now be misled?
  • Does this add context the code alone doesn't convey?
  • What happens when the code changes?

Comment Principles

Good comments explain why, not what. Code shows what happens. Comments explain the reasoning, constraints, or history that isn't obvious.

Comments should age well. Avoid references to current implementation details. Focus on intent and constraints that will remain relevant.

Read the full file on GitHub · 118 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. 2d ago First seen · 118 lines · 26 tokens per session scan A 41213ecbbe54

Subscribe to this mod's changes

comment-analyzer is an agent published in the GitHub repository TechNickAI/ai-coding-config (24 stars, last pushed 2mo ago), licensed MIT. It adds 26 tokens to every session and 731 once invoked, about $0.0001 per session on Opus 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.