ClaudeMods
☰
KO
● 0 명 접속 중 · 조회 0 회
후원프로젝트 제출
GitHub 저장소 · 작성자 ccdwyer

red-squiggle

Claude가 방금 편집한 파일의 타입을 검사하고 lint를 실행한 뒤 모든 오류를 같은 도구 결과에 넣어, 모델이 문제를 일으킨 단계에서 깨진 타입을 보게 하는 Claude Code 모드입니다.

번역 완료

이 mod 소개

Red Squiggle hook은 성공한 Edit 또는 Write가 끝날 때마다 실행되어 방금 편집한 파일의 타입 검사와 lint를 수행하고 오류를 같은 도구 결과에 넣습니다. 따라서 모델은 몇 턴 뒤 테스트가 실패한 후가 아니라 문제를 일으킨 순간 오류를 확인합니다.

지원하는 검사기:

  • 프로젝트의 TypeScript(--noEmit --incremental을 해당 파일을 포함하는 설정에 대해 실행하고 extends와 references를 추적하며 --listFiles로 파일이 프로그램에 포함되는지 판정).
  • 프로젝트의 eslint(설정 파일이 있을 때만 실행하고 --format json --quiet으로 오류만 보고).
  • Python 파일은 ruff check --no-fix를 사용합니다.

"새" 오류만 보고합니다. 각 검사기는 기준선을 유지하며 오류를 하나씩 세고, 프로젝트나 파일을 처음 보면 먼저 기준선을 가져옵니다. 이번 편집으로 새로 생긴 오류와 이번 편집으로 새로 망가진 다른 파일의 오류만 표시합니다. 출력은 인용된 컨텍스트로 도구 결과 뒤에 붙고 최대 20행이며 명령이 아닌 데이터로 표시됩니다. 상태 표시줄에는 파일이 깨끗한지 또는 오류가 몇 개인지 나타납니다. 검사기가 없거나 충돌하거나 시간 초과되면(기본 30초) fail-open으로 원래 결과를 유지합니다. 같은 프로젝트에서는 한 번에 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
원문 / README

Red Squiggle

Red Squiggle demo

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. |

  • Only new errors. Red Squiggle keeps a baseline of what each checker reported, counted per error, so a second identical error still shows. The first time it sees a project or file in a session, it takes the baseline just before the edit. If that fails, the first run after the edit becomes the baseline and nothing is reported as new. The model sees errors this edit introduced in the file, plus errors it newly broke in other files (tsc). Errors that were already there are counted, not repeated. Every error in a newly created file counts as new.
  • The output reaches the model as quoted context after the tool result, capped at 20 lines and marked as data, not instructions.
  • The status line shows ✓ 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).
  • Fail-open. If a checker is missing, crashes or times out (default 30 s), or if anything else after the write throws, the edit's result comes back untouched.
  • Only one tsc runs per project at a time. Edits that arrive during a run share a single follow-up run.
  • Project lookups stop at the repository root (.git). It never installs anything or falls back to npx.

Settings

/config lists tsc, eslint and ruff toggles and timeoutSeconds.

Install

/plugin marketplace add ccdwyer/claude-mods
/plugin install red-squiggle@ccdwyer-mods
/reload-plugins

Develop

claude plugin validate .
claude plugin test .

What it hooks

Events this mod hooks, as claude plugin validate reads the module:

  • tool.call

Engine 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.

Privacy

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.

License

MIT

비슷한 프로젝트