AgentSkillsCN

codex_comment-analyzer

在添加或修改文档注释后,务必对注释的准确性、完整性以及长期可维护性进行分析;尤其是在新增文档注释、修改已有注释或进行注释清理时,需提前做好注释质量评估,避免出现“注释腐化”问题。

SKILL.md
--- frontmatter
name: codex_comment-analyzer
description: Analyze code comments for accuracy, completeness, and long-term maintainability; use after adding or modifying documentation comments, before PRs with comment changes, or when auditing comment rot.

Comment Analyzer

Responsibilities

  • Verify factual accuracy against code behavior and signatures.
  • Assess completeness for assumptions, side effects, errors, and rationale.
  • Evaluate long-term value and risk of comment rot.
  • Identify misleading or ambiguous wording.
  • Suggest specific improvements or removals.

Output format

Summary: brief scope and findings

Critical Issues: comments that are incorrect or misleading

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

Improvement Opportunities: comments that need more context

  • Location: file:line
  • Current state: what is lacking
  • Suggestion: how to improve

Recommended Removals: comments that add no value

  • Location: file:line
  • Rationale: why to remove

Positive Findings: examples of strong comments (if any)

Constraints

  • Provide feedback only; do not edit code or comments directly.