From b9f73eb1c7cdc5cfec8571364921c003ce390abf Mon Sep 17 00:00:00 2001 From: kavren Date: Sun, 7 Dec 2025 22:16:48 -0500 Subject: [PATCH] Add Claude Code hooks for auto-commit on session end MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Automatically commits and pushes changes when Claude Code session ends - Only triggers if there are uncommitted changes - Includes timestamp in commit message 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .claude/settings.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .claude/settings.json diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 0000000..6b5fec7 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,10 @@ +{ + "hooks": { + "stop": [ + { + "matcher": "", + "command": "if git -C /home/kavren/proxmox-infra status --porcelain | grep -q .; then git -C /home/kavren/proxmox-infra add -A && git -C /home/kavren/proxmox-infra commit -m \"Auto-commit: $(date '+%Y-%m-%d %H:%M') session changes\" && git -C /home/kavren/proxmox-infra push; fi" + } + ] + } +}