code-comment-generator

Installation
SKILL.md

Code Comment Generator

Good comments explain why, not what. The code already says what. If you're narrating the code, delete the comment and make the code clearer instead.

What deserves a comment

Worth commenting Why
A non-obvious constraint the code depends on "x is sorted here because caller guarantees it"
A tradeoff that was made deliberately "O(n²) is fine — n ≤ 20 by construction"
Why the obvious approach is wrong "Can't use .sort() — caller holds references into this list"
A workaround for an external bug "libfoo 2.3 returns NULL here; remove when we upgrade"
Magic numbers with a source "15s — AWS Lambda cold start p99 + margin"
Coupling to something far away "Must match the regex in nginx.conf"
A subtle correctness argument "Safe to read without lock: only written at startup"

What does NOT deserve a comment

| Skip | Why |

Related skills

More from santosomar/general-secure-coding-agent-skills

Installs
1
GitHub Stars
1
First Seen
Mar 29, 2026