From a705a5ca26a00a60a0c434ef8d7e0ae45fdafa9f Mon Sep 17 00:00:00 2001 From: Tristan Michael Date: Mon, 6 Apr 2026 11:02:32 -0700 Subject: [PATCH] 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. --- .claude/settings.json | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.claude/settings.json b/.claude/settings.json index e69de29..b4b7cb5 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -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" + } + ] + } + ] + } +}