I think there's a lot of depth in the way you can actually set up sophisticated workflows using hooks. This reaches from simple, human-centered improvements to fully automated, keyword-controlled agentic pipelines.
One of the more core issues about agent workflows is that it's hard to programmatically enforce behaviour in an environment where you're not sure what the output is. A colleague of mine set up an in-depth keyword system, forcing claude to end his turns starting with a keyword. These keywords mapped to certain stages or actions that took part in the flow - such as "PLANNED", "IMPLEMENTED", "DONE" etc. - If that keyword was missing, clooks would throw an error reminding the agent to stick to the keywords. And if that keyword was present, more complex logic could be run. "DONE" could lead into a hook starting normal and E2E tests, confirming that what was just implemented passed all existing and new tests.
Hey Product Hunt π
At Playbook, we run sophisticated agentic workflows across the entire team. But even the best workflows can't always accommodate how every individual prefers to work - leading to weird workarounds or begrudging acceptance.
Claude Code Hooks are shell commands wired into JSON: no typing, no composition, and no good way to adapt them to your workflow if it doesn't quite match your team's defaults. Worse, if a Claude Hook crashes, the action can still fall through the gaps - and oops, that destructive command just slipped through because your bash script was buggy. (Claude ignores hooks that threw errors by default.)
Clooks came out of that frustration: a more powerful TypeScript runtime for Claude Code Hooks.
Hooks can live in your repository committed alongside your code, so once your team has Clooks installed, everyone runs the same guardrails automatically. You can also install Clooks globally, so your personal hooks can follow you across every Claude Code session across your computer.
On crashes, Clooks catches the error, blocks and informs claude about it. Hooks are fully typed, testable in isolation and composable, so Claude can help write and validate them with autocomplete instead of guessing at shell scripts.
What Clooks gives you:
Crash blocking - if a hook breaks, the action stops by default. Claude will wait for you.
Typed TypeScript hooks - typed contexts - stop guessing at documentation and trust the typing.
Built-in testing - Claude can generate realistic payloads and test them directly against the code using clooks
Repo + global hooks - write entire hook workflows or guardrails for your team, or just for yourself
Layered Configuration - re-use and layer your configurations so you can adjust it until it's perfect for you
Ordered and parallel pipelines - Set up more complex flows, rewriting commands as they go without interrupting your agent's focus
Hot Reload - configuration & new hooks work immediately, no need to restart your sessions
Marketplace+Plugin installs - If you see a set of hooks you like, install it either through clooks or as if you're installing a claude plugin - clooks will automatically detect and copy over the hooks
Clooks is MIT licensed and open source.
Long-term, my goal is a full agent-agnostic ecosystem: We write the hooks once, and they work, whether you're on Claude Code, Codex, OpenCode, or whatever comes next.
You can install clooks with this one-liner and claude will walk you through:
Then try installing the suggested built-in hooks, or ask claude to create one for you, like:
There's still so many more feature ideas I have floating about how we can make this the best tool for everyone. I'd love feedback from anyone using Claude Code hooks extensively: what guardrails have you built, and where do native hooks still feel painful?