← ClaudeAtlas

test-gatelisted

Test how tool-gates evaluates any tool invocation (Bash, Read, Write, Edit, Glob, Grep, Skill, MCP) and show the permission decision (allow / ask / deny / defer). Pipes a synthesized JSON payload to the tool-gates binary and formats the result. Useful for verifying a new gate, debugging why a command was blocked, or distinguishing 'tool-gates explicitly asks' from 'tool-gates lets CC handle it'. NOT for approving a pending permission (use tool-gates:review) or editing rules manually (use update-config). When checking whether a command would be allowed, debugging why something was blocked or denied, verifying a permission rule works, simulating a tool call without running it, or confirming the defer-vs-explicit-ask wire decision. Triggers on 'is this allowed', 'test gate', 'why was this blocked', 'why was this denied', 'check permission', 'simulate tool call', 'would this run', 'does tool-gates catch this'.
camjac251/tool-gates · ★ 4 · AI & Automation · score 57
Install: claude install-skill camjac251/tool-gates
# Test a Command Against tool-gates Pipe a synthesized JSON hook payload to the `tool-gates` binary and report the decision. Mirrors what CC would send so the result reflects production behavior. ## Steps 1. Parse `$ARGUMENTS`: - `--mode=acceptEdits|plan|auto` or `--accept-edits`: set permission_mode - `--pr` or `--permission-request`: test as a PermissionRequest hook (subagent path) - First word as a known non-Bash tool name (Read / Write / Edit / Glob / Grep / Skill): use it as `tool_name`; rest is the input - First word starting with `mcp__` or `mcp_`: use it as `tool_name`; parse the rest as a loose JSON object if possible, otherwise pass it as `{"input":"..."}` - Otherwise: treat the whole argument as a Bash command 2. Build the JSON and pipe through `tool-gates`. Pick the shape that matches the tool: **Bash (default):** ```bash echo '{"tool_name":"Bash","tool_input":{"command":"<COMMAND>"}}' | tool-gates ``` **Read / Write / Edit:** ```bash echo '{"tool_name":"<TOOL>","tool_input":{"file_path":"<PATH>"}}' | tool-gates ``` **Glob:** ```bash echo '{"tool_name":"Glob","tool_input":{"pattern":"<PATTERN>"}}' | tool-gates ``` **Grep:** ```bash echo '{"tool_name":"Grep","tool_input":{"pattern":"<PATTERN>","path":"<PATH>"}}' | tool-gates ``` **Skill:** ```bash echo '{"tool_name":"Skill","tool_input":{"skill":"<SKILL_NAME>"}}' | tool-gates ``` **MCP:** ```bash echo '{"tool_name":"mcp__<