comment-analyzer

comment-analyzer is a skill for Claude Code from kumaran-is/claude-code-onboarding. It costs 41 tokens per session (515 once invoked), scanned A, original, MIT.

A code-review helper that checks comments, docstrings, and inline documentation against the code they describe. It finds statements that are outdated, misleading, incomplete, or merely repeat the code.

In plain words
What is it for?
Use it after refactoring, before a pull request, or as a documentation check during code review. It reviews comment accuracy, stale descriptions, missing error or side-effect notes, and unnecessary comments.
Why use it?
Comments can become wrong after code changes and then mislead the next person who reads the project. This helps catch documentation that no longer matches actual behaviour before it causes confusion.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: agent in frontmatter.

Good fit Use it after refactoring, before a pull request, or as a documentation check during code review. It reviews comment accuracy, stale descriptions, missing error or side-effect notes, and unnecessary comments.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kumaran-is/claude-code-onboarding/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.

Any agent
npx skills add kumaran-is/claude-code-onboarding --skill comment-analyzer
Clone the repo
git clone --depth 1 https://github.com/kumaran-is/claude-code-onboarding

Made for: Claude Code.

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/skills/kumaran-is/claude-code-onboarding/comment-analyzer/github.svg)](https://agentmods.dev/skills/kumaran-is/claude-code-onboarding/comment-analyzer)
Your own site
<a href="https://agentmods.dev/skills/kumaran-is/claude-code-onboarding/comment-analyzer"><img src="https://agentmods.dev/badge/skills/kumaran-is/claude-code-onboarding/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/skills/kumaran-is/claude-code-onboarding/comment-analyzer"><img src="https://agentmods.dev/badge/skills/kumaran-is/claude-code-onboarding/comment-analyzer.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 41 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 515 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.00041 $0.00515
Opus 5 $0.00020 $0.00258
Sonnet 5 $0.00008 $0.00103
Haiku 4.5 $0.00004 $0.00052

Measured 6d ago against content hash 3f5faf7fb0bf, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, 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 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.

.claude/skills/comment-analyzer/SKILL.md · 64 lines

What it actually says

Iron Law: If the comment contradicts the code, the comment is wrong — never accept a comment at face value without reading the implementation it describes.

Comment Analyzer

Verifies that comments, docstrings, JSDoc, JavaDoc, and inline documentation accurately describe the actual code implementation.

When to Use

  • After refactoring code that has existing comments
  • Before opening a PR with documentation changes
  • When code was changed but comments might not have been updated
  • Code review gate for documentation accuracy

What to Check

Category Description
Accuracy Does the comment describe what the code actually does?
Staleness Was code changed but the comment not updated?
Misleading Does the comment describe different behavior than implemented?
Completeness Are error cases, side effects undocumented?
Redundancy Comments that just restate the code (i++ // increment i)

Severity Levels

Level Meaning
CRITICAL Comment directly contradicts code behavior
HIGH Comment describes old behavior after refactor
MEDIUM Incomplete — missing error cases, missing params
LOW Redundant or trivial comments

Output Format

## Comment Analysis: [scope]

### CRITICAL
- [file:line] Comment: "[quote]" -> Actual: [what code really does]

### HIGH
- [file:line] Comment: "[quote]" -> Stale since: [what changed]

### Summary
- Total: N (critical: X, high: Y, medium: Z, low: W)
- Recommendation: PASS / FAIL Comments need updates before PR
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 · 64 lines · 41 tokens per session scan A 3f5faf7fb0bf

Subscribe to this mod's changes

comment-analyzer is a skill published in the GitHub repository kumaran-is/claude-code-onboarding (35 stars, last pushed 2mo ago), licensed MIT. It adds 41 tokens to every session and 515 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-09-03.