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.
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] ..."
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.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.
Four steps, all on your machine.
- Capture feedback. Type thumbs down (or thumbs up) in the chat, with a reason.
- Remember locally. The lesson is saved in
.thumbgate/in your repo. - Rank and refine. A command you keep correcting becomes a learned rule.
- Gate the next action. Before the next matching tool call, the PreToolUse hook warns or denies it.
One command, one restart, one check.
- Install. In your project folder:
npx thumbgate init --agent claude --ref homeAdds ThumbGate's hooks and status line to
~/.claude/settings.jsonand a.thumbgate/folder for your lessons. Other settings are left alone. Free local CLI: MIT, no account, no cloud required for the enforcement path. - Restart Claude Code. The status line at the bottom shows
ThumbGate · Freeand your thumbs for this project. - Check it works.
echo '{"tool_name":"Bash","tool_input":{"command":"git push --force"}}' | npx thumbgate gate-checkYou 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.
What it catches, and what it misses.
| Situation | Default install | Strict mode |
|---|---|---|
git push --force, git reset --hard, git clean -fdx, rm -rf on home or root, find / -delete, DROP TABLE | Denied | Denied |
terraform destroy, kubectl delete, aws s3 rm and other cloud or cluster wipes | Denied | Denied |
Sending a secret out, for example curl -d @.env | Denied | Denied |
Switching ThumbGate off, for example pkill -f thumbgate or uninstalling it from inside the agent | Denied | Denied |
| 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) | Denied | Denied |
Other flagged actions, for example npm publish or git commit --no-verify | Warning | Denied |
| 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.
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.