Loading...
Loading...
Install groove's Cursor native hooks into .cursor/hooks.json. Enables compaction-safe re-priming, session-end reminders, git activity capture, and managed-path protection.
npx skill4agent add andreadellacorte/groove groove-admin-cursor-hooks.groove/hooks/start.mdend.md--disable <hook>--list.cursor/hooks.json.groove/hooks/cursor/| Name | Event | Matcher | What it does |
|---|---|---|---|
| | — | Runs the prime script with |
| | — | If hour is 16–21 local time and |
| | | If the command contains |
| | | If |
| | — | Checks for a new groove version once per hour; calls |
--list.cursor/hooks.json.groove/hooks/cursor/--disable <hook>.cursor/hooks.jsonWhich hooks to install? (all / comma-separated: context-reprime, daily-end-reminder, git-activity-buffer, block-managed-paths, version-check)
Press enter for all..cursor/hooks.json{"version": 1, "hooks": {}}.groove/hooks/cursor/chmod +x.cursor/hooks.json.cursor/hooks.json✓ context-reprime — sessionStart hook → groove-utilities-prime.sh --json
✓ daily-end-reminder — stop hook → .groove/hooks/cursor/daily-end-reminder.sh
✓ git-activity-buffer — postToolUse/Shell hook → .groove/hooks/cursor/git-activity-buffer.sh
✓ block-managed-paths — preToolUse/Write hook → .groove/hooks/cursor/block-managed-paths.sh
✓ version-check — postToolUse hook → .groove/hooks/cursor/version-check.sh
✓ .cursor/hooks.json updated.groove/hooks/cursor/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/Shell 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 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 2
fiversion-check.sh#!/usr/bin/env bash
# groove: postToolUse hook — check for new groove version (once per hour)
CACHE=".groove/.cache/last-version-check-ts"
mkdir -p .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 .agents/skills/groove-utilities-check/scripts/check.sh 2>/dev/null || true.cursor/hooks.jsonhooks{
"version": 1,
"hooks": {
"sessionStart": [
{
"command": "bash .agents/skills/groove-utilities-prime/scripts/groove-utilities-prime.sh --json"
}
],
"stop": [
{
"command": "bash .groove/hooks/cursor/daily-end-reminder.sh"
}
],
"postToolUse": [
{
"matcher": "Shell",
"command": "bash .groove/hooks/cursor/git-activity-buffer.sh"
},
{
"command": "bash .groove/hooks/cursor/version-check.sh"
}
],
"preToolUse": [
{
"matcher": "Write",
"command": "bash .groove/hooks/cursor/block-managed-paths.sh"
}
]
}
}hooks.cursor/hooks.jsonpython3block-managed-paths.groove/hooks/cursor/git.hooks.groove/index.md.cursor/