code-commenter
Skill1 starsChanged 5 months agoMITView on GitHub
Use when adding, revising, or reviewing code comments and documentation so maintainers understand non-obvious rationale, domain rules, invariants, constraints, and public contracts without restating code mechanics.
3 other projects use a version of this.
Adopted by
Most recently taken up by
- sebas8824/sdd-harnesstheir own version, first seen Aug 24, 2026
- loskyertt/agent_skillstheir own version, first seen May 26, 2026
- Helg-git/claude-skillstheir own version, first seen Jan 25, 2026
Other versions3 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 3
- Helg-git/claude-skills★ 1same name
- sebas8824/sdd-harness★ 1same name
- loskyertt/agent_skills★ 0same 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 repository14 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent-skills-archive-orchestratorSkill
- call-r-lib-in-pythonSkill
- code-reviewerSkill
- end-user-xp-improverSkill
- fp-developerSkill
- lesson-documenterSkill
- plan-designerSkill
- preferred-workflowSkill
- release-preparerSkill
- scientific-prose-editorSkill
- simple-code-writerSkill
- spec-driven-developerSkill
- wayback-link-fallbackSkill
The file
We split this skill into the rules it gives an agent
11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈10
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
- Distinctive: line 23
Put durable public behavior in the appropriate docstring or API documentation.
- Distinctive: line 24
Add the smallest comment that explains the non-obvious fact.
- Distinctive: line 25
Remove or revise comments that restate mechanics, preserve dead code, speculate, or no longer match the implementation.
- Distinctive: line 29
Read comment patterns and examples when deciding whether a comment is warranted.
- Distinctive: line 37
Keep comments adjacent to the smallest stable unit they describe.
- Distinctive: line 41
Document inputs, outputs, errors, side effects, ownership, or safety for public or non-obvious interfaces.
- Very specific: line 43
Use TODO or FIXME only for concrete, actionable work.
- Distinctive: line 45
Delete commented-out code.
- Distinctive: line 46
Follow the project's documentation tooling and style.
- Distinctive: line 50
Stop and report when:
- Distinctive: line 64
No stale, redundant, speculative, or commented-out code remains in the touched scope.
≈ “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
Code Commenter
Make comments preserve information that clear code cannot express on its own.
Required context
Inspect the relevant implementation, callers, tests, public contracts, repository conventions, and existing comments. Pair this skill with the active implementation or review workflow; do not use comments to compensate for unnecessarily obscure code.
Decision workflow
- Simplify confusing code first when that can make the behavior obvious without changing its contract.
- Identify knowledge that would otherwise be lost: rationale, domain meaning, invariant, ordering requirement, compatibility constraint, safety condition, or deliberate tradeoff.
- Put durable public behavior in the appropriate docstring or API documentation.
- Add the smallest comment that explains the non-obvious fact.
- Remove or revise comments that restate mechanics, preserve dead code, speculate, or no longer match the implementation.
- Validate every changed comment against code and tests.
Read comment patterns and examples when deciding whether a comment is warranted. Read language guidance only for the language being changed.
Commenting rules
- Explain why a choice exists, what invariant it protects, or which external rule governs it; do not narrate syntax or control flow.
- Keep comments adjacent to the smallest stable unit they describe.
- Describe current truth. Put chronology in version control or a design record.
- Reference an ADR, issue, standard, or specification when it is the durable source of truth.
- Document inputs, outputs, errors, side effects, ownership, or safety for public or non-obvious interfaces; skip boilerplate for self-evident private helpers.
- Use
TODOorFIXMEonly for concrete, actionable work. Include an issue identifier when the project uses one. - Delete commented-out code; version control already preserves it.
- Follow the project's documentation tooling and style.
Stop conditions
Stop and report when:
- The intended behavior is unclear enough that a truthful comment cannot be written.
- A comment would conceal a correctness issue or substitute for a necessary refactor.
- The requested wording conflicts with the implementation or public contract.
- A domain or safety claim lacks a reliable source.
Validation
Before finalizing, verify:
- Each new comment adds rationale, context, or a contract not obvious from the code.
- Comments still hold for failure paths and edge cases.
- Public documentation matches the actual signature and behavior.
- No stale, redundant, speculative, or commented-out code remains in the touched scope.
Report which comments or docs changed and any uncertainty that prevented a safe update.
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.

