Code Comment Patterns

Community

Write comments that explain why, not what.

AuthorHermeticOrmus
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill addresses the common issue of unhelpful or misleading code comments, ensuring that comments provide genuine value by explaining the reasoning behind code decisions rather than simply restating what the code does.

Core Features & Use Cases

  • Guidance on Effective Commenting: Provides clear rules and examples for writing comments that explain the "why" behind code.
  • Specific Scenarios: Details when comments are required, such as for non-obvious algorithms, workarounds, magic numbers, and business rule implementations.
  • TODO Standards: Establishes best practices for TODO comments, including owner and expiry context.
  • Anti-Pattern Identification: Highlights common pitfalls like echoing types, commented-out code, lying comments, and apologetic comments.
  • Use Case: A developer is unsure how to document a complex piece of logic. They consult this Skill to understand the best practices for explaining the non-obvious choices made in the implementation, ensuring future maintainability.

Quick Start

Use the code comment patterns skill to understand how to write effective comments for complex code.

Dependency Matrix

Required Modules

None required

Components

references

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: Code Comment Patterns
Download link: https://github.com/HermeticOrmus/LibreCopy-Claude-Code/archive/main.zip#code-comment-patterns

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.