mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-03-20 23:06:51 +00:00
Replace inline command strings in settings.json with external scripts in .claude/hooks/ for readability and maintainability. Consolidate three PostToolUse formatters into one script and add markdown/yaml formatting. Add new hooks: SessionStart context banner, Stop lint gate, async Bats test runner, idle desktop notification, and PostToolUseFailure logger.
15 lines
293 B
Bash
Executable File
15 lines
293 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# PostToolUseFailure logger: append tool failures to a local log file.
|
|
|
|
log_file="$CLAUDE_PROJECT_DIR/.claude/hook-failures.log"
|
|
|
|
entry=$(jq -c '{
|
|
time: (now | strftime("%Y-%m-%dT%H:%M:%SZ")),
|
|
tool: .tool_name,
|
|
error: .error
|
|
}')
|
|
|
|
echo "$entry" >> "$log_file"
|
|
|
|
exit 0
|