groove-admin-cursor-hooks

Install groove's Cursor native hooks into .cursor/hooks.json. Enables compaction-safe re-priming, session-end reminders, git activity capture, automatic session-capture drafts, and managed-path protection.

By andreadellacorte · 517 installs

npx skills add andreadellacorte/groove --skill groove-admin-cursor-hooks

Source repository · Upstream listing

<! groove:managed — do not edit; changes will be overwritten by groove update groove admin cursor hooks Install groove's Cursor native 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 .cursor/hooks.json and shell scripts are written to .groove/hooks/cursor/ . Hooks fire automatically on Cursor lifecycle events without any model involvement. Available hooks Name Event Matcher What it does context reprime sessionStart — Runs the prime script with json — ensures full workflow context is loaded after every session start and compaction 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 Shell If the command contains git commit , appends a timestamped line to .groove/.cache/git activity buffer.txt block managed paths preToolUse Write If file path starts with .agents/skills/groove or skills/groove , exits with code 2 to block the write with an explanatory message 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 .cursor/hooks.json if it exists. Report which groove hooks are registered and which scripts exist in .groove/hooks/cursor/ . Exit. disable <hook Remove the named hook's entry from .cursor/hooks.json (leave the script in place). Report removed / not found. Exit. Default (install) 1. Ask which hooks to enable (default: all six): 2. Read .cursor/hooks.json if it exists; parse as JSON (default {"version": 1, "hooks": {}} ). Never discard existing non groove entries. 3. Create .groove/hooks/cursor/ directory if absent. Make each script executable ( chmod +x ). 4. For each selected hook: write the shell script and merge the hook entry into .cursor/hooks.json . 5. Write .cursor/hooks.json with the merged result. 6. Report summary: Shell script templates Write these verbatim to .groove/hooks/cursor/ . 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 .cursor/hooks.json template 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 .cursor/hooks.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 uses exit code 2 (Cursor's convention to block the tool use) After install: remind the user that hooks take effect on the next Cursor session restart .groove/hooks/cursor/ follows the git.hooks git strategy from .groove/index.md Create .cursor/ directory if it does not exist