feat: add Claude tool hooks configuration

Add .claude/settings.json to configure pre and post tool use
hooks for Edit, MultiEdit, and Write operations. These hooks
integrate with the but CLI to execute validation and cleanup
commands before and after file modifications, and on stop
events.
This commit is contained in:
Tristan Michael 2026-04-06 11:02:32 -07:00
parent 9a9dc80e26
commit a705a5ca26

View file

@ -0,0 +1,37 @@
{
"hooks": {
"PreToolUse": [
{
"matcher": "Edit|MultiEdit|Write",
"hooks": [
{
"type": "command",
"command": "but claude pre-tool"
}
]
}
],
"PostToolUse": [
{
"matcher": "Edit|MultiEdit|Write",
"hooks": [
{
"type": "command",
"command": "but claude post-tool"
}
]
}
],
"Stop": [
{
"matcher": "",
"hooks": [
{
"type": "command",
"command": "but claude stop"
}
]
}
]
}
}