Add hooks: vibestretch - #5780
Conversation
144fceb to
de3f730
Compare
de3f730 to
318cf5d
Compare
|
First, credit where it is due: this has the best provenance of anything in the current queue. Your 285-line I am closing on two claims in the safety and privacy blocks that the shipped plugin contradicts. 1. True of the hook script — every write targets 2. The script reads the first 4 KB of the hook payload, which on SID=$(head -c 4096 | sed -n 's/.*"session_id"[[:space:]]*:[[:space:]]*"\([^"]*\)".*/\1/p')Nothing is retained and nothing is transmitted — I grepped the script for Both are small rewrites: Fix those two and resubmit — everything else, including the byte-identical script body, I am happy with. Minor while you are in there: |
Single-entry submission:
content/hooks/vibestretch.mdx.What it is
A hooks-based Claude Code plugin that prints one stretch, micro-workout, or eye exercise into the session when an agent turn has kept the user waiting. Three hooks do the accounting —
UserPromptSubmitopens a turn,PostToolUseadds the wait and fires the nudge when it is due,Stopcloses the turn.The part worth reviewing is what it counts: agent-wait time, not desk time. A nudge needs a long current turn, enough accumulated waiting since the last break, and an expired cooldown, so short turns and fast models stay silent with no configuration. A 45-minute absence clears the debt, and on macOS the system idle clock keeps an overnight run at an empty chair from counting at all.
Sources
Install
Safety and privacy
No dependencies, no daemon, no telemetry, no network calls, no accounts. Prompt and tool content is never read — only timestamps and elapsed seconds. State is a handful of plain files under
~/.cache/vibestretch. The nudge is asystemMessageshown to the user and never added to the model context. On macOS the scripts shell out toioregfor the idle clock andafplayfor a bundled chime; on Linuxpaplay. Nothing is written outside the plugin's own state directory.Both note fields are filled in the entry. This is my own work, submitted per CONTRIBUTING path 2 (direct PR), MIT licensed.