
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.
- Installs
- 530
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/andreadellacorte/groove --skill groove-admin-claude-hooks- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads groove-admin-claude-hooks automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
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)
-
Ask which hooks to enable (default: all six):
Which hooks to install? (all / comma-separated: daily-end-reminder, git-activity-buffer, block-managed-paths, context-reprime, version-check, session-capture) Press enter for all. -
Read
.claude/settings.jsonif it exists; parse as JSON (default{}). Never discard existing non-groove entries. -
Create
.groove/hooks/claude/directory if absent. Make each script executable (chmod +x). -
For each selected hook: write the shell script and merge the hook entry into
.claude/settings.json. -
Write
.claude/settings.jsonwith the merged result. -
Report summary:
✓ 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 ✓ context-reprime — SessionStart hook → groove-utilities-prime.sh ✓ version-check — PostToolUse hook → .groove/hooks/claude/version-check.sh ✓ session-capture — Stop hook → .groove/hooks/claude/session-capture.sh ✓ .claude/settings.json updated
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
#!/usr/bin/env bash
# groove: Stop hook — remind about /groove-daily-end during work hours
hour=$(date +%H)
if [ -f "$CLAUDE_PROJECT_DIR/.groove/index.md" ] && [ "$hour" -ge 16 ] && [ "$hour" -le 21 ]; then
echo "groove: end of work hours — consider running /groove-daily-end"
fi
git-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 "$CLAUDE_PROJECT_DIR/.groove/.cache"
echo "$(date '+%Y-%m-%d %H:%M') | ${msg:-<no message>}" >> "$CLAUDE_PROJECT_DIR/.groove/.cache/git-activity-buffer.txt"
fi
block-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
version-check.sh
#!/usr/bin/env bash
# groove: PostToolUse hook — check for new groove version (once per hour)
CACHE="$CLAUDE_PROJECT_DIR/.groove/.cache/last-version-check-ts"
mkdir -p "$CLAUDE_PROJECT_DIR/.groove/.cache"
now=$(date +%s)
if [ -f "$CACHE" ]; then
last=$(cat "$CACHE")
diff=$((now - last))
[ "$diff" -lt 3600 ] && exit 0
fi
echo "$now" > "$CACHE"
bash "$CLAUDE_PROJECT_DIR/.agents/skills/groove-utilities-check/scripts/check.sh" 2>/dev/null || true
session-capture.sh
#!/usr/bin/env bash
# groove: Stop hook — stage a session capture draft from git activity for next-session review
ROOT="${CLAUDE_PROJECT_DIR:-$PWD}"
[ -f "$ROOT/.groove/index.md" ] || exit 0
command -v git >/dev/null 2>&1 || exit 0
git -C "$ROOT" rev-parse --git-dir >/dev/null 2>&1 || exit 0
CACHE="$ROOT/.groove/.cache"
PENDING="$CACHE/pending-capture.md"
BUFFER="$CACHE/git-activity-buffer.txt"
commits=$(git -C "$ROOT" log --since=midnight --oneline 2>/dev/null)
changes=$(git -C "$ROOT" diff --stat HEAD 2>/dev/null)
buffered=""
[ -s "$BUFFER" ] && buffered=$(cat "$BUFFER")
# No activity → clear any stale draft and stay silent.
if [ -z "$commits" ] && [ -z "$changes" ] && [ -z "$buffered" ]; then
rm -f "$PENDING"
exit 0
fi
mkdir -p "$CACHE"
{
echo "# Pending capture — $(date '+%Y-%m-%d %H:%M')"
echo
echo "## Commits since midnight"
echo "${commits:-(none)}"
echo
echo "## Working changes"
echo "${changes:-(none)}"
if [ -n "$buffered" ]; then
echo
echo "## Buffered commit messages"
echo "$buffered"
fi
} > "$PENDING"
.claude/settings.json entries
Merge these into the hooks key. Preserve all other keys.
{
"hooks": {
"Stop": [
{
"hooks": [
{ "type": "command", "command": "bash $CLAUDE_PROJECT_DIR/.groove/hooks/claude/daily-end-reminder.sh" }
]
},
{
"hooks": [
{ "type": "command", "command": "bash $CLAUDE_PROJECT_DIR/.groove/hooks/claude/session-capture.sh" }
]
}
],
"PostToolUse": [
{
"matcher": "Bash",
"hooks": [
{ "type": "command", "command": "bash $CLAUDE_PROJECT_DIR/.groove/hooks/claude/git-activity-buffer.sh" }
]
},
{
"hooks": [
{ "type": "command", "command": "bash $CLAUDE_PROJECT_DIR/.groove/hooks/claude/version-check.sh" }
]
}
],
"PreToolUse": [
{
"matcher": "Write",
"hooks": [
{ "type": "command", "command": "bash $CLAUDE_PROJECT_DIR/.groove/hooks/claude/block-managed-paths.sh" }
]
},
{
"matcher": "Edit",
"hooks": [
{ "type": "command", "command": "bash $CLAUDE_PROJECT_DIR/.groove/hooks/claude/block-managed-paths.sh" }
]
}
],
"SessionStart": [
{
"matcher": "startup|compact",
"hooks": [
{
"type": "command",
"command": "bash $CLAUDE_PROJECT_DIR/.agents/skills/groove-utilities-prime/scripts/groove-utilities-prime.sh"
}
]
}
]
}
}
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
python3to parse JSON stdin — if python3 is absent, skip that hook and warn block-managed-pathsis 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 thegit.hooksgit strategy from.groove/index.md
FAQ
What does the groove-admin-claude-hooks skill do?
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.
How do I install groove-admin-claude-hooks?
Run npx skills add https://github.com/andreadellacorte/groove --skill groove-admin-claude-hooks in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/groove-admin-claude-hooks/ (personal) or .claude/skills/groove-admin-claude-hooks/ (project).
Which AI agents can use groove-admin-claude-hooks?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is groove-admin-claude-hooks safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains groove-admin-claude-hooks?
It is published by andreadellacorte in andreadellacorte/groove. It has 530 recorded installs.
More from andreadellacorte/groove
groove
andreadellacorte/groove
Groove engineering workflow system. Top-level entry point. Use groove-daily-, groove-work-, groove-utilities-, groove-admin- for all workflow and admin commands.
groove-utilities-task-analyse
andreadellacorte/groove
Analyse task status and distribution across the configured backend.
groove-utilities-memory-install
andreadellacorte/groove
Set up memory backend and configuration.
groove-admin-install
andreadellacorte/groove
Install groove backends, companions, and AGENTS.md bootstrap. Run once per repo.
groove-utilities-memory-log-daily
andreadellacorte/groove
Write the daily memory log entry. Use at end of day to record what happened.
groove-utilities-task-install
andreadellacorte/groove
Set up task backend and configuration.
Popular code quality & workflow skills
grill-me
mattpocock/skills
A relentless interview to sharpen a plan or design.
improve-codebase-architecture
mattpocock/skills
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
handoff
mattpocock/skills
Compact the current conversation into a handoff document for another agent to pick up.
domain-modeling
mattpocock/skills
Build and sharpen a project's domain model. Use when discussing codebase terminology, writing or editing a GLOSSARY.md, or recording or editing an ADR.
codebase-design
mattpocock/skills
Shared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary.
diagnosing-bugs
mattpocock/skills
Diagnosis loop for hard bugs and performance regressions. Use when the user says "diagnose"/"debug this", or reports something broken/throwing/failing/slow.