
Tool call permission gate
Classifies proposed shell, file and MCP calls and refuses the clearly destructive ones
Tool call permission gate is an open-source agent skill for security. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.
- Scripts
- None
- Platforms
- Claude Code, Codex, Cursor
- GitHub stars
- 440
- Last commit
- License
- MIT
- Listing updated
Similar skills
About Tool call permission gate
This skill adds a PreToolUse hook that sends a redacted, length-capped description of each proposed tool call to an external classifier. The classifier returns a consequence label and a confidence. Calls labelled destructive or irreversible with high confidence are refused, and every other call is passed to the person as a normal confirmation with the label and score attached as a reason.
The bundled hook script redacts bearer and basic auth headers, key, token, secret and password fields, long opaque strings, hex digests, email addresses and query strings before anything leaves the machine. If a call still contains more than two redaction placeholders it is not sent and falls back to a question for the person. A network failure or rate limit also falls back to asking.
An auto-allow flag exists but is off by default. The skill advises running the gate in log-only mode for a while before enabling it, and notes that it is not a security boundary, so hard deny rules should still cover acts you never want. Setup means registering the script under hooks.PreToolUse in the Claude Code settings file, with Node.js available for the script.
When your agent uses it
A second opinion on every shell, file and MCP call a coding agent proposes: classify what it would do, refuse the confidently destructive ones, and attach the reason to the confirmation the person already sees, with the command redacted first. Use when setting up a PreToolUse hook.
From the skill's SKILL.md. Your agent reads this description to decide when to load the skill.
What it can access
From a static check of its 1 file (6 KB) on GitHub on 4 December 2026. Nothing was run. Read the files before you install a skill: it can tell your agent to run anything its tools allow.
Check another skill before you install it.
Install
Copy the skill folder to ~/.claude/skills/tool-call-permission-gate to use it in all your projects:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mrmps/classifier-dev.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/tool-call-permission-gate &&
cp -R "$tmp/skills/tool-call-permission-gate" ~/.claude/skills/tool-call-permission-gate &&
rm -rf "$tmp"For one project only, put the folder in .claude/skills/tool-call-permission-gate inside it instead.
Copy the skill folder to ~/.agents/skills/tool-call-permission-gate to use it in every repository:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mrmps/classifier-dev.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/tool-call-permission-gate &&
cp -R "$tmp/skills/tool-call-permission-gate" ~/.agents/skills/tool-call-permission-gate &&
rm -rf "$tmp"For one repository only, put the folder in .agents/skills/tool-call-permission-gate inside it instead.
Copy the skill folder to ~/.cursor/skills/tool-call-permission-gate to use it in every project:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mrmps/classifier-dev.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/tool-call-permission-gate &&
cp -R "$tmp/skills/tool-call-permission-gate" ~/.cursor/skills/tool-call-permission-gate &&
rm -rf "$tmp"For one project only, put the folder in .cursor/skills/tool-call-permission-gate inside it instead.
Run in a terminal (add --scope workspace to install it for the current workspace only):
gemini skills install https://github.com/mrmps/classifier-dev.git --path skills/tool-call-permission-gateOr copy the folder to ~/.gemini/skills/tool-call-permission-gate yourself.
For GitHub Copilot in VS Code, copy the skill folder to ~/.copilot/skills/tool-call-permission-gate:
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/mrmps/classifier-dev.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/tool-call-permission-gate &&
cp -R "$tmp/skills/tool-call-permission-gate" ~/.copilot/skills/tool-call-permission-gate &&
rm -rf "$tmp"For one project only, put the folder in .github/skills/tool-call-permission-gate inside it instead.
Get the folder:
git clone --depth 1 https://github.com/mrmps/classifier-dev.gitThen copy classifier-dev/skills/tool-call-permission-gate into your agent's skills folder as tool-call-permission-gate. Agents that support SKILL.md read one folder per skill.
What it does
- Consequence-based classification
- Labels each proposed call by what running it would do rather than matching command strings.
- Pre-send redaction
- Strips credentials, secrets, emails, long tokens and query strings before a call leaves the machine.
- Confident refusal
- Blocks calls classified as destructive or irreversible above a high confidence threshold.
- Annotated confirmations
- Attaches the classifier label and confidence to the question the person already sees.
- Opt-in auto-allow
- Offers a flag to approve read-only or in-repository calls, disabled by default.
- Fail-safe fallbacks
- Asks the person when the classifier is unreachable, rate limited or the call is too redacted to send.
Good for
- Stop an agent from running destructive shell commands without a second look
- Add a confidence-scored warning to file edit and shell confirmations
- Gate MCP tool calls behind a consequence check before they run
- Log what a coding agent proposes for a week before trusting an auto-approve setting
Tool call permission gate FAQ
What does the skill send to the external service?
One redacted string per call containing the tool name and its arguments, cut to 2,000 characters. The skill says no file contents, environment or repository name are sent, and points to the service's privacy page for how input is handled.
When does Tool call permission gate refuse a call?
Only when the classifier labels the call as destructive or irreversible with confidence of 0.9 or higher. Everything else is shown to the person as a question with the label and score.
Is auto-allow on by default?
No. The --auto-allow flag must be set explicitly, and the skill recommends a logging period before enabling it.
How is Tool call permission gate installed?
The skill describes registering the hook script in .claude/settings.json under hooks.PreToolUse with the Bash, Edit and Write matcher. Other clients are described as passing text through stdin.
How do I install Tool call permission gate in Claude Code?
Copy the skill folder from GitHub to ~/.claude/skills/tool-call-permission-gate to use it in all your projects, or to .claude/skills/tool-call-permission-gate in one project.
Does Tool call permission gate run scripts?
No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.
Which AI agents can use Tool call permission gate?
Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.
What are the best alternatives to Tool call permission gate?
The closest alternatives to Tool call permission gate are Guardrail tester, Red team, Security, Prompt injection guard and Speclock guardrails.
Where this comes from
- Description: from the skill's own SKILL.md.
More from mrmps/classifier-dev

Sorts many texts into your own labels in one call, with a confidence per answer
- Open source
- 440 GitHub stars
- Developer tools

Trims a long agent session by keeping, dropping or pointing to each context chunk
- Open source
- 440 GitHub stars
- Developer tools

Lets a browser or desktop agent pick its next action from on-screen elements
- Open source
- 440 GitHub stars
- Browser automation

Gates user posts against a written content policy using per-category scores
- Open source
- 440 GitHub stars
- Security

Sorts each page of a multi-document intake packet by type before extraction
- Open source
- 440 GitHub stars
- Files and documents

Sorts a downloads folder into invoice, receipt and contract folders with an undo log
- Open source
- 440 GitHub stars
- Files and documents






