hooks▌
parcadei/continuous-claude-v3 · updated Apr 8, 2026
When working with files in .claude/hooks/:
Hook Development Rules
When working with files in .claude/hooks/:
Pattern
Shell wrapper (.sh) → TypeScript (.ts) via npx tsx
Shell Wrapper Template
#!/bin/bash
set -e
cd "$CLAUDE_PROJECT_DIR/.claude/hooks"
cat | npx tsx <handler>.ts
TypeScript Handler Pattern
interface HookInput {
// Event-specific fields
}
async function main() {
const input: HookInput = JSON.parse(await readStdin());
// Process input
const output = {
result: 'continue', // or 'block'
message: 'Optional system reminder'
};
console.log(JSON.stringify(output));
}
Hook Events
- PreToolUse - Before tool execution (can block)
- PostToolUse - After tool execution
- UserPromptSubmit - Before processing user prompt
- PreCompact - Before context compaction
- SessionStart - On session start/resume/compact
- Stop - When agent finishes
Testing
Test hooks manually:
echo '{"type": "resume"}' | .claude/hooks/session-start-continuity.sh
Registration
Add hooks to .claude/settings.json:
{
"hooks": {
"EventName": [{
"matcher": ["pattern"], // Optional
"hooks": [{
"type": "command",
"command": "$CLAUDE_PROJECT_DIR/.claude/hooks/hook.sh"
}]
}]
}
}
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.4★★★★★66 reviews- ★★★★★Chaitanya Patil· Dec 28, 2024
Registry listing for hooks matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★William Brown· Dec 28, 2024
Useful defaults in hooks — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.
- ★★★★★Chinedu Gill· Dec 20, 2024
hooks fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Zaid Kim· Dec 20, 2024
Registry listing for hooks matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Noah Shah· Dec 16, 2024
We added hooks from the explainx registry; install was straightforward and the SKILL.md answered most questions upfront.
- ★★★★★Piyush G· Nov 19, 2024
hooks reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Omar Okafor· Nov 19, 2024
hooks is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Benjamin Wang· Nov 15, 2024
hooks is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.
- ★★★★★Layla Shah· Nov 15, 2024
hooks fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Kaira Jain· Nov 11, 2024
I recommend hooks for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.
showing 1-10 of 66