test-gatelisted
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__<