What problem does it solve?
Developers often struggle to decide when code needs comments, how to name classes, functions, and variables clearly, and how to avoid comment anti-patterns that create maintenance burden. This Skill provides concrete principles for writing self-documenting code and applying comments only where syntax cannot express intent.
Core Features & Use Cases
- Naming Principles: Rules for naming classes, functions, variables, and constants so names capture semantics fully, including guidance on handling complex entities and avoiding magic constants.
- Comment Decision Framework: Criteria for when comments are necessary, such as documenting design decisions, complex algorithms, side effects, invariants, and behavioral contracts.
- Anti-Pattern Detection: A catalog of common mistakes including commented-out code, changelog comments, redundant restatements, imprecise TODOs, and non-local references.
- Use Case: When reviewing a pull request, use this Skill to evaluate whether a new function name is sufficiently expressive and whether the added comments follow Doxygen or JSDoc conventions without duplicating information.
Quick Start
Ask the AI to review the naming and comments in a source file using the expressive-code guidelines and suggest improvements.