Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Run automatically on Claude Code events. Claude doesn't decide.
2 cautions to review before installing
A hook runs when Claude uses the Bash tool
A hook runs when Claude writes or edits files
Static checks of hooks, mods, MCP servers and commands. Not a security audit.
1 marketplace, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
ファイル編集時に lint ignore コメントの挿入をブロックし、git commit 直前に staged ファイルを linter で検査し、編集後に自動フォーマットを適用し、git commit 直後の HEAD を再 lint して non-blocking フィードバックを返すプラグインです。
v0.8.4
このプラグインは 4 段階のコード品質ガードを提供します。
| タイミング | フック | 役割 |
|---|---|---|
| 編集直前 | block-ignore-lint-comment (PreToolUse / Write|Edit|MultiEdit) | ESLint/Prettier/Ruff の ignore コメント挿入を deny |
| 編集直後 | code-format (PostToolUse / Write|Edit|MultiEdit) | ESLint --fix / Prettier / Ruff で自動整形 |
git commit 直前 | block-commit-lint (PreToolUse / Bash) | staged ファイルに lint エラーがあれば commit を deny |
git commit 直後 | post-commit-lint (PostToolUse / PostToolUseFailure / Bash) | HEAD コミットを再 lint し、エラーがあれば non-blocking フィードバックを Claude に返す |
モノレポ構成 (例: front/, server/ 配下にそれぞれ linter 設定がある) でも、対象ファイルから上向きに最寄りの設定ファイルを探索し、その所在ディレクトリを実行 CWD として linter を起動します。
.js .jsx .ts .tsx .mjs .cjs)
--fix 事後修正)--write).py)
check --fix と format で事後修正)claude plugin marketplace add natsuume/natsuume-cc-marketplace
claude plugin install auto-lint-check@natsuume-plugins
本プラグインは Claude Code 専用で、Codex marketplace では配布していません。
ファイル: hooks/scripts/block-ignore-lint-comment.sh
イベント: PreToolUse (matcher: Write|Edit|MultiEdit)
新規挿入される内容に下記の ignore コメントが含まれていたらツール実行を deny します。挿入の瞬間に止めることで、「commit 時に検出 → どこに入れたか探して除去」というループを回避します。
| linter / formatter | 検出パターン (抜粋) |
|---|---|
| ESLint | // eslint-disable, // eslint-disable-next-line, /* eslint-disable */, // eslint-enable |
| Prettier | // prettier-ignore, /* prettier-ignore */, <!-- prettier-ignore --> |
| Ruff | # noqa, # noqa: E501, # ruff: noqa, # fmt: off / # fmt: on / # fmt: skip |
既に old_string や既存ファイルに含まれていた ignore コメントを保持するだけの編集は許可します (多重集合差分で「新規挿入分」だけを抽出)。例外的にどうしても必要なときは、ユーザー側で hook を一時的に無効化してください。
ファイル: hooks/scripts/block-commit-lint.sh
イベント: PreToolUse (matcher: Bash)
Bash 経由で実行されるコマンドが git commit を含む場合に発火します。git diff --cached --name-only で staged ファイルを列挙し、対応する linter に内容を stdin で流して検査します。エラーが出たら commit を deny し、permissionDecisionReason に各ファイルの linter 出力を含めます。
検出する commit 形式:
git commit ... / git commit -m "..." / git commit --amend 等の通常形式&& git commit、; git commit、| git commit などの連結形式FOO=bar git commit ... のような env-var prefixgit -c user.email=... commit ... のような global option を挟む形式git add / -a / pathspec 同時実行時の挙動:
本フックは Bash ツールの 実行前 に発火するため、同一コマンドの git add や git commit -a の自動 stage、git commit <pathspec> の working tree 直接 commit は、フック発火時点では index にまだ反映されていません。staged だけを見ると lint をすり抜けるため、コマンド文字列に以下のいずれかを検出した場合は、staged だけでなく working tree の変更 (modified + untracked) も lint 対象に含め、ソースを working tree から読み込みます。
検出パターン:
git add ... / git stage ... を同一コマンド内に含むgit commit -a / -am / --all (tracked-modified を auto-stage)git commit <pathspec> / git commit -- <pathspec> (pathspec form: 引数で指定したパスを working tree から commit)これにより以下のパターンが正しく lint されます:
git add path && git commit -m ...git add -A && git commit -m ...git add . && git commit -m ...git commit -am ...git commit src/foo.py -m ...git commit -- src/foo.pypathspec の検出には Python の shlex でクォート対応トークン化を行うため、git commit -m "long message with spaces" のような引用符付きメッセージは pathspec として誤検出しません。
lint ソースの選択:
各ファイルは「どの set に属するか」で lint ソースを決定します:
git show :path (staged blob)これにより、元から staged にあった lint dirty なファイルが working tree で fix されたが再 stage されないまま git add <other> && git commit するケースで、staged blob のエラーを取りこぼしません。
過検出 (commit に含めない予定の編集まで lint) は許容しています。Claude が commit する状況では作業中ファイルだけが working tree にある運用が一般的で、不要な lint がほとんど発生しないためです。
検出のスコープ外 (lint をスキップして通す):
git rev-parse --show-toplevel 失敗)--allow-empty など)Edge case:
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub natsuume/natsuume-cc-marketplace --plugin auto-lint-checkPlugins from other owners that cover similar ground