code-comments
Skill48 starsChanged 51 days agoMITView on GitHub
Write, review, or remove code comments. Use when adding comments or doc comments, reviewing the comments in a diff, or cleaning up or removing comments.
28 other projects use a version of this.
Adopted by
Most recently taken up by
- gauravjuvekar/agent-skillstheir own version, first seen Nov 8, 2026
- caidanw/skillstheir own version, first seen Nov 8, 2026
- bmsuisse/skillstheir own version, first seen Nov 6, 2026
- AllayMC/Allaytheir own version, first seen Nov 1, 2026
- pumpkit-io/sdlctheir own version, first seen Nov 1, 2026
- gabrielbauman/skillstheir own version, first seen Nov 1, 2026
Used with
Projects with it also use api-design, changelog and 4 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
MicrosoftSkillapi-design
Guide for designing and documenting RESTful APIs. Use when asked to design an API, create endpoints, or document an API.
Also in 3 projects that use this
HashiCorpSkillchangelog
Add a `.changelog/<PR_NUMBER>.txt` entry for a GitHub Pull Request, commit, and push.
Also in 3 projects that use this
GoogleSkillimprove-codebase-architecture
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
Also in 4 projects that use this
GoogleSkillcodebase-design
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
Also in 3 projects that use this
MicrosoftSkillhandoff
Compact the current conversation into a handoff document for another agent to pick up.
Also in 3 projects that use this
- +1 more from google
Other versions28 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 28
- bholmesdev/hubble.md★ 1.5ksame name
- overmind-core/overmind★ 752same name
- AllayMC/Allay★ 348same name
- pensarai/apex★ 323same name
- portabletext/editor★ 285same name
- keitakn/engineering-skills★ 14same name
- caidanw/skills★ 11same name
- ARTPARK-SAHAI-ORG/calibrate-backend★ 4same name
- karlhorky/agent-skills★ 4same name
- ton-anywhere/my-favorite-prompts★ 4same name
18 more not listed
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 repository19 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- skills/vignette-todo-run/launchers/claude.mdCLAUDE.md
- catch-upSkill
- clean-copySkill
- deep-researchSkill
- discernment-nudgeSkill
- exhaustive-systems-analysisSkill
- frame-checkSkill
- herdr-namesSkill
- latent-potentialSkill
- plainSkill
- pr-descriptionSkill
- pr-screenshot-comparisonSkill
- pr-self-reviewSkill
- refine-proseSkill
- release-notesSkill
- spikeSkill
- vignette-todo-runSkill
The file
We split this skill into the rules it gives an agent
11 rules. 0 are common, 10 are distinctive, and 1 is very specific to this project.
0
Common
Most of the 25 edited versions we read keep these.
10
Distinctive
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
Delete every comment that is not on the keep list.
- Very specific: line 40
Check the claim: Read the code and its callers.
- Distinctive: line 44
Make the code say it: When a comment explains our own code, change the code so the comment is unneeded, then delete it.
- Distinctive: line 51
Match the keep list: Keep a comment that fits an item.
- Distinctive: line 71
The rule is style-only, or wrong at this line: keep the suppression. When the reason is not obvious, say in a few words what the rule gets …
- Distinctive: line 72
When the reason is not obvious, say in a few words what the rule gets wrong here.
- Distinctive: line 83
When the user names files, use those files.
- Distinctive: line 100
When the code belongs to someone else, such as a teammate's PR, report findings instead of editing.
- Distinctive: line 109
Every claim follows from the code, a verified behavior, or a maintained source.
- Distinctive: line 119
Keep. The constraint is set outside our code:
- Distinctive: line 152
Delete. The warning is stale:
“Common” is measured: kept by at least 6 in 10 of the 25 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Code comments
Delete every comment that is not on the keep list. When you are not sure a comment fits an item, delete it. A comment that explains our own code usually means the code should change: make the code say it, then delete the comment. Before adding a comment while writing code, hold it to the same list.
Keep list
A comment stays only when it is one of these, and only while its claim holds today:
- A legal or license header.
- A tool directive, such as
// prettier-ignore,@vitest-environment, or a compiler pragma. Lint and type suppressions must also pass Suppressions. - A doc comment on an API used outside its module that states what the signature and types cannot: units, ownership, side effects, errors thrown, rejected inputs.
- A constraint set outside our code: a dependency or platform bug, a vendor or protocol rule, a business rule, a regulation. It names the source, and links the issue, spec, RFC, or ADR when one exists. A workaround also states the condition for removing it.
- A true constraint on our own code that the code cannot show yet, such as a required call order, or a line that looks removable but is not. It stays only until a code change, type, assertion, or test removes the need (steps 2 and 4).
- A
TODOthat links a tracked issue.
Judge each comment
Take each comment in scope through these steps in order.
- Check the claim. Read the code and its callers. Delete a comment
that is false or stale.
IMPORTANT,NOTE,do not remove,careful,for now, and any justification longer than two lines are claims to check, not reasons to keep. - Make the code say it. When a comment explains our own code, change the code so the comment is unneeded, then delete it. In a cleanup or review, make only changes that keep behavior the same: rename after checking the consumers, or extract a named constant or local variable. For a change to what a function does or takes, even a private one, report the exact symbol and the change instead. The comment then goes to step 3, and often fits item 5 until that change is made.
- Match the keep list. Keep a comment that fits an item. Judge it sentence by sentence: delete each sentence that does not serve the item or cannot be verified, without rewording the rest.
- Offer an encoding for each item 5 comment: a type, an assertion, or a test that fails when someone breaks the constraint. Add it only after the user approves, then delete the comment.
- Delete the rest. Move what still matters to where it belongs:
- Task history (what changed, who approved it, what was tried, how it was verified) goes in the commit or PR.
- A
TODOwith no issue goes in the report, so it can be filed. - A value copied from a constant becomes a reference to the constant.
- Commented-out code, file headers, section banners, and "Used by" lists go with no replacement. Git history and search answer them.
Suppressions
eslint-disable, @ts-ignore, @ts-expect-error, # type: ignore,
# noqa, swiftlint:disable, //nolint, and #[allow(...)] switch off a
check. Look up what the rule catches before judging one.
- The rule is style-only, or wrong at this line: keep the suppression. When the reason is not obvious, say in a few words what the rule gets wrong here.
- The rule catches bugs, such as type errors or unsafe code: the suppression hides a defect. If the change under review added it, fix the code and remove the suppression. Otherwise report the symbol and the rule.
Cleaning up or reviewing a change
- Set the scope. By default, use the comments the change added or edited: the diff against the base branch, including uncommitted work. When the user names files, use those files. Leave every other comment alone.
- Use a fresh reader for code this session wrote. You remember why each comment was written. The next reader will not, and a subagent with no shared context will not either, so it judges the way that reader would. Give it the path to this file and the scope. Tell it to edit only comments, and to report proposed code changes, encodings, and suppressions. Without a subagent tool, run the pass yourself.
- Judge each comment as above.
- Audit the subagent's work, if one ran the pass. Restore a deletion only when the comment fits a keep-list item as written. Revert any change outside comments.
- Report, starting with the number of comments deleted. Then list each
comment kept with its keep-list item, each code change made or proposed
with its symbol, encoding offers, suppressions reported, and
TODOs deleted without an issue.
When the code belongs to someone else, such as a teammate's PR, report findings instead of editing.
Form
For a comment that stays:
- One or two lines. Longer only when the constraint needs it.
- Plain words and the domain's own names.
- Every claim follows from the code, a verified behavior, or a maintained source. A performance number from memory does not.
- State a runtime invariant precisely.
- For a workaround, explain the mechanism in execution order and the caveat that remains.
- Lint and compatibility choices are tradeoffs. Say what was traded, not that it is the rule.
Examples
Keep. The constraint is set outside our code:
// The payments provider retries a webhook until it gets a 2xx response,
// so the same event can arrive more than once.
if (await processedEvents.has(event.id)) return ok();Make the code say it. The comment explains our own name:
# t is the timeout in milliseconds
def connect(host, t): ...becomes
def connect(host, timeout_ms): ...Offer an encoding. The call order is a true constraint on our own code:
// Must run before initAnalytics(), which reads the consent flag.
loadConsent();
initAnalytics();Passing the value makes the order impossible to break:
initAnalytics(loadConsent()). Keep the comment until the user approves
that change.
Delete. The warning is stale:
// IMPORTANT: do not remove. The dashboard reads this field.
user.legacyId = user.id;A search finds no reader of legacyId. Delete the comment and report the
dead assignment.
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.

