/code-comments:code-commentsfrom code-comments
Add, improve, or audit comments that help humans understand and review code, especially LLM-written code, in any language. Use when asked to explain generated code through comments, improve source comments or API docs, clean up stale comments, or propose a commenting policy. Keep review-only audits read-only. Do not use for ordinary implementation or code review without a comment task.
Ships in code-comments. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Make code, especially code created by an LLM, understandable to the human who has to look it over, approve it, or maintain it. Give that reader a mental model of the approach, its contract, and decisions that would otherwise be easy to misread. An accurate existing comment or no comment can be the right result. Respect explicit user instructions over this skill's defaults.
AGENTS.md, inspect checkout ownership and unrelated changes,
and locate the requested files or symbols. Resolve a reference to the current
code from available context; ask for a target only when none can be identified.AGENTS.md only
when the user asks to apply that rule.Use the user's stated audience and repository context. By default, write for a reader who knows the language but is new to this code and its domain. Follow the reader's path from the entry point through inputs, state, important decisions, and outputs. Identify the questions they would need to answer to review the implementation: What approach is this using? What assumption makes it valid? Why this ordering or boundary? What can fail, and who handles it?
For a generated module or a non-obvious algorithm, add a brief introduction when it supplies missing context. Describe the approach and its important constraints, then put local explanations at the decisions they clarify. Ground design rationale in the task specification, actual code, callers, tests, or documented constraints. Do not reconstruct the LLM's private reasoning or invent the author's intent. Comments cannot repair confusing structure; report a needed refactor separately when it falls outside the requested scope.
Keep each fact at the place where readers need it. Use plain, concrete language and the repository's style and established natural language; translate only when requested. Include a small example when it clarifies a contract better than prose. Do not narrate syntax, restate obvious private implementation, copy signatures into prose, or attach research citations to ordinary comments. There is no target comment count, density, length, or “why-only” rule. See examples when a borderline choice needs illustration.
Apply Writer's relevant prose principles, adapted for source comments:
For a substantial prose rewrite or awkward explanation, read readable comments, then check the revised meaning against the code again. Writer is not a runtime dependency, and its style heuristics are not a banned-word list or proof of authorship.
__doc__, doctests, rustdoc tests, and documentation builds deserve
appropriate checks. Do not claim all comment changes are behavior-free.Review the final diff for unsupported claims, lost information, directives, and scope drift. Run the existing formatter and the narrow relevant lint, compile, test, documentation, or example checks. Inspect formatter changes and revert unrelated formatting you introduced. Use the project's installed toolchain; missing tools are a stated verification gap, not permission to install them. Do not invent tests solely to check prose or weaken existing checks.
Report the affected scope, the useful facts added or corrected, checks actually run, and material uncertainty. For an audit, give prioritized findings with file/symbol evidence and reader impact; distinguish confirmed inconsistency from stylistic suggestions and state where no comment was needed. Say if no edit is warranted. Do not claim understanding improved from packaging checks or tests alone, and do not commit, publish, or push unless requested.
What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub mylesmcook/mcook-plugins --plugin code-comments