2026-02-27T10-08-38_auto_memory/memories.db-wal, memory/2026-02-27-claude-c
This commit is contained in:
parent
6d1f0de259
commit
05f732605b
13
memory/2026-02-27-claude-code-attribution-hook.md
Normal file
13
memory/2026-02-27-claude-code-attribution-hook.md
Normal file
@ -0,0 +1,13 @@
|
||||
# 2026-02-27 Session Notes
|
||||
|
||||
## Claude Code Attribution Hook
|
||||
|
||||
Initiated implementation of a PreToolUse hook to block git commits containing Claude Code's automatic "Co-Authored-By: Claude <noreply@anthropic.com>" attribution. The plan involves two tasks:
|
||||
|
||||
1. **Hook Script Creation** - A bash script at `~/.claude/hooks/block-coauthor.sh` that reads JSON from stdin, extracts the command via `jq`, checks for `git commit` operations, and scans for the Co-Authored-By pattern (case-insensitive). Denies execution if found, allows otherwise.
|
||||
|
||||
2. **Settings Registration** - Adding a PreToolUse entry to `~/.claude/settings.json` hooks object with matcher "Bash", 5-second timeout, and status message.
|
||||
|
||||
Examined existing settings.json structure which already has hooks configured for SessionStart, UserPromptSubmit, and SessionEnd via signet commands. The PreToolUse hook will follow the same pattern structure.
|
||||
|
||||
Session ended after reading settings.json; implementation of the hook script and settings update pending.
|
||||
Binary file not shown.
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user