ccdwyer/red-squiggle

Claude が直前に編集したファイルを型チェックと lint にかけ、エラーを同じツール結果へ入れる Claude Code モッドです。問題を起こしたステップでモデルが壊れた型を確認できます。
ccdwyer/red-squiggle

Red Squiggle hook は、成功した Edit または Write のたびに実行され、直前に編集されたファイルの型チェックと lint を行います。エラーは同じツール結果に入るため、モデルは数ターン後にテストが失敗してからではなく、問題を起こした時点でエラーを確認できます。
対応するチェッカー:
「新しい」エラーだけを報告します。各チェッカーはベースラインを保持してエラーを 1 件ずつ数え、プロジェクトまたはファイルを初めて見たときはベースラインを取得します。表示するのは今回の編集で新しく入ったエラーと、今回の編集で新たに壊れた別ファイルのエラーだけです。出力は引用コンテキストとしてツール結果の後ろに追加され、最大 20 行で、命令ではなくデータとして示されます。ステータスラインにはファイルがクリーンかエラー数が表示されます。チェッカーがない、クラッシュする、タイムアウトする場合(デフォルト 30 秒)は fail-open となり、元の結果を維持します。同じプロジェクトでは一度に 1 つの tsc だけを動かし、プロジェクト探索は repo ルートで止め、何もインストールせず npx に切り替えません。
/config で tsc、eslint、ruff、timeoutSeconds を切り替えられます。インストールは ccdwyer/claude-mods marketplace を追加して red-squiggle を入れます。すべてのチェックはローカルで行われ、ネットワークデータもテレメトリーも送信しません。ライセンスは MIT です。
まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。
claude plugin marketplace add ccdwyer/red-squiggle claude plugin install red-squiggle

A Claude Code mod that type-checks and lints the file Claude just edited and puts any errors into that same tool result. The model sees broken types on the step that caused them, not three turns later when a test run fails.
Red Squiggle runs after each successful Edit or Write. It skips edits that errored and edits staged for review.
| File | Checker | Notes |
|---|---|---|
| .ts .tsx .js .jsx .mts .cts .mjs .cjs | the project's own TypeScript (node_modules/typescript/bin/tsc) | Runs --noEmit --incremental on the config whose program contains the file. It reads include, exclude, files, allowJs and checkJs through extends (relative, package and array forms) with real glob matching, and recursively follows references. A file that no glob takes, but that may be in a program through an import, is checked against the nearest config, and --listFiles decides. A build-info file goes under node_modules/.cache/red-squiggle/. |
| same | the project's own node_modules/.bin/eslint | Only when an eslint config exists. Runs from that config's folder with --format json --quiet, so it reports errors only. |
| .py | ruff check --no-fix | Uses .venv/bin/ruff, then venv/bin/ruff, then ruff on PATH. JSON output. |
✓ file clean, ✗ N errors in file, or how many errors are new in other files. "Clean" means the file was proven to be in the program tsc checked (--listFiles). A file outside every program, or a run cut off before it proves the file was checked, reports nothing rather than "clean". Paths are compared through their real spelling (/tmp vs /private/tmp)..git). It never installs anything or falls back to npx./config lists tsc, eslint and ruff toggles and timeoutSeconds.
/plugin marketplace add ccdwyer/claude-mods
/plugin install red-squiggle@ccdwyer-mods
/reload-plugins
claude plugin validate .
claude plugin test .
Events this mod hooks, as claude plugin validate reads the module:
tool.callEngine calls it makes: $.fs.exists, $.fs.read (via eslintPlan, readJson), $.fs.stat (via canonical), $.process.run (via run), $.state.get, $.state.set, $.ui.status (via annotate).
A tool.call hook sits in the middle of every tool call: it can see the call, refuse it, or add context to its result. This mod uses that only for the behaviour described above.
It runs entirely on your machine. It sends nothing over the network. It runs your project's own tsc, eslint and ruff.
The mod collects no analytics or telemetry, and its author receives no data from it.
Full policy: PRIVACY.md.
MIT