Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Claude Code
  3. claude-hooks

claude-hooks

MITTypeScriptv2.4.0

A TypeScript-based system for configuring and customizing Claude Code hooks with full type safety and auto-completion.

GitHubGitHub
368 stars19 forks0 contributors

What is claude-hooks?

claude-hooks is a TypeScript-powered development environment and CLI tool for customizing Claude Code's behavior through hooks. It generates a structured project with full type safety, enabling developers to write hook handlers with strongly-typed payloads and auto-completion, eliminating guesswork with untyped data.

Target Audience

Developers using Claude Code who want to extend or customize its behavior with type-safe, maintainable code, particularly those familiar with TypeScript and Node.js/Bun environments.

Value Proposition

Developers choose claude-hooks for its complete TypeScript support and strongly-typed payloads, which provide IntelliSense and reduce errors compared to working with untyped hook data. It offers a ready-to-customize setup with generated utilities, allowing focus on logic rather than configuration.

Overview

claude-hooks provides a powerful, TypeScript-based development environment for customizing Claude Code's behavior through hooks. It enables developers to write hook handlers with complete type safety, auto-completion, and access to strongly-typed payloads, eliminating the guesswork from working with untyped data.

Key Features

  • Full TypeScript Support — Write hooks with complete type safety and IntelliSense in familiar TypeScript syntax.
  • Typed Payloads — Access strongly-typed payload data for all hook types (PreToolUse, PostToolUse, Notification, Stop).
  • Ready-to-Customize Setup — Generates clean TypeScript files and configuration for immediate customization.
  • Generated Utilities — Includes type definitions, session tracking utilities, and a structured project layout.
  • Flexible Integration — Use any npm packages, async/await, or development patterns within your hooks.

Philosophy

The project emphasizes developer experience by providing a strongly-typed, intuitive interface for hook customization, allowing users to focus on logic rather than data structure validation.

Use Cases

Best For

  • Adding custom logging or notifications when Claude Code uses specific tools like 'Write' or 'Bash'.
  • Integrating Claude Code with external services (e.g., webhooks, dashboards) via typed hook handlers.
  • Enforcing coding standards or validations in Claude Code's output through pre- or post-tool use hooks.
  • Tracking and analyzing Claude Code sessions for debugging or analytics purposes.
  • Extending Claude Code with custom logic using familiar TypeScript patterns and npm packages.
  • Setting up a type-safe development environment for Claude Code hooks quickly via a CLI generator.

Not Ideal For

  • Environments where Bun runtime cannot be installed due to IT restrictions or infrastructure constraints.
  • Projects using AI coding assistants other than Claude Code, as the hooks are ecosystem-specific.
  • Developers who prefer lightweight, configuration-only setups without TypeScript compilation or type safety overhead.
  • Teams needing real-time hook processing with minimal runtime footprint, as Bun and TypeScript add execution layers.

Pros & Cons

Pros

Full TypeScript Support

Provides complete type safety and IntelliSense for hook handlers, eliminating guesswork with payload structures and reducing errors.

Typed Payload Access

Offers strongly-typed payloads for all hook types like PreToolUse and PostToolUse, ensuring accurate data handling with auto-completion.

Quick CLI Setup

Generates clean TypeScript files and configuration immediately via npx, allowing developers to start customizing hooks without manual setup.

Flexible Development Patterns

Supports async/await, npm packages, and familiar TypeScript syntax, enabling integration with external services and complex logic.

Cons

Bun Runtime Dependency

Requires Bun for running hooks, adding installation complexity and limiting compatibility in environments where only Node.js is available.

Claude Code Lock-in

Tightly coupled with Claude Code's hook system, making it unsuitable for projects using other AI assistants or needing portable hook solutions.

Limited Hook Types

Currently supports only specific hooks (PreToolUse, PostToolUse, Notification, Stop), which may not cover all customization needs if Claude Code expands its API.

Frequently Asked Questions

Quick Stats

Stars368
Forks19
Contributors0
Open Issues2
Last commit9 months ago
CreatedSince 2025

Tags

#developer-tools#type-safety#claude-code#typescript#hook-system#automation

Built With

T
TypeScript
B
Bun
N
Node.js

Included in

Claude Code36.6k
Auto-fetched 1 day ago

Related Projects

SuperpowersSuperpowers

An agentic skills framework & software development methodology that works.

Stars194,206
Forks17,271
Last commit3 days ago
Everything Claude CodeEverything Claude Code

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

Stars184,809
Forks28,561
Last commit1 day ago
Learn Claude CodeLearn Claude Code

Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1

Stars60,840
Forks9,956
Last commit6 days ago
Claude Code TemplatesClaude Code Templates

CLI tool for configuring and monitoring Claude Code

Stars27,342
Forks2,792
Last commit1 day ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub