Loading...
Loading...
Install groove's Claude Code native shell hooks into .claude/settings.json. Enables deterministic session-end reminders, git activity capture, and managed-path protection.
npx skill4agent add andreadellacorte/groove groove-admin-claude-hooks.groove/hooks/start.mdend.md--disable <hook>--list.claude/settings.json.groove/hooks/claude/| Name | Event | Matcher | What it does |
|---|---|---|---|
| | — | If hour is 16–21 local time and |
| | | If the Bash command contains |
| | | If |
--list.claude/settings.json.groove/hooks/claude/--disable <hook>.claude/settings.jsonWhich hooks to install? (all / comma-separated: daily-end-reminder, git-activity-buffer, block-managed-paths)
Press enter for all..claude/settings.json{}.groove/hooks/claude/chmod +x.claude/settings.json.claude/settings.json✓ daily-end-reminder — Stop hook → .groove/hooks/claude/daily-end-reminder.sh
✓ git-activity-buffer — PostToolUse/Bash hook → .groove/hooks/claude/git-activity-buffer.sh
✓ block-managed-paths — PreToolUse/Write+Edit hook → .groove/hooks/claude/block-managed-paths.sh
✓ .claude/settings.json updated.groove/hooks/claude/daily-end-reminder.sh#!/usr/bin/env bash
# groove: Stop hook — remind about /groove-daily-end during work hours
hour=$(date +%H)
if [ -f ".groove/index.md" ] && [ "$hour" -ge 16 ] && [ "$hour" -le 21 ]; then
echo "groove: end of work hours — consider running /groove-daily-end"
figit-activity-buffer.sh#!/usr/bin/env bash
# groove: PostToolUse/Bash hook — buffer git commits for memory log
input=$(cat)
command=$(echo "$input" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('tool_input',{}).get('command',''))" 2>/dev/null)
if echo "$command" | grep -q "git commit"; then
msg=$(echo "$command" | grep -oP '(?<=-m ")[^"]+' | head -1)
mkdir -p .groove/.cache
echo "$(date '+%Y-%m-%d %H:%M') | ${msg:-<no message>}" >> .groove/.cache/git-activity-buffer.txt
fiblock-managed-paths.sh#!/usr/bin/env bash
# groove: PreToolUse/Write+Edit hook — block edits to managed groove paths
input=$(cat)
path=$(echo "$input" | python3 -c "import sys,json; d=json.load(sys.stdin); print(d.get('tool_input',{}).get('file_path',''))" 2>/dev/null)
if echo "$path" | grep -qE '^(\.agents/skills/groove|skills/groove)'; then
echo "groove: blocked — '$path' is managed by groove update. Edit under skills/ and rsync to .agents/skills/." >&2
exit 1
fi.claude/settings.jsonhooks{
"hooks": {
"Stop": [
{
"hooks": [
{ "type": "command", "command": "bash .groove/hooks/claude/daily-end-reminder.sh" }
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "bash .groove/hooks/claude/git-activity-buffer.sh" }
]
}
],
"PreToolUse": [
{
"matcher": "Write",
"hooks": [
{ "type": "command", "command": "bash .groove/hooks/claude/block-managed-paths.sh" }
]
},
{
"matcher": "Edit",
"hooks": [
{ "type": "command", "command": "bash .groove/hooks/claude/block-managed-paths.sh" }
]
}
]
}
}hooks.claude/settings.jsonpython3block-managed-paths--disable block-managed-paths.groove/hooks/claude/git.hooks.groove/index.md