Global Commenting

Insert minimal comments explaining complex logic across codebases.

Updated Aug 27, 2026
One-click install
npx skills add https://github.com/elliotsaha/smt-slack-app --skill global-commenting-elliotsaha
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Global Commenting
Source: https://github.com/elliotsaha/smt-slack-app/tree/main/.claude/skills/global-commenting
Command: npx skills add https://github.com/elliotsaha/smt-slack-app --skill global-commenting-elliotsaha

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill prevents codebases from becoming cluttered with outdated or redundant comments, while ensuring complex logic is adequately explained. It automates the practice of writing self-documenting code, saving developers time in understanding and maintaining the codebase.

Core Features & Use Cases

  • Self-Documenting Code: Prioritizes clear naming and structure over excessive comments.
  • Strategic Commenting: Guides when and where to add comments for complex logic or non-obvious details.
  • Comment Maintenance: Promotes reviewing and removing outdated or unnecessary comments.
  • Use Case: When implementing a sophisticated data transformation algorithm, this Skill ensures the AI adds a concise block comment explaining the overall process, but relies on descriptive variable names for individual steps, eliminating the need for line-by-line comments.

Quick Start

When implementing the calculateTax function, ensure variable names are descriptive enough that no inline comments are needed, but add a block comment at the top explaining the tax calculation logic.

Frequently Asked Questions about Global Commenting

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

FAQPage Schema
How do I know when to add comments versus relying on code structure and naming?

Self-documenting code prioritizes clear naming and structure over excessive comments. Add comments only for complex logic, non-obvious implementation details, and algorithmic decisions that naming alone cannot convey. Remove or update comments when code changes, keeping explanations evergreen and relevant to the current implementation.

What's the best way to write comments that won't become outdated?

Write comments that explain the why and what of complex sections, not the how. Focus on algorithmic intent, business logic, and non-obvious design choices rather than restating what the code visibly does. Keep comments minimal and high-level so they remain valid across minor refactors and maintenance updates.

Can I apply self-documenting code practices across different programming languages?

Yes, self-documenting principles apply universally across all languages and codebases. The core practice—clear naming, strategic comments for complexity, and removal of redundant explanations—works during writing, editing, reviewing, and refactoring regardless of language, framework, or codebase size.

How do I balance descriptive variable names with the need for shorter, cleaner code?

Use descriptive names for variables and functions to eliminate the need for inline comments explaining their purpose. This replaces line-by-line commentary with readable code structure. Reserve block comments for complex algorithms or non-obvious logic where naming cannot fully capture intent.

What standards should comments follow to stay consistent with automated checks and linting?

Self-documenting code integrates with coding standards and automated linters by keeping comments minimal, non-redundant, and aligned with naming and structure conventions. Specify functional and technical requirements for comments in your style guide, then enforce through tools to maintain consistency across reviews and refactoring.

Why does my codebase have outdated comments that hurt readability?

Outdated comments clutter codebases when comment maintenance isn't enforced during code reviews and refactoring. Self-documenting practices prevent this by reducing comment volume upfront, prioritizing clear naming and structure, and promoting regular review and removal of unnecessary explanations during maintenance cycles.