comment-quality
Skill2 starsChanged 56 days agoMITView on GitHub
Use when writing or reviewing comments and docstrings — new, stale, or lacking WHY.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- notque/vexjoy-agenttheir own version, first seen Nov 7, 2026
- notque/claude-code-toolkittheir own version, first seen Oct 8, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- notque/claude-code-toolkit★ 448same name
- notque/vexjoy-agent★ 448same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository20 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- artifact-handoffSkill
- catalogSkill
- changelog-qualitySkill
- change-splittingSkill
- code-structureSkill
- evidence-disciplineSkill
- factual-integritySkill
- language-style-samplingSkill
- llm-tellsSkill
- plan-iteration-gateSkill
- pre-commit-checkSkill
- project-discoverySkill
- repo-hygieneSkill
- self-review-gateSkill
- skill-authoringSkill
- socratic-specSkill
- systematic-debuggingSkill
- upstream-hygieneSkill
The file
We split this skill into the rules it gives an agent
2 rules. About 0 are common, 2 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 40
If you can answer "why not simpler?" you need a comment.
- Distinctive: line 86
Use placeholder tokens for verification examples (self-dogfoods upstream-hygiene).
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Comment Quality
<!-- GC-20 --> Comments explain WHY code does this, not WHAT the next line does.Rules
GC-20 — WHY not WHAT, density
- "/* increment counter */" → delete (code says WHAT, comment must say WHY).
- Multi-paragraph essay / numbered plan comment → compress to 2-8 line WHY block. Link to issue/pr for long history, not in comment.
- Doc scaffolding
/** @paramon private/internal helper → downgrade to plain/*WHY block or delete. Reserve full doc for exported public APIs. Grep forname - summary+@param:to catch — scaffolding appears under both markers. - 50-word para cap aim (see changelog GC-12) applies to comments too.
GC-21 — Placement, one source of truth at definition
- Doc comment lives at definition, not prototype/header when they differ. Header can have brief one-liner or none — deep WHY at def.
- Helper inserted? Doc left describing wrong function after insert still compiles — read for it.
GC-22 — Subtle logic MUST have WHY
Genuinely subtle logic with no WHY comment is a bug. Check:
- Locking / ordering / lifetime / invariant / barriering / ownership transfer.
- Security / validation decision: why safe here but not elsewhere.
- Concurrency: who serializes, what can race, what barrier pairs where.
If you can answer "why not simpler?" you need a comment.
GC-23 — Comment contradicted by a code change → rewrite in the same diff
Stale comment is worse than none, and a stale DOCSTRING is worse than a stale comment: a comment narrates, a docstring makes a contract — one naming a parameter, return key or field the code no longer has reads as an invitation to call something that is not there. Rank the drift by what the text claims, not by how close it sits to the edit.
- Radius is the identifier, not the neighbourhood. Removing a key, field,
flag, function or config name is a rename in reverse: grep the WHOLE tree for
that name — code, tests, docs, docstrings, comments — and settle every hit in
the same commit (
change-splittingGC-36 owns the completion evidence). The survivors are the ones no compiler reports: a docstring in the file you edited, or a comment in ANOTHER module that justified its own field by the removed thing. - Write what is true now, not what was true. The replacement says why the code does what it does today; the retraction is history and belongs in the changelog, where a reader looking for it goes. GC-24 already bans provenance in shipped comments — a retraction note is provenance. A comment whose only justification was the removed thing is rewritten to that thing's own contract, or deleted.
GC-24 — Public-only context
Per upstream-hygiene: no private infra, no internal mount paths, no "this is like our fix in X" cross-project lore. If comment needs external pairing, name only upstream public symbols, e.g. "Pair with update_cache() — must hold lock per contract in cache.c".
GC-25 — Comment removal is cleanup, not fix — separate drive-by
Removing a long-wrong comment mixed with logic change inflates diff. Do: separate commit "Remove stale comment — no behavior change" or fold only when that stale comment explains logic you are changing now.
Anti-patterns
| Bad | What to do |
i++; // increment i | delete |
| 20-line plan comment explaining iteration history | compress to invariant + Link to pr/issue |
/** This helper does X @param y */ on static private | /* X because Y */ or delete if obvious |
| Comment says "see jira IN-123" | public link or gist: "See #123" |
| Comment describes other project's fix | rewrite for this project's invariants |
Positive framing for comments too
Applies from generic-principles "Positive framing". Comment that says "This is not kernel code" or "This is not X" is defining by negation — rewrite to what it IS and its contract. Provenance ("was previously ...") belongs in commit message or docs/references, not in code comment that ships.
Verification
Use placeholder tokens for verification examples (self-dogfoods upstream-hygiene).
# Stale pattern: probe nearby file for contradictory TODO
git diff --unified=0 | grep -A2 -B2 "TODO\|XXX\|HACK"
# Private leakage — real scanner lives in private overlay; skeleton here uses placeholder marker
git diff HEAD 2>/dev/null | grep -E "^\+\s*(//|#|/\*|\*)" | grep -i "example\.invalid" && echo "REVIEW: placeholder marker still present — strip or rewrite" || echo OKRelated
code-structureowns helper extraction — this skill owns what comment moves with it.upstream-hygieneowns banned classes — this skill references it for examples.generic-principlesPositive framing — where tagline rule encoded.project-discovery— sample the changesets of the files you touch for the project's comment style, terminology, and length.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

