Skip to content

Instantly share code, notes, and snippets.

@bavanws
bavanws / reducing-comment-verbosity-claude-code.md
Last active September 22, 2026 15:58
Reducing code-comment verbosity with Claude Code: pre-hoc (CLAUDE.md rules) + post-hoc (comment-cleanup skill)

Reducing Code-Comment Verbosity with Claude Code

Claude Code over-comments. It narrates loops, restates signatures, leaves change-log notes addressed to a PR reviewer who'll never see them, and points at spec sections that have already moved. Two layers fix it and compound: a pre-hoc layer in CLAUDE.md that steers the model as it writes, and a post-hoc cleanup skill that reclaims the residue — plus everything verbose you inherited from past work and other contributors. Use both; neither is sufficient alone.

The whole thing is one principle applied twice. Code shows how. A comment earns its place only by carrying why — a non-obvious constraint, a deliberate deviation, a gotcha, a workaround, the reason a tempting simpler version is wrong. Everything else is restatement, and restatement rots: it drifts out of sync, adds diff noise, and trains readers to skim past comments entirely.

Layer 1 — Prevent it (CLAUDE.md)

The block I use:

@bavanws
bavanws / README.md
Last active January 20, 2026 02:45
Claude Code desktop notifications for macOS

Claude Code desktop notifications for macOS

Claude Code Desktop Notifications (macOS)

Desktop notifications when Claude Code needs your input (permission prompts, questions).

Behaviour

  • Notification fires after a configurable delay (default 10s)
  • Each Claude session gets independent notifications - works with multiple instances in tmux/zellij
  • Notifications clear automatically when you respond (approve, reject, or send a message)