documenting-code-comments
Installation
SKILL.md
Code Comments
Core principle: The best comment is the one you didn't need to write.
Hierarchy
- Make code self-documenting (naming, structure)
- Use type systems for contracts
- Add comments only for WHY, never WHAT
When NOT to Comment
| Avoid | Why |
|---|---|
// Get the user's name |
Restates code |
@param {string} email |
Types already document |
| Stale comments | Misleading > missing |