2026-02-27T10-04-14_auto_memory/memories.db-wal, memory/2026-02-27-block-co
This commit is contained in:
parent
850923be36
commit
c756deb892
19
memory/2026-02-27-block-co-authored-by-attribution-hook.md
Normal file
19
memory/2026-02-27-block-co-authored-by-attribution-hook.md
Normal file
@ -0,0 +1,19 @@
|
||||
# 2026-02-27 Session Notes
|
||||
|
||||
## Block Co-Authored-By Attribution Hook
|
||||
|
||||
Nicholai requested implementation of a PreToolUse hook to block git commits containing Claude's automatic `Co-Authored-By:` attribution. The plan specifies creating a bash script at `~/.claude/hooks/block-coauthor.sh` that:
|
||||
|
||||
- Reads PreToolUse JSON payload from stdin
|
||||
- Extracts the git command via jq
|
||||
- Searches for the pattern `Co-Authored-By:.*Claude` (case-insensitive)
|
||||
- Returns `permissionDecision: "deny"` if found, otherwise allows execution
|
||||
|
||||
The hook must be registered in `~/.claude/settings.json` with a 5-second timeout and status message.
|
||||
|
||||
Session work:
|
||||
- Reviewed existing settings.json structure to understand hook architecture
|
||||
- Confirmed hook format uses event-based triggers (SessionStart, UserPromptSubmit, SessionEnd)
|
||||
- Ready to implement both the script and settings modification
|
||||
|
||||
Next steps: Create the hook script and update settings.json configuration.
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user