Code comments
Write and improve code comments and docstrings that explain why, not noise. Use whenever the user asks for better comments, docstrings, module headers, JSDoc/TSDoc, or documentation comments in source code.From its SKILL.md
npx -y skills add shinzoxD/knackbox --skill code-commentsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its file declares
Copied from the file, not written here
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
1.7 KB, 288 tokens by cl100k_base, as published. Nobody here has run it
Code Comments
Comments capture intent, invariants, and non-obvious trade-offs. If the code can be clearer, prefer rename/refactor over a comment that restates the line.
When to comment
- Why a non-obvious approach was chosen
- Invariants and concurrency assumptions
- Workarounds for bugs in dependencies (link issue)
- Public API docstrings: params, returns, errors, examples
- Security-sensitive constraints
When not to
- Restate
i += 1as "increment i" - Leave stale comments that contradict code
- Joke or dead commented-out code blocks without reason
Rules
- Update comments in the same change as behavior.
- Prefer short, precise language; link specs when long.
- Public APIs get complete docstrings; internals only where needed.
- Mark TODOs with ticket refs if required by team norms — avoid empty TODOs.
- Do not invent library behavior in comments.
- For generated code, say so and point to source of generation.
Output format
Provide the commented code or a diff-style patch, plus a one-line rationale for non-obvious comments.
Edge cases
- Regulated code: traceability comments may be mandatory.
- Algorithms: complexity and references (paper/RFC).
- Deleted code: delete comments with code; use VCS history.
What ships with it: 1 file
1.3 KB alongside SKILL.md
benchmarks/
- prompts.json1.3 KB