Claude Code hook

Go Claude Code Comment Checker

Multi-language comment detection hook for Claude Code. 100% vibe coded by Claude Opus 4.5.

25 stars 8 forksHooks Source

Install

Install
brew install comment-checker

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/code-yeongyu/go-claude-code-comment-checker.git

From the README

comment-checker
100% vibe coded. zero comments in my code, zero comments in yours.
this entire repo - code, docs, readme, everything - was written by LLMs.
shoutout to claude opus 4.5.

A PostToolUse hook for Claude Code / OpenCode that yells at you when you write unnecessary comments.

Built with Rust + tree-sitter. Fast. Opinionated. No mercy.

why

comments are code smell. if your code needs comments to be understood, your code sucks.

this hook watches every Write, Edit, MultiEdit and screams when it detects comments.

exceptions exist. BDD comments (# given, # when, # then), linter directives (# noqa, // @ts-ignore), shebangs - these are fine. everything else? delete it. yes, even docstrings.

install

npm / bun

homebrew (macos/linux)

manual

grab binary from releases.

setup

add to ~/.claude/settings.json (or .claude/settings.json in your project):

done. now claude will think twice before leaving // TODO: fix later in your code.

what it catches

what it allows

30+ languages

python, go, typescript, javascript, rust, c, c++, java, ruby, php, swift, kotlin, scala, elixir, and more.

if tree-sitter supports it, we support it. the archived Go implementation lives under go/; the production CLI is Rust.

how it works

1. hook receives JSON from Claude Code
2. extracts content from Write/Edit/MultiEdit tool input
3. detects language from file extension
4. parses AST with tree-sitter
5. finds comment nodes
6. filters out allowed patterns (BDD, directives, shebangs)
7. if anything remains → exit 2 with warning message

the Rust workspace also has buildable wasm32-unknown-unknown and N-API binding crates for future consumers. those paths are CI buildability gates for now; npm still ships native binaries.

exit codes

custom prompt

you can replace the default warning…
Read the full README on GitHub

How hooks work

  • Hooks are shell commands Claude Code runs at fixed points: before or after a tool call, when you submit a prompt, when Claude stops, on notifications and at session start.
  • They are set in the hooks section of ~/.claude/settings.json (or .claude/settings.json for a project), or come bundled in a plugin.
  • A hook can block a tool call, add context, or run a formatter or test. Read the scripts before you install them: they run on your machine with your permissions.
Claude Code docs

Details

Type
Hooks
Language
Go
License
MIT
Last updated
30 September 2026

FAQ

What is Go Claude Code Comment Checker?

Multi-language comment detection hook for Claude Code. 100% vibe coded by Claude Opus 4.5. It is a hook for Claude Code, from code-yeongyu/go-claude-code-comment-checker on GitHub.

How do I install Go Claude Code Comment Checker?

Run brew install comment-checker, then follow the setup in the README.

Is Go Claude Code Comment Checker popular?

code-yeongyu/go-claude-code-comment-checker has 25 GitHub stars and 8 forks. It was last updated on 30 September 2026.

More hooks

Browse the most popular Claude Code mods, all hooks, or the skills and MCP server directories.