cchooks
♥Cherished
cchooks is a Python SDK that simplifies building Claude Code hooks by handling JSON parsing, validation, and boilerplate automatically. It supports all nine hook types (PreToolUse, ToolResult, SessionStart, etc.) and provides both simple exit code and advanced JSON control modes, allowing developers to focus on hook logic rather than protocol implementation.
Clauded With Love Rating
7.5 / 10
cchooks is a Python SDK that abstracts away JSON parsing and boilerplate code for building Claude Code hooks, supporting all nine hook types with automatic context detection. It provides both simple exit code and advanced JSON control modes, allowing developers to focus on hook logic rather than protocol implementation.
Code Quality7.5
Usefulness8.5
Claude Usage6.5
Documentation8.0
Originality7.0
Highlights
- ✓Automatic hook type detection and context creation eliminates manual JSON parsing complexity
- ✓Clean API design with type hints and context-specific methods like exit_deny() and allow()
- ✓Comprehensive coverage of all Claude Code hook types with practical, runnable examples
To Improve
- →Add comprehensive test coverage and error handling for malformed input scenarios
- →Include async/await support for hooks that need to perform I/O operations or API calls