write-comments
Installation
SKILL.md
How to Write Code Comments
The "Self-Documenting Code" Myth
Good names tell you what the code does. Comments tell you why it exists, what constraints it operates under, why this approach was chosen over alternatives, and what invariants must hold. No matter how expressive the identifiers, these things cannot be inferred from reading the code alone.
Do not skip comments on the grounds that "the code is clear." Clear code and good comments are complementary, not substitutes.
Why Write Comments
- Comments capture design decisions and intent that code cannot express.
- Comments are part of the abstraction — good interface docs let callers avoid reading the implementation.
- Writing comments early exposes design problems before you invest in implementation.
- Good comments dramatically reduce cognitive load for future maintainers.