groove-admin-claude-hooks
Install groove's Claude Code native shell hooks into .claude/settings.json. Enables deterministic session-end reminders, git activity capture, automatic session-capture drafts, and managed-path protection.
By andreadellacorte · 530 installs
npx skills add andreadellacorte/groove --skill groove-admin-claude-hooks
Source repository · Upstream listing
<! groove:managed — do not edit; changes will be overwritten by groove update
groove admin claude hooks
Install groove's Claude Code native shell hooks. These run outside the model — deterministic, unconditional — and complement groove's advisory markdown hooks ( .groove/hooks/start.md , end.md ).
Use disable <hook to remove a specific hook. Use list to show current status.
Outcome
Selected hooks are registered in .claude/settings.json and shell scripts are written to .groove/hooks/claude/ . Hooks fire automatically on Claude Code lifecycle events without any model involvement.
Available hooks
Name Event Matcher What it does
daily end reminder Stop — If hour is 16–21 local time and .groove/index.md exists, prints a reminder to run /groove daily end
git activity buffer PostToolUse Bash If the Bash command contains git commit , appends a timestamped line to .groove/.cache/git activity buffer.txt
block managed paths PreToolUse Write , Edit If file path starts with .agents/skills/groove or skills/groove , exits non zero to block the write with an explanatory message
context reprime SessionStart startup\ compact Runs the prime script directly — ensures full workflow context is loaded after every session start and compaction
version check PostToolUse — Checks for a new groove version once per hour; calls groove utilities check
session capture Stop — If there is git activity this session (commits since midnight, working changes, or buffered commits), stages a capture draft to .groove/.cache/pending capture.md for next session review. Silent.
Steps
list
Read .claude/settings.json if it exists. Report which groove hooks are registered and which scripts exist in .groove/hooks/claude/ . Exit.
disable <hook
Remove the named hook's entry from .claude/settings.json (leave the script in place). Report removed / not found. Exit.
Default (install)
1. Ask which hooks to enable (default: all six):
2. Read .claude/settings.json if it exists; parse as JSON (default {} ). Never discard existing non groove entries.
3. Create .groove/hooks/claude/ directory if absent. Make each script executable ( chmod +x ).
4. For each selected hook: write the shell script and merge the hook entry into .claude/settings.json .
5. Write .claude/settings.json with the merged result.
6. Report summary:
Shell script templates
Write these verbatim to .groove/hooks/claude/ . Never overwrite an existing script without showing a diff and confirming.
daily end reminder.sh
git activity buffer.sh
block managed paths.sh
version check.sh
session capture.sh
.claude/settings.json entries
Merge these into the hooks key. Preserve all other keys.
When merging: if a hooks key already exists, append groove entries to the relevant event arrays. Do not create duplicates — check if a groove command entry already exists before appending.
Constraints
Never overwrite non groove entries in .claude/settings.json
Never overwrite an existing script without diff + confirmation
Scripts use python3 to parse JSON stdin — if python3 is absent, skip that hook and warn
block managed paths is aggressive: if it causes false positives the user can disable it with disable block managed paths
After install: remind the user that hooks take effect on the next Claude Code session restart
.groove/hooks/claude/ follows the git.hooks git strategy from .groove/index.md