toolgate
Reviewed
at commit 189b561
Caution: Allows tool calls its decision model rates low-risk without asking you, and sends each call and your last prompts to TypeSafe or OpenRouter.
Sends data to TypeSafe (api.typesafe.ai) or OpenRouter (openrouter.ai), whichever key you set; others only if you configure them in the CLI
Tool-call firewall for Claude Code built on TypeSafe's Jev: seven risk questions, an action ledger that judges files at write time, floors on the axes that…
0 upvotes
Log in to upvote or save- Made by
- Jaz
- Pinned commit
-
189b561dc464fb9e748b1d9daf6e82c6dc7ca80e - What we checked
-
Checks every tool call with an outside decision model before it runs and then allows it, asks you, or blocks it with a reason Claude sees. For this it sends the tool call, the folder and your last three prompts (secrets partly redacted) to TypeSafe or OpenRouter. Needs the separate toolgate command-line tool; if that is missing it steps aside and says so.
Review details
Static review of the source at the pinned commit; not run. Registers session.start, tool.check, tool.call and the /toolgate command. At session start it looks for the toolgate CLI by running '<binary> version', then login-shell 'command -v' lookups via /bin/zsh or /bin/bash and Homebrew and /usr/local paths, runs the first one that answers, and reads settings.json only to warn if a toolgate PreToolUse hook is also installed. On every tool.check it runs '<binary> decide' with a JSON payload (session id, cwd, tool name and input, and up to three recent user prompts and the session goal from $.session.messages) and the API keys from the plugin config in the process environment, then returns the CLI's verdict: allow (skips the permission prompt for that call), ask, or deny with a reason; in shadow mode it only records. If the CLI fails or times out it returns ask. On tool.call it runs '<binary> post' to settle the CLI's action ledger (no tool output is sent). The mod does not read tool output. The toolgate CLI (npm package @riskaverse/toolgate, installed by the user), its network calls (api.typesafe.ai, openrouter.ai, optionally Vercel AI Gateway or OpenCode Zen, or a local endpoint), its redaction, policy file (~/.toolgate/toolgate.yaml), audit log and ledger under ~/.toolgate were not reviewed here; they are described in the README, which discloses what leaves the machine. The README says Claude Code's own deny rules and always-confirm list still apply on top of an allow. The OpenCode plugin file in the repo is not loaded by this mod.
- What it uses
-
- Reads your prompts: yes
- Sees tool calls: yes
- Blocks or changes tool calls: yes
- Reads or writes files: no
- Runs programs on your machine: yes
- Calls the model (uses tokens): no
- Sends data over the network: yes
- Stores data: yes
- Shows something on screen: yes
- Hooked events
Tool-call firewall for Claude Code built on TypeSafe's Jev: seven risk questions, an action ledger that judges files at write time, floors on the axes that must not soften, and ask instead of allow when the model is unreachable. Every verdict logged with its probabilities.
Made this mod? Add a badge to your README
Paste this into your README. The badge says reviewed once the current version has been reviewed, and links readers to this page.
[](https://modsforclaude.com/mods/toolgate/)