🎯

ln-610-code-comments-auditor

🎯Skill

from levnikolaevich/claude-code-skills

VibeIndex|
What it does

Audits code comments and docstrings across 6 quality categories, generating a comprehensive compliance score and actionable recommendations for improvement.

πŸ“¦

Part of

levnikolaevich/claude-code-skills(85 items)

ln-610-code-comments-auditor

Installation

Claude CodeAdd plugin in Claude Code
/plugin add levnikolaevich/claude-code-skills
git cloneClone repository
git clone https://github.com/levnikolaevich/claude-code-skills.git ~/.claude/skills
πŸ“– Extracted from docs: levnikolaevich/claude-code-skills
14Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

Audit code comments and docstrings quality across 6 categories (WHY-not-WHAT, Density, Forbidden Content, Docstrings, Actuality, Legacy). Use when code needs comment review, after major refactoring, or as part of ln-100-documents-pipeline. Outputs Compliance Score X/10 per category + Findings + Recommended Actions.

Overview

# Code Comments Auditor

Audit code comments and docstrings quality. Universal for any tech stack.

Purpose

  • Verify comments explain WHY, not obvious WHAT
  • Check comment density (15-20% ratio)
  • Detect forbidden content (dates, author names, historical notes)
  • Validate docstrings match function signatures
  • Ensure comments match current code state
  • Identify legacy comments and commented-out code

Invocation

  • Direct: User invokes for code comment quality review
  • Pipeline: Called by ln-100-documents-pipeline (Phase 5, if auditComments=true)

Workflow

  1. Scan: Find all source files (auto-detect tech stack)
  2. Extract: Parse inline comments + docstrings/JSDoc
  3. Audit: Run 6 category checks (see Audit Categories below)
  4. Score: Calculate X/10 per category
  5. Report: Output findings and recommended actions

Audit Categories

| # | Category | What to Check |

|---|----------|---------------|

| 1 | WHY not WHAT | Comments explain rationale, not obvious code behavior; no restating code |

| 2 | Density (15-20%) | Comment-to-code ratio within range; not over/under-commented |

| 3 | No Forbidden Content | No dates/authors; no historical notes; no code examples in comments |

| 4 | Docstrings Quality | Match function signatures; parameters documented; return types accurate |

| 5 | Actuality | Comments match code behavior; no stale references; examples runnable |

| 6 | Legacy Cleanup | No TODO without context; no commented-out code; no deprecated notes |

Output Format

```markdown

Code Comments Audit Report - [DATE]

Compliance Score

| Category | Score | Issues |

|----------|-------|--------|

| WHY not WHAT | X/10 | N obvious comments |

| Density (15-20%) | X/10 | X% actual (target: 15-20%) |

| No Forbidden Content | X/10 | N forbidden items |

| Docstrings Quality | X/10 | N mismatches |

| Actuality | X/10 | N stale comments |

| Legacy Cleanup | X/10 | N legacy items |

| Overall | X/10 | |

Critical Findings

  • [ ] [Category] path/file:line - Issue description. Action: Fix suggestion.

Recommended Actions

| Priority | Action | Location | Category |

|----------|--------|----------|----------|

| High | Remove author name | src/X:45 | Forbidden |

| Medium | Update stale docstring | lib/Y:120 | Actuality |

```

Scoring Rules

| Score | Meaning |

|-------|---------|

| 10/10 | No issues |

| 8-9/10 | Minor issues (small density deviation, few obvious comments) |

| 6-7/10 | Moderate issues (stale docstrings, some forbidden content) |

| 4-5/10 | Significant issues (major density problems, outdated comments) |

| 1-3/10 | Critical issues (author names, commented-out code blocks, broken docstrings) |

Reference Files

  • Comment rules and patterns: [references/comments_rules.md](references/comments_rules.md)

Critical Notes

  • Fix code, not rules: NEVER modify rules files (_rules.md, _standards.md) to make violations pass. Always fix the code instead.
  • Code is truth: When comment contradicts code, flag comment for update
  • WHY > WHAT: Comments explaining obvious behavior should be removed
  • Task IDs OK: Task/Story IDs in comments help with code traceability
  • Universal: Works with any language; detect comment syntax automatically
  • Based on: Claude Code comment-analyzer agent patterns

---

Version: 3.0.0

Last Updated: 2025-12-23

More from this repository10

πŸͺ
levnikolaevich-claude-code-skillsπŸͺMarketplace

Official marketplace for Agile Linear Workflow plugin - complete end-to-end automation for software development teams using Linear. Includes 7XX Project Bootstrap series for technology-agnostic project migration.

🎯
ln-110-project-docs-coordinator🎯Skill

Coordinates project documentation by gathering context once, detecting project type, and delegating document creation to 5 specialized workers.

🎯
ln-140-test-docs-creator🎯Skill

Generates comprehensive test documentation with testing strategy and test organization structure for software projects.

🎯
ln-115-devops-docs-creator🎯Skill

Generates a comprehensive runbook.md for DevOps setup, dynamically tailored to project's Docker configuration and deployment specifics.

🎯
ln-113-backend-docs-creator🎯Skill

Generates backend documentation files (API spec and database schema) automatically when backend or database technologies are detected in a project.

🎯
ln-114-frontend-docs-creator🎯Skill

Generates design guidelines documentation for frontend projects with WCAG 2.1 compliance when a frontend framework is detected.

🎯
ln-772-error-handler-setup🎯Skill

Configures global exception handling middleware for .NET and Python backend applications with standardized error responses.

🎯
ln-626-dead-code-auditor🎯Skill

Identifies and reports dead, unused, and legacy code across the codebase, generating a comprehensive audit with compliance scoring.

🎯
ln-111-root-docs-creator🎯Skill

Generates standardized root documentation files for a project using templates and context-specific data from a coordinator.

🎯
ln-120-reference-docs-creator🎯Skill

Generates reference documentation structure and smart documents for project tech stack, creating only justified architectural decision records and guides.