how-to-comment-review

how-to-comment-review is a skill for Claude Code from xdg/xdg-claude. It costs 77 tokens per session (745 once invoked), scanned A, original, Apache-2.0.

A set of instructions for handling requests to review code comments, including when to send the work to a separate comment-review agent.

In plain words
What is it for?
Use it when reviewing, shortening, or checking comments in files, diffs, branches, or pull requests. It also helps identify redundant, stale, missing, or inconsistent comments.
Why use it?
It keeps comment reviews consistent and prevents the main agent from judging large sets of comments without the dedicated review process.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter. Also seen: mentions subagents.

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

Good fit Use it when reviewing, shortening, or checking comments in files, diffs, branches, or pull requests. It also helps identify redundant, stale, missing, or inconsistent comments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/xdg/xdg-claude/how-to-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.

Any agent
npx skills add xdg/xdg-claude --skill how-to-comment-review
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 how-to-comment-review

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

Your own site · 80×15
<a href="https://agentmods.dev/skills/xdg/xdg-claude/how-to-comment-review"><img src="https://agentmods.dev/badge/skills/xdg/xdg-claude/how-to-comment-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 77 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 745 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.00077 $0.00745
Opus 5.5 $0.00031 $0.00298
Sonnet 5.5 $0.00015 $0.00149
Haiku 4.5 $0.00008 $0.00075

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

Security

Grade A, and why

how-to-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/skills/how-to-comment-review/SKILL.md · 48 lines

How it starts

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

Handling comment review requests

Delegate to the comment-review subagent (Agent tool, subagent_type: comment-review) instead of reading comments and judging them inline. The subagent never edits files. It returns a report with exact Old/New replacement text for each finding; applying it is your job.

When to delegate vs. handle inline

Delegate when:

  • The user asks to review, trim, tighten, or audit comments in a file, package, diff, branch, or PR.
  • The user asks whether comments are redundant, stale, missing, or inconsistent in terminology.
  • A workflow step calls for a comment audit before commit or merge.

Handle inline (do not delegate) when:

  • The user asks about one comment already visible in the conversation.
  • The user asks you to write a comment for code you just wrote. That is authoring, not review.

Crafting the delegation prompt

The default target is the current branch: the working tree, committed and uncommitted changes alike, against the merge base with the default branch. On a clean default branch that target is empty, so name one whenever the user means something else. Name a target only when the user does.

  • "review the comments in my changes" or "check this branch" → empty prompt; the default handles it.
  • "tighten the comments in session.go" → "Review the comments in session.go."
  • "are the comments in pkg/auth consistent?" → "Review the comments in pkg/auth, including the terminology census."
  • "review the comments in the last commit" → "Review comments in the diff HEAD~1..HEAD."
  • "review PR #42's comments" → "Review comments in PR #42."

When the target is a PR or a branch that is not checked out, the report's Old text matches that revision, not the working tree. Check out that revision before applying, or expect every replacement to fail.

Applying the report

The subagent tags each finding mechanical or judgment, and some findings carry Needs: with no patch.

  • With a user present: show the report and apply only the findings the user picks.
  • Unattended (workflow or orchestrator): applying mechanical findings is reasonable. Route judgment and Needs findings to a person, or skip them; each one adds a fact or picks a meaning that nobody has confirmed.

Read the full file on GitHub · 48 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 · 48 lines · 77 tokens per session scan A 43a182b6155c

Subscribe to this mod's changes

how-to-comment-review is a skill published in the GitHub repository xdg/xdg-claude (20 stars, last pushed 6d ago), licensed Apache-2.0. It adds 77 tokens to every session and 745 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

how-to-comment-review compared with skills from other repositories

how-to-comment-review next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
how-to-comment-reviewxdg/xdg-claudeSkill206d agoApache-2.0A77Claude Code
autoreviewopenclaw/clawhubSkill9.5kyesterdayMITA17Claude Code, Codex
agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skillsSkill2.2k6d agoMITA115Claude Code, Codex
omh-code-reviewrlaope/oh-my-hermesSkill5.2kyesterdayMITA48Claude Code, Codex
revdiff-planumputun/revdiffSkill945yesterdayMITA84Claude Code
explore-unknownsdzhng/skillsSkill1.4k2d agoMITA162Claude Code, Codex
re0-mergeLilMGenius/paperthinSkill1.4k4d agoMITA70Claude Code