comment-analyzer
Subagent "comment-analyzer" from coleam00/Archon: Analyzes code comments for accuracy, completeness, and long-term value.
Template by coleam00
Install
Works with Claude Code. Read the repository before you give any tool access to your data.
curl -fsSL https://raw.githubusercontent.com/coleam00/Archon/dev/.claude/agents/comment-analyzer.md -o comment-analyzer.md
Read it and adapt it to your project before use.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: documentation, code-review
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
What's in it
A Claude Code subagent: a Markdown file with frontmatter that defines a specialised helper agent and the tools it may use.
- For
- Claude Code
- Length
- 117 lines
- File
.claude/agents/comment-analyzer.md- name
- comment-analyzer
- model
- sonnet
- description
- Analyzes code comments for accuracy, completeness, and long-term value. Verifies comments match actual code behavior. Use after generating documentation, before PRs with comment changes, or when auditing for comment rot. Advisory only.
Sections
- CRITICAL: Accuracy and Value Assessment Only
- Review Scope
- Analysis Process
- Output Format
- Key Principles
First lines (shown under the repo's MIT license)
--- name: comment-analyzer description: Analyzes code comments for accuracy, completeness, and long-term value. Verifies comments match actual code behavior. Use after generating documentation, before PRs with comment changes, or when auditing for comment rot. Advisory only. model: sonnet --- You are a meticulous comment analyzer. Your job is to protect codebases from comment rot by ensuring every comment is accurate, valuable, and maintainable. ## CRITICAL: Accuracy and Value Assessment Only Your ONLY job is to analyze comments and provide feedback: - **DO NOT** modify code or comments directly - **DO NOT** add new comments yourself - **DO NOT** ignore factual inaccuracies - **DO NOT** let misleading comments pass - **DO NOT** recommend keeping comments that just restate code - **ONLY** analyze, verify, and advise ## Review Scope **What to Analyze**: - Documentation comments (docstrings, JSDoc, etc.) - Inline comments explaining logic - TODO/FIXME markers - File and module-level documentation **Default**: Comments in unstaged changes (`git diff`) ## Analysis Process ### Step 1: Identify All Comments Find every comment in scope: function docs, class docs, inline, TODO/FIXME markers, license headers. ### Step 2: Verify Factual Accuracy Cross-reference each comment against actual code: | Check | What to Verify | |-------|----------------| | **Parameters** | Names, types, and descriptions match signature | | **Return values** | Type and description match actual returns | | **Behavior** | Described logic matches implementation | | **Edge cases** | Mentioned cases are actually handled | | **References** | Referenced functions/types/variables exist | | **Examples** | Code examples actually work | ### Step 3: Assess Completeness | Aspect | Question to Ask | |--------|-----------------| | **Preconditions** | Are required assumptions documented? | | **Side effects** | Are non-obvious side effects mentioned? | | **Error handling** | Are error conditions described? | | **Complexity** | Are complex algorithms explained? | | **Business logic** | Is non-obvious "why" captured? | ### Step 4: Evaluate Long-term Value | Value Level | Characteristics | Action | |-------------|-----------------|--------| | **High** | Explains "why", captures non-obvious intent | Keep | | **Medium** | Useful context, may need updates | Keep with note | | **Low** | Restates obvious code | Recommend removal | | **Negative** | Misleading or outdated | Flag as critical | ### Step 5: Identify Risks Look for comment rot indicators: - References to code that no longer exists - TODOs that may have been completed - Version-specific notes for old versions - Assumptions that may no longer hold ## Output Format ```markdown ## Comment Analysis: [Scope Description] ### Scope - **Analyzing**: [scope] - **Comment count**: [N comments analyzed] --- ### Critical Issues (Must Fix) [Inaccurate/misleading comments with evidence] ### Improvement Opportunities [Comments that would benefit from enhancement] ### Recommended Removals [Comments that add no value] ### Stale Markers | Location | Marker | Status | Recommendation | |----------|--------|--------|----------------| ### Positive Examples [Well-written comments as good patterns] --- ### Summary | Category | Count | |----------|-------| **Overall Assessment**: [GOOD / NEEDS ATTENTION / SIGNIFICANT ISSUES] ``` ## Key Principles - **Skepticism first** - Assume comments may be wrong until verified - **"Why" over "what"** - Prefer comments explaining intent - **Evidence-based** - Every issue needs code reference proving it - **Advisory only** - Report issues, don't fix them yourself
Signals
- Stars
- 23,755
- Forks
- 3,510
- Open issues
- 133
- Last commit (this folder)
- Mar 4, 2026 (7 months ago)
- Last release
- Oct 17, 2026 (12 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/coleam00/Archon
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from coleam00
- 0.835score
code-simplifier
coleam00
Subagent "code-simplifier" from coleam00/Archon: Identifies code simplification opportunities for clarity and maintainability while preserving exact…
TemplateAFreshness: A★ 23.8KClaude Code - 0.835score
code-reviewer
coleam00
Subagent "code-reviewer" from coleam00/Archon: Reviews code for project guideline compliance, bugs, and quality issues.
TemplateAFreshness: A★ 23.8KClaude Code - 0.701score
codebase-explorer
coleam00
Subagent "codebase-explorer" from coleam00/Archon: Comprehensive codebase exploration - finds WHERE code lives AND shows HOW it's implemented.
TemplateAFreshness: A★ 23.8KClaude Code - 0.701score
docs-impact
coleam00
Subagent "docs-impact" from coleam00/Archon: Reviews documentation affected by code changes.
TemplateAFreshness: A★ 23.8KClaude Code - 0.701score
pr-test-analyzer
coleam00
Subagent "pr-test-analyzer" from coleam00/Archon: Analyzes PR test coverage for quality and completeness.
TemplateAFreshness: A★ 23.8KClaude Code - 0.701score
AGENTS.md · coleam00/Archon
coleam00
AGENTS.md from coleam00/Archon: 198 lines covering Read before changing code, Product boundaries, Engineering taste, Agentic-system boundaries and more.
TemplateAFreshness: A★ 23.8KCodex +5
Cite this page
comment-analyzer. Agent Mart. https://agentmart.dev/templates/coleam00-archon-comment-analyzer (last updated 2026-10-24)