Repository navigation
v0.6.1 - Fix Claude Code Hook Protocol
Bug Fixes
hooks: Fix matcher format for `wtk init --claude-code`
- Was: `"matcher": { "tool_name": "Bash" }` (invalid object — Claude Code ignores it)
- Now: `"matcher": "Bash"` (correct string format per Claude Code spec)
rewrite: Fix hook stdin protocol
- Was: Required positional `` argument — all hook invocations failed with "required argument not provided"
- Now: Reads JSON from stdin when invoked without args, extracts `tool_input.command` per Claude Code PreToolUse hook protocol
- Backwards compatible: Still accepts optional positional arg for manual testing
Upgrade
Replace your binary or run:
```powershell
cargo install --path .
wtk init --claude-code # Reinstall hook with correct config
```
Or reinstall the hook manually in `~/.claude/settings.json`:
```json
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash",
"hooks": [{ "type": "command", "command": "C:/path/to/wtk.exe rewrite" }]
}
]
}
}
```