Summary
- Write self-documenting code with minimal, helpful comments that explain complex logic without documenting temporary changes or fixes.
- Use this skill when adding comments to code, documenting functions or classes, or explaining complex algorithms.
- When writing or editing any code file that may benefit from explanatory comments.
- When reviewing existing comments to ensure they remain evergreen and relevant.
- When deciding whether code needs comments or if better naming and structure would be clearer.
- This skill applies to all code files in any programming language including `.js`, `.ts`, `.py`, `.rb`, `.java`, `.go`, `.php`, and others.