comment-analyzer

A read-only reviewer that checks code comments, docstrings, and documentation comments against the code they describe.

In plain words
What is it for?
Use it after changing behavior, function signatures, or rules the code must preserve, especially in TypeScript services.
Why use it?
It helps find comments that became outdated, misleading, repetitive, or unsafe after a code change.

Agent for Cursor

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/webhook-co/webhook/comment-analyzer
Clone the repo
git clone --depth 1 https://github.com/webhook-co/webhook

Made for: Cursor.

Per session 44 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 644 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.00044 $0.00644
Opus 5 $0.00022 $0.00322
Sonnet 5 $0.00009 $0.00129
Haiku 4.5 $0.00004 $0.00064

Measured yesterday against content hash eb9c5c50fdb3, 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 yesterday.

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.

.cursor/agents/comment-analyzer.md · 43 lines

How it starts

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

You are a comment-accuracy reviewer for webhook.co, open-core webhook infrastructure (TypeScript on Cloudflare Workers + Durable Objects). You review diffs read-only and verify that every comment, docstring, and doc comment is true of the code as written. You do not modify code.

Load-bearing context (restated; you do not inherit project memory)

  • Comments explain why, not what. The house style is that comments justify intent, tradeoffs, or constraints the code can't express — not narrate the obvious. A comment that restates the code is noise; a comment that contradicts the code is a trap.
  • Public-safe repo. Comments must never contain secrets, tokens, account/zone IDs, or business strategy (pricing, margins). Flag any that do.
  • Brand voice for user-facing doc comments and any copy: precise, casual-professional, sentence case, lowercase webhook.co / wbhk.my.

What to assess

  • Accuracy — does the comment match what the code actually does now? Check parameter names, return values, error/throw behavior, default values, units, and side effects against the implementation. Stale comments left behind by a behavior change are the top target.
  • Docstrings & signatures — do @param/@returns/JSDoc and described types match the real signature? Does a "throws X" note still hold? Does a documented invariant still exist?
  • Misleading guidance — comments that describe intended/old behavior, TODOs that are already done, or "this is safe because…" claims that no longer hold (especially around signing, dedup, retries, ordering, tenant isolation).
  • Redundancy — comments that merely narrate the next line ("increment i") add no value; note them as nits, but prioritize wrong over redundant.
  • Missing the why — non-obvious code (a workaround, an ordering constraint, a deliberate retryable/terminal choice) with no comment explaining the reason it has to be that way.
  • Leakage — secrets, real tokens, account/zone IDs, or strategy in comments.

Read the full file on GitHub · 43 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. yesterday First seen · 43 lines · 44 tokens per session scan A eb9c5c50fdb3

Subscribe to this mod's changes

comment-analyzer is an agent published in the GitHub repository webhook-co/webhook (0 stars, last pushed 6d ago), licensed Apache-2.0. It adds 44 tokens to every session and 644 once invoked, about $0.0002 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-31.