Install
npx skillscat add damianwrooby/javascript-clean-code-skills/clean-codejs-comments Install via the SkillsCat registry.
SKILL.md
Clean Code JavaScript – Comment Patterns
Table of Contents
- When to Comment
- When Not to Comment
- Examples
When to Comment
- Explain why, not what
- Document complex business rules
When Not to Comment
- Obvious code
- Outdated explanations
Examples
// ❌ Bad
// Increment i by 1
i++;
// ✅ Good
// Retry once to handle flaky network condition
retryRequest();