Scaffold for building Humane Hooks — Claude Code extensions that respect the human behind the keyboard.
This file describes the template, not your hook. Before you publish, rewrite it so someone landing on your repo understands what your hook does and how to live with it.
A good hook README covers, in order:
- One-line pitch — what the reminder is and when it fires.
- How it works — the
UserPromptSubmitloop, what state gets tracked, how the agent decides what to say.- Staleness tiers — a table of your thresholds (
fresh/standard/firmer/insistent/welcome-back) and what Claude does in each.- Install —
./install.shwith the--global/--projectvariants.- Slash commands — the three
/{{hook-name}},/{{hook-name}}-snooze,/{{hook-name}}-statuscommands and what each does.- Configuration — where to tune thresholds, plus env vars:
{{HOOK_ENV_PREFIX}}_DISABLED,{{HOOK_ENV_PREFIX}}_STATE_DIR,CLAUDE_CONFIG_DIR.- Uninstall —
./uninstall.shand what it does/doesn't touch.- Development —
node --test tests/, zero deps, pointer toTESTING.mdandCONTRIBUTING.md.- Read first — link to
MANIFESTO.md.For working examples, see
drink-waterandstretch-break. Match their voice — short, concrete, no hype.Delete this callout once your README is written.
- Click "Use this template" on GitHub (or clone manually)
- Run the setup script:
./setup.sh your-hook-name- Customize your hook:
hooks/your-hook-name.js— thresholds and agent instructionsskills/your-hook-name/SKILL.md— tone guidance for the agent
- Run tests:
node --test tests/your-hook-name.test.js - Install:
./install.sh
- Hook script with full lifecycle pre-wired (state, staleness, I/O, CLI)
- Install/uninstall scripts with atomic settings.json merging
- Skill file teaching the agent how to respond
- Slash commands for explicit control
- Test suite with
node:test(zero deps) - CI workflow (GitHub Actions, Node 18/20/22)
- Thresholds — how long before each reminder tier kicks in
- Instructions — what the agent should say at each tier
- Tone — hook-specific examples in the SKILL.md
Everything else works out of the box.
- Manifesto — design principles, the "Is it a Humane Hook?" checklist, and anti-patterns to avoid
- Contributing — ground rules for patches
MIT