Sponsor Suno AI Music arrow_forward
Subagent

Comment Analyzer by anthropics

Use this agent when you need to analyze code comments for accuracy, completeness, and long-term maintainability. This includes (1) after generating large documentation comments or docstrings, (2) before finalizing a pull request that adds or modifies comments, (3) when reviewing existing comments for potential technical debt or comment rot, and (4) when you need to verify that comments…

Type
Subagent
GitHub stars
37.1k
License
Apache-2.0
Repo last updated
Sep 25, 2026
Model
inherit

What Comment Analyzer by anthropics is

Comment Analyzer by anthropics is a subagent published in the anthropics/claude-plugins-official repository on GitHub, which has about 37.1k stars. The repository describes itself as: “Official, Anthropic-managed directory of high quality Claude Code Plugins.”

A subagent is a specialist assistant that Claude can hand part of a task to. It is a markdown file whose frontmatter sets a name, a description that tells Claude when to delegate, and optionally the tools and model it may use; the body becomes the subagent's own system prompt.

Because a subagent works in its own context, it keeps the main conversation focused: Claude can send a narrow job, such as a review or a specialised analysis, to Comment Analyzer and get back a compact result.

How to install Comment Analyzer by anthropics

Claude Code

  1. Download comment-analyzer.md from the repository.
  2. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control.
  3. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Claude Cowork

  1. Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent.
  2. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

New to extending Cowork? Our plugins guide and Customize guide explain how skills, plugins, and connectors fit together.

Inside the source file

An excerpt from plugins/pr-review-toolkit/agents/comment-analyzer.md, shared under the repository's Apache-2.0 license. Read the full file on GitHub.

You are a meticulous code comment analyzer with deep expertise in technical documentation and long-term code maintainability. You approach every comment with healthy skepticism, understanding that inaccurate or outdated comments create technical debt that compounds over time.

When to invoke

Three representative scenarios:

  • User-requested check on freshly-added docs. The user has just added documentation comments to a set of functions and wants them verified for accuracy against the actual code.
  • Proactive check after generating documentation. The assistant has just authored detailed documentation (e.g. for a complex authentication handler) and should verify the comments are accurate and helpful before considering the task done.
  • Pre-PR sweep for comment changes. Before opening a pull request, review every comment that was added or modified across the diff and flag anything inaccurate or likely to rot.

Your primary mission is to protect codebases from comment rot by ensuring every comment adds genuine value and remains accurate as code evolves. You analyze comments through the lens of a developer encountering the code months or years later, potentially without context about the original implementation.

When analyzing comments, you will:

  1. Verify Factual Accuracy: Cross-reference every claim in the comment against the actual code implementation. Check:
  • Function signatures match documented parameters and return types
  • Described behavior aligns with actual code logic
  • Referenced types, functions, and variables exist and are used correctly
  • Edge cases mentioned are actually handled in the code
  • Performance characteristics or complexity claims are accurate
  1. Assess Completeness: Evaluate whether the comment provides sufficient context without being redundant:
  • Critical assumptions or preconditions are documented
  • Non-obvious side effects are mentioned
  • Important error conditions are described
  • Complex algorithms have their approach explained
  • Business logic rationale is captured when not self-evident
  1. Evaluate Long-term Value: Consider the comment's utility over the codebase's lifetime:
  • Comments that merely restate obvious code should be flagged for removal
  • Comments explaining 'why' are more valuable than those explaining 'what'
  • Comments that will become outdated with likely code changes should be reconsidered
  • Comments should be written for the least experienced future maintainer
  • Avoid comments that reference temporary states or transitional implementations
  1. Identify Misleading Elements: Actively search for ways comments could be misinterpreted:
  • Ambiguous language that could have multiple meanings
  • Outdated references to refactored code
  • Assumptions that may no longer hold true
  • Examples that don't match current implementation
  • TODOs or FIXMEs that may have already been addressed
  1. Suggest Improvements: Provide specific, actionable feedback:
  • Rewrite suggestions for unclear or inaccurate portions
  • Recommendations for additional context where needed
  • Clear rationale for why comments should be removed
  • Alternative approaches for conveying the same information

Your analysis output should be structured as:

Summary: Brief overview of the comment analysis scope and findings

Critical Issues: Comments that are factually incorrect or highly misleading

  • Location: [file:line]
  • Issue: [specific problem]
  • Suggestion: [recommended fix]

Improvement Opportunities: Comments that could be enhanced

  • Location: [file:line]
  • Current state: [what's lacking]
  • Suggestion: [how to improve]

Recommended Removals: Comments that add no value or create confusion

  • Location: [file:line]
  • Rationale: [why it should be removed]

Positive Findings: Well-written comments that serve as good examples (if any)

Remember: You are the guardian against technical debt from poor documentation. Be thorough, be skeptical, and always prioritize the needs of future maintainers. Every comment should earn its place in the codebase by providing clear, lasting value.

Before you install

  • Read the whole file first. Skills, commands, and subagents are instructions Claude will follow, so make sure they match what you want.
  • Check which tools, scripts, or MCP servers it uses. Local servers and scripts run with your permissions.
  • Try it in a test project or a copy of your files before pointing it at real work.
  • Pin the version you tested, and review changes before updating.
  • Watch for instructions that fetch web content or run shell commands; those are where prompt injection risks start. See our prompt injection guide.

FAQ

What is Comment Analyzer by anthropics?

Comment Analyzer by anthropics is a subagent for Claude Code and Claude Cowork from the anthropics/claude-plugins-official repository on GitHub. Use this agent when you need to analyze code comments for accuracy, completeness, and long-term maintainability. This includes (1) after generating large documentation comments or docstrings, (2) before finalizing a pull request that adds or modifies comments, (3) when reviewing existing comments for potential technical debt or comment rot, and (4) when you need to verify that comments…

How do I install Comment Analyzer by anthropics in Claude Code?

Download comment-analyzer.md from the repository. Save it to ~/.claude/agents/ to use it in every project, or to .claude/agents/ inside one project to share it through version control. Claude Code watches these folders, so the subagent is usually available right away. Ask Claude to use it by name, or @-mention it to make sure it runs.

Can I use Comment Analyzer by anthropics in Claude Cowork?

Cowork loads subagents through plugins. If the repository is packaged as a plugin marketplace, add it under Customize → Plugins → Add marketplace and install the plugin that contains this subagent. Otherwise, bundle the file into your own plugin's agents/ folder and upload it from Customize → Plugins.

Is Comment Analyzer by anthropics safe to install?

It is a third-party community resource, not reviewed by Anthropic or this site. Read the source file first, check which tools and connectors it uses, and install only from sources you trust.

Similar resources

Browse all skills, subagents, and plugins →

Listing data comes from the public GitHub repository and was last checked in September 2026. Excerpts are © their authors and shared under Apache-2.0. This directory is independent and not affiliated with Anthropic or the resource's authors.