code-comments

code-comments is a skill for Claude Code from juxt/claude-plugins. It costs 81 tokens per session (2,633 once invoked), scanned A, original, MIT.

A guide to deciding when code comments are useful, covering comments for people who call code and comments explaining non-obvious implementation details.

In plain words
What is it for?
Use it before writing or editing comments, docstrings, or KDoc, and when reviewing a code change that adds or removes them.
Why use it?
It helps prevent comments that merely repeat the code, while preserving information a future developer would otherwise have to rediscover.

Skill for Claude Code

Written for Claude Code: user-invocable in frontmatter.

Part of the chalk plugin — 11 skills, 6 agents shipped together

Good fit Use it before writing or editing comments, docstrings, or KDoc, and when reviewing a code change that adds or removes them.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/juxt/claude-plugins/code-comments
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add juxt/claude-plugins --skill code-comments
Clone the repo
git clone --depth 1 https://github.com/juxt/claude-plugins

Made for: Claude Code.

Or install chalk, the plugin that ships this one along with the rest of its 11 skills, 6 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for code-comments

README.md
[![agentmods](https://agentmods.dev/badge/skills/juxt/claude-plugins/code-comments/github.svg)](https://agentmods.dev/skills/juxt/claude-plugins/code-comments)
Your own site
<a href="https://agentmods.dev/skills/juxt/claude-plugins/code-comments"><img src="https://agentmods.dev/badge/skills/juxt/claude-plugins/code-comments/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for code-comments

Your own site · 80×15
<a href="https://agentmods.dev/skills/juxt/claude-plugins/code-comments"><img src="https://agentmods.dev/badge/skills/juxt/claude-plugins/code-comments.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 81 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,633 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00081 $0.02633
Opus 5.5 $0.00032 $0.01053
Sonnet 5.5 $0.00016 $0.00527
Haiku 4.5 $0.00008 $0.00263

Measured 5d ago against content hash c8426b057ec7, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

code-comments scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/chalk/skills/code-comments/SKILL.md · 186 lines

How it starts

The opening of the file, as written. The whole thing — 186 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Chalk Code Comments — What Earns a Comment

Interpret MUST, MUST NOT, SHOULD, SHOULD NOT, MAY, etc. per RFC 2119.

You SHOULD NOT write any code comments

The code is the artefact; a comment is a second copy of part of it that nothing verifies. No compiler checks it, no test fails when it drifts, and a reader who trusts a stale comment ends up worse off than one who had nothing. Everything below this section is the narrow set of cases where that cost is worth paying.

  • Where a comment is tempting, change the code instead. Kernighan and Plauger's rule from The Elements of Programming Style is still the first move: don't comment bad code — rewrite it.

  • The reader already assumes you chose this deliberately and with care. They apply Chesterton's fence before they touch it, so you MUST NOT spend a comment defending the code against a reader who was never sceptical. Explaining a constraint the reader can't see is a different act from justifying yourself, and only the first has an audience.

  • A comment that does survive is a Chalk artefact. It MUST be written in the chalk voice — chalk:voice carries the register, the audience and the rule that two propositions in a relation take a mindmap rather than prose.

Interface comments are the standing exception

Interface and implementation comments split as Ousterhout splits them in A Philosophy of Software Design, ch. 13. On a public surface an interface comment exists by default and is judged on completeness rather than on necessity; the default above, and everything below unless it says otherwise, is about implementation comments.

  • A non-public surface takes the implementation rules whatever its markup. A comment on a private function still has to earn its place.

Three moves that dissolve a comment

Each removes the need for the comment rather than shortening it, and you MUST exhaust them before writing one.

  • Rename the thing. Before describing a variable, a parameter or a function, try a name that makes the description unnecessary. A comment saying what n holds is a naming decision deferred; retryBudgetMs needs no comment at all.

Read the full file on GitHub · 186 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago Changed · -9 tokens per session c8426b057ec7
  2. 15d ago Changed · -11 lines 2ceffa0d211e
  3. 2mo ago Changed · -30 lines 2f40f38497ab
  4. 2mo ago Changed · +36 lines 5e88c9d38601
  5. 2mo ago Changed · +68 lines · +14 tokens per session 9bc170fbf588
  6. 2mo ago Changed · +10 lines df24b4e8356e
  7. 3mo ago First seen · 113 lines · 76 tokens per session scan A 45b0d8bc942d

Subscribe to this mod's changes

code-comments is a skill published in the GitHub repository juxt/claude-plugins (11 stars, last pushed yesterday), licensed MIT. It adds 81 tokens to every session and 2,633 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

code-comments compared with skills from other repositories

code-comments next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
code-commentsjuxt/claude-pluginsSkill11yesterdayMITA81Claude Code
autoreviewopenclaw/clawhubSkill9.6ktodayMITA17Claude Code, Codex
omh-code-reviewrlaope/oh-my-hermesSkill6.2kyesterdayMITA18Claude Code
agent-teams-simplify-and-hardenLeoYeAI/openclaw-master-skillsSkill2.2k10d agoMITA115Claude Code, Codex
asplos-writing-stylebrycewang-stanford/Awesome-Journal-SkillsSkill1.5k4d agoMITA65Claude Code
revdiff-planumputun/revdiffSkill974todayMITA84Claude Code
re0-mergeLilMGenius/paperthinSkill1.5kyesterdayMITA51Claude Code, Codex