comment-style
Skill2 starsChanged 3 months agoBSD-2-ClauseView on GitHub
Rules for writing and revising code comments. Use whenever you write a new comment, review or rewrite existing comments, or a task asks you to clean up, tidy, or refine comments. Follows the Linux kernel commenting guidance for prose and intent, while leaving comment delimiters and layout to the host language or project.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- LuisUrrutia/skillstheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- LuisUrrutia/skills★ 2same 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 repository2 other files it gives its agents.
- bug-huntSkill
- trim-agent-patchSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
14 rules. About 0 are common, 13 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
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
- Very specific: line 10
Follow the Linux kernel commenting guidance for the content and prose of comments.
- Distinctive: line 22
Do not use comments to compensate for code that is unnecessarily difficult to follow.
- Distinctive: line 24
Remove or shorten comments that merely repeat information already obvious from the code, type, name, or signature.
- Distinctive: line 40
When condensing a comment, remove procedural narration before removing this kind of context.
- Distinctive: line 45
Avoid excessive commentary inside function bodies.
- Distinctive: line 54
Do not add boilerplate documentation that only restates a function signature, field name, type, or other information already visible in the …
- Distinctive: line 59
Write comments as direct, natural prose.
- Distinctive: line 62
Avoid em dashes when a comma, period, parentheses, or a separate sentence reads more naturally.
- Distinctive: line 64
Avoid semicolons when two ordinary sentences are clearer.
- Distinctive: line 66
Avoid inventing or overusing dash-joined compounds for concepts that can be expressed plainly.
- Distinctive: line 69
Keep established terms, proper names, protocol names, and code identifiers unchanged when their spelling includes a hyphen or dash.
- Distinctive: line 72
Do not force a rewrite solely to remove punctuation or a legitimate compound when the existing wording is already the clearest option.
- Distinctive: line 81
If unsure whether a piece of context is important, prefer keeping it and making the wording clearer.
- Distinctive: line 86
When asked to tidy comments after a change, only touch comments on or directly related to the changed lines.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 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 style
Rules for any code comment you write or revise.
Follow the Linux kernel commenting guidance for the content and prose of
comments. Do not copy its /* ... */ delimiter or block layout rules unless
the surrounding project already uses them.
1. Describe WHAT, not HOW
Comments should explain what the code does, guarantees, represents, or exists to accomplish. Do not narrate the implementation step by step when the code itself can make those steps clear.
- Rewrite procedural comments such as "first check X, then increment Y, then store Z" into a statement of the behavior, invariant, or result that matters.
- Do not use comments to compensate for code that is unnecessarily difficult to follow. Prefer clearer code when that is within the scope of the task.
- Remove or shorten comments that merely repeat information already obvious from the code, type, name, or signature.
2. Explain WHY when it adds useful context
A useful comment may explain why a choice exists when that reason is not recoverable from the code alone. Preserve context that helps a future reader understand constraints or avoid breaking an invariant.
Useful context includes:
- where a value comes from and what invariant ties it to another value
- non-obvious constraints or ordering requirements
- compatibility, correctness, or safety reasons for otherwise surprising code
- the reason a workaround exists, preferably with a link when appropriate
When condensing a comment, remove procedural narration before removing this kind of context.
3. Keep comments focused and close to their purpose
Avoid excessive commentary inside function bodies. If a function needs many comments to explain each part of its implementation, the code may need a clearer structure instead.
Small local comments are appropriate when they call out a non-obvious detail, constraint, workaround, or surprising behavior. For broader behavior, prefer a comment near the function or declaration that says what it does and, when useful, why it does it.
Do not add boilerplate documentation that only restates a function signature, field name, type, or other information already visible in the declaration.
4. Prefer plain sentence structure
Write comments as direct, natural prose. Prefer short sentences with a clear subject and purpose over compressed punctuation or dense modifier chains.
- Avoid em dashes when a comma, period, parentheses, or a separate sentence reads more naturally. They are not forbidden, but should be uncommon.
- Avoid semicolons when two ordinary sentences are clearer. Use one only when it materially improves the sentence.
- Avoid inventing or overusing dash-joined compounds for concepts that can be expressed plainly. Prefer phrases such as "at parse time" over "parse-time" when the compound adds no precision.
- Keep established terms, proper names, protocol names, and code identifiers unchanged when their spelling includes a hyphen or dash.
Do not force a rewrite solely to remove punctuation or a legitimate compound when the existing wording is already the clearest option.
5. Preserve useful comments during cleanup
WHAT over HOW is not a reason to delete information that cannot be recovered from the code. When revising an existing comment, preserve important context unless it is wrong, obsolete, or clearly redundant.
If unsure whether a piece of context is important, prefer keeping it and making the wording clearer.
Scope of a cleanup task
When asked to tidy comments after a change, only touch comments on or directly related to the changed lines. Leave unrelated existing comments alone unless told otherwise. Never alter code lines while editing comments. Run the formatter and tests afterward when the task and environment make that appropriate.
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.

