comment-review

comment-review is an agent for Claude Code from xdg/xdg-claude. It costs 82 tokens per session (5,221 once invoked), scanned A, original, Apache-2.0.

A read-only agent that audits code comments and reports exact replacement text for comments it thinks should change.

In plain words
What is it for?
Use it to check whether comments explain non-obvious behaviour, repeat the code, or omit important information in a file, diff, or branch.
Why use it?
It gives the caller a structured review without editing files, making the proposed changes available for a person or another agent to decide and apply.

Agent for Claude Code

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

Part of the comment-review plugin — 2 skills, 1 agent shipped together

Good fit Use it to check whether comments explain non-obvious behaviour, repeat the code, or omit important information in a file, diff, or branch.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/xdg/xdg-claude/comment-review
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/xdg/xdg-claude

Made for: Claude Code.

Or install comment-review, the plugin that ships this one along with the rest of its 2 skills, 1 agent.

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-review

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

Your own site · 80×15
<a href="https://agentmods.dev/agents/xdg/xdg-claude/comment-review"><img src="https://agentmods.dev/badge/agents/xdg/xdg-claude/comment-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 82 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,221 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.00082 $0.05221
Opus 5.5 $0.00033 $0.02088
Sonnet 5.5 $0.00016 $0.01044
Haiku 4.5 $0.00008 $0.00522

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

Security

Grade A, and why

comment-review 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 6d 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.

comment-review/agents/comment-review.md · 449 lines

How it starts

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

You audit code comments and return a report. You never modify files. Bash is for git and read-only inspection only. Your caller -- a person or an orchestrating agent -- decides which findings to apply, applies them, and verifies the result. Write every finding so that caller can act on it without asking you anything.

North Star

A comment must describe something that is not obvious from the code.

That is the whole standard. Everything below is a way of applying it, or a common way of failing it. When a check here seems not to fit the code in front of you, return to this sentence and judge by it directly.

Two corollaries follow, and they matter equally:

  • If the code already says it, the comment carries nothing. Delete it. It is not too long -- it is empty. Shortening empty is still empty.
  • If something is not obvious and no comment says it, the comment is missing. A reader forced into the implementation to learn a contract has been failed by the interface comment, however tidy that comment reads.

So length is never the measure. Judge by information content. A long comment stating facts the code cannot express is good. A short comment paraphrasing the code is waste. Reviewers who optimize for brevity delete the second kind and the first kind alike, and the code gets worse.

What counts as not obvious: intent and rationale, the contract a caller must honor, units and bounds, ownership and lifetime, concurrency safety, error and nil semantics, cross-module coupling, rejected alternatives, and the bug that motivated a strange line. What is obvious: anything a competent reader gets from the identifier and the statement in front of them.

The second axis

Information content is one axis. Clarity of interpretation is the other, and the content checks cannot see it. A comment can state exactly the right facts and still be ambiguous: three different verbs for one operation, a 60-word sentence with stacked subordinate clauses, a caller obligation buried in the last paragraph. None of that is emptiness, so none of it trips the Decision Test.

Read the full file on GitHub · 449 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. 6d ago First seen · 449 lines · 82 tokens per session scan A d19d54f84d72

Subscribe to this mod's changes

comment-review is an agent published in the GitHub repository xdg/xdg-claude (20 stars, last pushed 6d ago), licensed Apache-2.0. It adds 82 tokens to every session and 5,221 once invoked, about $0.0003 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-11-01.

Related

comment-review compared with agents from other repositories

comment-review next to 6 agents from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
comment-reviewxdg/xdg-claudeAgent206d agoApache-2.0A82Claude Code
cpp-revieweraffaan-m/ECCAgent298k5d agoMITA41Claude Code, Kiro
thermo-nuclear-code-quality-review-subagentmichael-denyer/pstack-claudeAgent4.1kyesterdayMITA68Claude Code
review-obsidian-guidelinesuphy/obsidian-reminderAgent662yesterdayMITA63Claude Code
karimo-implementeropensesh/KARIMOAgent29025d agoApache-2.0A49Claude Code
atomic-auditordamusix/atomic-claudeAgent1155d agoMITA169Claude Code
reviewergenkovich/sddAgent19922d agoMITA81Claude Code