Global Commenting

Add JSDoc and Korean comments to TypeScript code following self-documenting principles.

1|Updated Dec 4, 2024
One-click install
npx skills add https://github.com/imkdw/imkdw-dev --skill global-commenting-imkdw
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Global Commenting
Source: https://github.com/imkdw/imkdw-dev/tree/main/.claude/skills/global-commenting
Command: npx skills add https://github.com/imkdw/imkdw-dev --skill global-commenting-imkdw

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Poor commenting practices, such as redundant, outdated, or misleading comments, can clutter code and hinder understanding rather than help it. This Skill promotes a philosophy of self-documenting code complemented by strategic, evergreen commenting.

Core Features & Use Cases

  • Self-Documenting Code: Prioritize clear naming, logical structure, and expressive code over unnecessary comments, making code easier to read and understand.
  • Strategic Commenting: Add comments only for complex algorithms, non-obvious business logic ("why" something is done), or public API JSDoc, ensuring comments add real value.
  • Avoid Redundancy: Eliminate comments that merely restate obvious code, describe temporary fixes, or track changes, keeping the codebase clean and focused.
  • Use Case: When reviewing a complex algorithm for calculating reading time, ensure that a concise comment explains its underlying logic or a non-obvious step, rather than just restating what the code does.

Quick Start

Review this function and suggest improvements to its comments, ensuring it follows the 'self-documenting code' principle and uses JSDoc where appropriate for its public interface.

Frequently Asked Questions about Global Commenting

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

FAQPage Schema
How do I write better code comments for TypeScript projects?

Write code comments by prioritizing self-documenting code first—use clear naming and logical structure—then add strategic comments only for complex algorithms, non-obvious business logic, and public API JSDoc. Avoid redundant comments that restate what the code obviously does.

When should I use JSDoc for TypeScript functions and classes?

Use JSDoc for all exported functions and classes to document their public API. JSDoc provides structured, maintainable API documentation and integrates with IDEs for inline help, making your code more accessible to other developers.

What's the difference between self-documenting code and comments?

Self-documenting code uses expressive naming, clear structure, and logical flow to make intent obvious without comments. Comments complement this by explaining why decisions were made or clarifying non-obvious steps, not by restating what code already shows.

How do I avoid writing redundant or outdated comments?

Write evergreen comments that explain underlying logic or non-obvious decisions rather than temporary notes or change tracking. Review comments during code review to remove those restating obvious code, ensuring they add real value and remain valid as code evolves.

Can I add Korean-language comments for API documentation in TypeScript?

Yes, you can include Korean API descriptions in JSDoc comments for Swagger documentation and team clarity. Use Korean descriptions in your JSDoc blocks for exported APIs to serve both English-reading code and localized documentation systems.

How do I document complex algorithms with effective comments?

Document complex algorithms with concise comments that explain the underlying logic, key steps, or non-obvious reasoning—not a line-by-line restatement. Place comments before the algorithm or at decision points to clarify intent and help maintainers understand the approach.