Stop your AI from hiding type errors.

HatchLock makes Claude Code fix the real problem. Shortcuts like @ts-ignore and as any are blocked before they reach your code, and every edit is checked with your own compilers.

/ Works with the compilers you already have

  • tsc
  • pyright
  • cargo
  • go vet
  • shellcheck
  • javac
  • dotnet
  • terraform

Type errors get fixed, not hidden.

When an AI hits a type error, the quick way out is to tell the type checker to look away. HatchLock closes that way out and checks the result.

Shortcuts Blocked Before They Land

When the AI tries to add @ts-ignore, as any or # type: ignore, the edit is stopped and it is told to fix the type.

See what is blocked

Every Edit Checked

The file that just changed is checked with your own tools. The whole project is checked once when the AI finishes.

See the three checks

Old Code Left Alone

Only new shortcuts are stopped. Files that already have them keep working, and the AI can still edit around them.

How that works

Runs On Your Machine

It uses the compilers you already have. There is no account, and nothing is sent anywhere.

Read the details

Installs with
two commands.

Free and open source, with no account to create.

See the install steps
Runs3checksbefore, after and at the end
Guards5languagesagainst new type shortcuts
Sends0byteseverything stays local

How it works.

01Block

A shortcut is stopped before it is written

HatchLock reads each change before it touches your file. If the change adds a comment or cast that hides a type error, the write is refused and the AI gets a one-line instruction to fix the real problem.

See what is blocked
claude
Recorded session: asked to add @ts-ignore, Claude Code is blocked by HatchLock, then marks the line with hatchlock-allow and the reason because the user explicitly asked.

02Check

Each edit gets a quick check

Right after a file changes, HatchLock runs a fast check on that one file with tools such as pyright, shellcheck or gofmt. Mistakes are caught while the AI is still working on them.

What runs for each language
claude
✕ [HatchLock Compiler Loop] Check failed after editing scripts/deploy.sh. Fix this before moving on:
  line 14: syntax error: unexpected end of file

03Verify

The project must pass before the AI is done

When the AI says it has finished, your project's compiler runs once. If it finds errors, the AI goes back and fixes them. It gets one extra round, so it can never loop forever.

How the end-of-turn check works
claude
Recorded session: Claude Code renames a field in billing.ts and stops; HatchLock runs tsc, reports the broken cart.ts, and Claude fixes it before finishing.

04Allow

An honest way through when you need one

Sometimes a suppression is the right call, such as a test that expects a type error. Add hatchlock-allow: and a short reason on the same line and it goes through. Without a reason it is still blocked.

Read about hatchlock-allow
bash
$ cat tests/types.test.ts
// the call below must not compile
// @ts-expect-error hatchlock-allow: asserting this call is a type error
sum('not a number');

05Skills

Five helpers for smaller, cleaner changes

tight-diff runs by itself and keeps changes small. Four commands are there when you want them: optimize, architect, clean and doctor.

See all five skills
claude
> /hatchlock:doctor
  HatchLock LSP & Compiler Toolchain Health Audit
  [OK]      tsc
  [OK]      pyright
  [--]      cargo

Install in two commands.

Paste them into your terminal. HatchLock starts working in your next Claude Code session. No account, nothing to configure.

Using Copilot, Cursor, Grok or ChatGPT? See every supported tool.

$claude plugin marketplace add tahmidbintaslim/HatchLock
$claude plugin install hatchlock@hatchlock-marketplace

bash
Recorded session: the two install commands, run in a fresh shell, add the marketplace from GitHub and install HatchLock.

The shortcuts it stops.

These comments and casts tell the type checker to look away. HatchLock keeps new ones out of five languages.

TypeScript and JavaScript

  • @ts-ignore
  • @ts-expect-error
  • @ts-nocheck
  • as any
  • : any
  • eslint-disable

Python and notebooks

  • # type: ignore
  • # pyright: ignore

Rust

  • #[allow(dead_code)]
  • #[allow(unused)]

PHP

  • @phpstan-ignore
  • @psalm-suppress

Go

  • //nolint

Existing code is left alone. Declaration files are skipped. hatchlock-allow with a reason lets one through.

Private by design.

HatchLock is a set of small scripts that run the tools already on your machine. It has no server to send anything to.

Read the privacy note
No network calls
No account or sign-up
Open source, MIT licensed

Frequently asked questions

How do I get started?

Paste the two install commands into your terminal. HatchLock starts working in your next Claude Code session. There is no account and nothing to configure.

Will it block the old code I already have?

No. HatchLock only stops new suppressions. If a file already has one, your AI can keep editing around it.

What if I really do need a suppression?

Add hatchlock-allow: followed by a short reason on the same line, and it goes through. The reason is required, so the next person knows why it is there.

Does my code leave my machine?

No. HatchLock runs the compilers you already have installed. It makes no network calls and collects nothing.

Will it slow my AI down?

The check before a write is a quick text scan. After each edit only that one file is checked. Full project checks run once, when the AI finishes its turn.

What if I do not have a compiler installed?

That check is skipped. A missing tool is never treated as a failure.

Does it work in ChatGPT?

Partly. ChatGPT and Codex get the skills as guidance. The blocking and the compiler checks need Claude Code, because only it lets a plugin step in before a file is written.

Fix the type. Skip the shortcut.