Latest release on npm
Checks AI coding actions before they run · Claude Code first

Thumbs-down a bad command once. Claude Code will not run it again.

Give a command a thumbs-down and ThumbGate denies it the next time your agent tries it, with your reason. Force-push, rm -rf ~, DROP TABLE and secret leaks are denied. Other built-in checks warn by default and deny in strict mode. See coverage.

Watch it block rm -rf

Free remembers 3 lessons. Pro remembers all of them. Pro is $19/month, less than one hour of a developer's time. No sign-up for free: see the 2-minute demo.

# 1 · Claude ran a prod migration. You type in the chat:
you: thumbs down, wrong database, that was prod

# 2 · Claude retries. The call is Denied, with your reason:
$ ... "node scripts/migrate.js --env prod --force" | thumbgate gate-check
"permissionDecision":"deny","permissionDecisionReason":"[GATE:auto-node-scripts-migrate-js-env-prod-…] Auto-promoted repeated executable action ..."

# 3 · Catastrophic commands are Denied the first time
$ ... "terraform destroy" | thumbgate gate-check
"permissionDecision":"deny","permissionDecisionReason":"[GATE:terraform-destroy] ..."
Output of thumbgate gate-check through the Claude Code PreToolUse hook, default install, no strict mode, lines shortened. A reworded command is not caught. This is test-backed verification evidence: the test that replays it runs on every change.
Try it first

Paste commands from your last agent session.

See which ones the default rules leave allowed, warned, or denied. This runs in your browser and nothing you paste is sent.

How it works

Four steps, all on your machine.

  1. Capture feedback. Type thumbs down (or thumbs up) in the chat, with a reason.
  2. Remember locally. The lesson is saved in .thumbgate/ in your repo.
  3. Rank and refine. A command you keep correcting becomes a learned rule.
  4. Gate the next action. Before the next matching tool call, the PreToolUse hook warns or denies it.
Install

One command, one restart, one check.

  1. Install. In your project folder:
    npx thumbgate init --agent claude --ref home 

    Adds ThumbGate's hooks and status line to ~/.claude/settings.json and a .thumbgate/ folder for your lessons. Other settings are left alone. Free local CLI: MIT, no account, no cloud required for the enforcement path.

  2. Restart Claude Code. The status line at the bottom shows ThumbGate · Free and your thumbs for this project.
  3. Check it works.
    echo '{"tool_name":"Bash","tool_input":{"command":"git push --force"}}' | npx thumbgate gate-check

    You should see "permissionDecision":"deny" and [GATE:force-push].

Remove it: run npx thumbgate uninstall yourself in a terminal (from the next release; ThumbGate stops agents from running it). Until then, delete the ThumbGate entries under hooks and statusLine in ~/.claude/settings.json. Your lessons stay in .thumbgate/ until you delete the folder.

You own the rules. Learned rules and logs are files in .thumbgate/ that you can read, version or delete. Why control matters.

The CLI sends anonymous usage events, never the words of your rules. THUMBGATE_NO_TELEMETRY=1 turns them off. What is sent.

Also works with Cursor, Codex, Gemini CLI and others: install for other agents. Optional Claude Code plugin for slash commands: /plugin marketplace add IgorGanapolsky/ThumbGate then /plugin install thumbgate@thumbgate-marketplace.

Local dashboard, free: npx thumbgate dashboard --open, or /thumbgate-dashboard inside Claude Code.

Coverage

What it catches, and what it misses.

What ThumbGate does in Claude Code. Checked through the real PreToolUse hook on 2026-12-01; published npm version 1.64.0.
SituationDefault installStrict mode
git push --force, git reset --hard, git clean -fdx, rm -rf on home or root, find / -delete, DROP TABLEDeniedDenied
terraform destroy, kubectl delete, aws s3 rm and other cloud or cluster wipesDeniedDenied
Sending a secret out, for example curl -d @.envDeniedDenied
Switching ThumbGate off, for example pkill -f thumbgate or uninstalling it from inside the agentDeniedDenied
A command you gave a thumbs-down, right after and each time it runs again (a rule that would have blocked your past safe calls stays a Warning)DeniedDenied
Other flagged actions, for example npm publish or git commit --no-verifyWarningDenied
Claude Code says "deployed" or "live" with no production output in the reply (Stop hook)Reply sent back once to add proof. It checks that proof is present, not that it is true.Same as default
The same action, reworded (for example python3 -c "shutil.rmtree(...)" after a thumbs-down on rm -rf)Not caught. A learned rule matches the command, not its purpose.Not caught

The main rows. The full table adds protected-branch pushes, backtested checks and what a hook cannot contain.

Claude Code: Denied and Warning, tested end to end. Cursor: Shell commands: Denied and Warning, tested end to end. Other tools: Advisory. Codex, Gemini CLI: Wired, not yet tested end to end with each agent's own payload. Pydantic AI Pax: Denied and Warning. Cline, OpenCode, Amp and other MCP-only clients: Advisory. Advisory means it does not guarantee a stop.

Warning: the command can still run. Denied: the hook stops it. Other flagged actions only warn unless you turn on strict mode (THUMBGATE_STRICT_ENFORCEMENT=1). All four terms.

Claude Code · Stop hook

Also: "it's live" needs proof.

When Claude Code says deployed or live with no production output in the reply, the Stop hook sends the reply back once. It blocks once so a reply can never loop. How it works.

Before you buy

Four questions, answered plainly.

The MIT local CLI: every default Denied check, learned rules from your thumbs-downs, and the local dashboard. Free keeps 3 active learned rules and records 2 thumbs a day after a 7-day full Pro trial.
Unlimited active learned rules (free keeps 3). Unlimited thumbs-up and thumbs-down captures. Recall and lesson search across everything you have taught it. DPO and training-data exports. Pro is $19/month for one developer. Denying catastrophic commands stays free.
It does not catch a reworded version of a command you thumbed down, it does not contain damage like a sandbox, and it does not retrain the model. Not shipped in any plan: team-shared rules, rules shared between teammates' machines, audit history for managers.
Claude Code: Denied and Warning, tested end to end. Cursor: Shell commands: Denied and Warning, tested end to end. Other tools: Advisory. Codex, Gemini CLI: Wired, not yet tested end to end with each agent's own payload. Pydantic AI Pax: Denied and Warning. Cline, OpenCode, Amp and other MCP-only clients: Advisory, so a stop is not guaranteed.

Stop your agent before it repeats last week's mistake.

Install free Get Pro