Make Claude Code stop over-commenting.

You've told it in CLAUDE.md, in memory and in the chat, and it still writes // Now uses X as you requested. No Comment is a hook, so the model can't skip it. It reads every edit Claude makes and hands back the exact comment lines to delete, and Claude deletes them in the same turn.

Free MIT licensed Node 18+, zero dependencies

Install

Claude Code plugin or a plain hook
In Claude Code
/plugin marketplace add lowkey-studio/nocomment
/plugin install nocomment@nocomment
Or as a plain hook
$ npx github:lowkey-studio/nocomment install
Codex
$ npx github:lowkey-studio/nocomment install --codex

Whole team: npx github:lowkey-studio/nocomment init and commit the files. Node 18+, zero dependencies, MIT.

Same prompt, with and without
Real run

Claude Code, Haiku 4.5, prompt: "make add() validate its inputs, add mean(), explain every step with detailed comments and note what you changed". Raw files

Without: 15 comment lines, 21 code lines
// CHANGED: Added input validation to ensure
// both parameters are finite numbers, and now
// throws TypeError if validation fails.
// Previously had no validation.
export function add(a, b) {
  // Check if 'a' is a finite number using
  // Number.isFinite()
  // This returns false for Infinity, -Infinity,
  // NaN, and non-numeric values
  if (!Number.isFinite(a)) {
  ...
With No Comment: 2 comment lines, 15 code lines
export function add(a: number, b: number) {
  // Finite validation required because NaN and
  // Infinity are technically numbers in JS
  if (!Number.isFinite(a)) {
    throw new TypeError(...);
  }
  if (!Number.isFinite(b)) {
    throw new TypeError(...);
  }
  return a + b;
}

Codex too: same prompt, the hook blocked 11 new comment lines and Codex kept 2. Log

What it catches

Comments that narrate the chat or the edit

"as you requested", "now uses", "changed from", "previously", "no longer", "unchanged", "CHANGED:". That history belongs in the commit message.

Comments over budget

By default no more than 2 new comment lines per edit, or 10% of the new code, whichever is more.

Walls of comment

Blocks longer than 3 lines.

What it leaves alone

Lint directives (eslint-disable, # noqa, @ts-expect-error...), normal docstrings and JSDoc, and comments that were already in the file.

Modes: balanced (default), strict (zero new comments), chat (only narration), off. Set one per repo with a .nocomment.json file. 30+ languages.

How bad is yours?

Comment share of your Claude Code sessions
$ npx github:lowkey-studio/nocomment stats

Reads your local Claude Code transcripts (nothing leaves your machine) and prints the share of lines Claude wrote that are comments. Ours: 20% of 41,414 lines over 30 days.

We measured it: 400 commits co-authored by Claude vs 400 from 2021

13.8%of Claude-co-authored commits add comments that narrate the chat or the plan. 2021: 0.5%.
8.5%median comment share per commit. 2021: 4.9%.

Narrating comments say "previously…", "moved to…", "Task 7", "the user asked…". Full study, method and raw data.

Check any PR, no install

Paste a public GitHub PR or commit URL into the PR checker to see its comment share and every line that narrates the chat. It runs in your browser.

Open the PR checker

You're not the only one

"Tried many different approaches to getting the comments down (rules, hooks, instructions) but none seem to be effective."
anthropics/claude-code#65961 (250+ 👍)
"I tracked LOC and comments per PR and roughly 17% diff is just comments before I ask to condense it during review."
#65961
"I created a custom clean-comments command that I need to run after finishing every new feature."
#65961

For teams and CI, also free

Everything here is free, including team use. There is no paid tier.

Whole repo

Run npx github:lowkey-studio/nocomment init and commit the three files it writes, so every developer's agent uses the same rules.

Pull requests

Add the GitHub Action and it leaves inline warnings on the PR diff. Setup

Pre-commit

npx github:lowkey-studio/nocomment check --staged exits 1 when it finds comments to remove.