Skip to content
  1. Home
  2. Guides and documents
  3. Claude Code Hooks Mastery

Claude Code Hooks Mastery

Worked examples of every Claude Code hook event

What it is

A demo project that implements all 13 Claude Code hook lifecycle events as standalone Python scripts run with uv, logging each JSON payload so you can see what a hook receives. It also covers exit codes and flow control, subagents, a meta-agent and custom status lines.

Good for

  • See the payload each hook event receives
  • Block risky commands with a hook
  • Copy a hook script as a starting point

What you need

Claude Code and Astral uv; optional TTS and LLM API keys

Worth knowingWritten as a demo with optional text-to-speech extras; trim it before using it in a real project.

Sources

The summary is ours, written from the README. Spotted an error? See how we work.

More for automation & ops

See the topic →
  • Building Effective Agents Cookbook

    anthropics/claude-cookbooks

    Minimal notebooks for the common agent workflow patterns

    GuideGitHub stars: 55k
  • Agents Towards Production

    NirDiamant/agents-towards-production

    Code-first tutorials for deploying and operating AI agents

    GuideGitHub stars: 22k
  • ADK Recipes

    google/adk-recipes

    Small runnable agents built with Google's Agent Development Kit

    GuideGitHub stars: 11k
  • Awesome Agentic Patterns

    nibzard/awesome-agentic-patterns

    Catalogue of repeatable patterns used by production AI agents

    GuideGitHub stars: 5.1k