cc-hooks-ts

Community

Type-safe Claude Code hooks with TS.

Authormasseater
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill provides a comprehensive guide and examples for creating type-safe Claude Code hooks using the cc-hooks-ts library. It helps you implement event-driven hooks (PreToolUse/PostToolUse/SessionStart, etc.) in TypeScript, enabling deterministic automation in Claude Code projects and reducing boilerplate across tool integrations.

Core Features & Use Cases

  • Type-safe hook implementation: Use TypeScript to define hooks with compile-time safety.
  • Event-driven automation: Hook into PostToolUse, PreToolUse, SessionStart, and more to automate checks, logging, and policy enforcement.
  • Practical examples: Includes full code snippets showing installation, a basic hook, and real-world scenarios.
  • Plugin.json integration: Learn how to wire hooks into Claude Code plugin.json.

Quick Start

Install: bun add cc-hooks-ts. Create a hook.ts that uses defineHook from "cc-hooks-ts" and run it with bun run -i --silent path-to-your-hook.ts.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: cc-hooks-ts
Download link: https://github.com/masseater/claude-code-plugin/archive/main.zip#cc-hooks-ts

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.