code-commenting-ai-kit

Review code comments for redundancy and add WHY-focused annotations.

Updated May 11, 2026
One-click install
npx skills add https://github.com/ducthang-hub/nw-ai-kit --skill code-commenting-ai-kit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: code-commenting-ai-kit
Source: https://github.com/ducthang-hub/nw-ai-kit/tree/main/.agents/skills/code-commenting-ai-kit
Command: npx skills add https://github.com/ducthang-hub/nw-ai-kit --skill code-commenting-ai-kit

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

It reduces clutter and confusion from comments that repeat the code, go stale, or explain the wrong thing, while helping you add comments that genuinely improve maintainability.

Core Features & Use Cases

  • Self-explanatory-first guidance: Prefer clearer names and refactoring over explanatory commentary.
  • Correct comment selection: Add comments for WHY, not WHAT, focusing on business logic, non-obvious algorithms, regex intent, and API constraints/gotchas.
  • Code review cleanup: Remove or rewrite redundant, outdated, or dead-code comments; convert low-value notes into high-value TODO/FIXME/HACK/SECURITY/PERF/BUG/REFACTOR-style annotations only when they add durable context.
  • Annotation standards: Encourage actionable, time-proof tags (e.g., FIXME with clear intent, SECURITY with validation rationale) rather than decorative or changelog-style commentary.

Quick Start

Ask the AI to review the snippet and either remove redundant or outdated comments and add brief, WHY-focused comments only where needed.

Frequently Asked Questions about code-commenting-ai-kit

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write self-documenting code instead of adding redundant comments?

To write self-documenting code, prefer clearer variable names and refactoring over explanatory commentary. This approach reduces clutter by ensuring the code explains itself, reserving comments only for non-obvious logic and business rules.

When should I add comments to explain complex algorithms or regexes?

You should add comments for complex algorithms or regexes to explain their intent and constraints. Focus on documenting the WHY rather than the WHAT, ensuring maintainability when the logic is non-obvious or involves API gotchas.

What is the best way to format TODO and FIXME tags during code review?

The best way to format TODO and FIXME tags is to make them actionable and time-proof. Convert low-value notes into high-value annotations like FIXME, SECURITY, or HACK only when they add durable context and clear intent.

How do I remove outdated or dead-code comments when refactoring?

To remove outdated comments during refactoring, review the snippet to eliminate redundant or stale notes that repeat the code. Rewrite them only if they provide necessary WHY-focused context or actionable TODO-style annotations.

Does this commenting approach work for JavaScript-style annotations and docstrings?

Yes, this commenting approach works for JavaScript-style annotations and docstrings. It provides appropriate annotation guidance across general programming, satisfying requirements to avoid redundant comments while explaining complex logic.

Why should comments explain the business logic rather than what the code does?

Comments should explain business logic because the code itself already shows what it does. Explaining the WHY adds durable context for maintainability, preventing confusion from comments that merely repeat the code or go stale.