Carabiner banner
outfitter-dev outfitter-dev

Carabiner

Development community

Description

Library for building Claude Code hooks that are type-safe, maintainable, and shareable

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Carabiner - Type-Safe Hooks Framework for Claude Code

[![npm version](https://badge.fury.io/js/@carabiner%2Fhooks-core.svg)](https://badge.fury.io/js/@carabiner%2Fhooks-core) [![npm downloads](https://img.shields.io/npm/dt/@carabiner/hooks-core.svg)](https://www.npmjs.com/package/@carabiner/hooks-core) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A comprehensive TypeScript framework for building type-safe Claude Code hooks, built on top of the official `@anthropic-ai/claude-code` SDK for maximum compatibility and type safety.

๐Ÿš€ Overview

Transform Claude Code hook development from manual shell scripting to **type-safe, testable, maintainable TypeScript applications**. Built directly on the official Claude Code SDK, this framework ensures full compatibility with all Claude Code features while providing a superior developer experience.

โœจ Key Benefits

  • ๐Ÿ›ก๏ธ SDK Integration: Built on @anthropic-ai/claude-code for guaranteed compatibility
  • ๐Ÿ“˜ Full Type Safety: Complete TypeScript types for all hooks and tools via the SDK
  • ๐Ÿ”ง Multiple APIs: Function-based, Builder pattern, and Declarative approaches
  • ๐Ÿ” Security: Built-in validators and environment-specific protections
  • ๐Ÿงช Testing: Complete mock framework and testing utilities
  • โšก Performance: Fast, efficient hook execution with proper error handling
  • ๐ŸŽฏ Tool Scoping: Hooks can target specific tools or run universally

๐Ÿ“ฆ Installation

Quick Start with NPM

# Install core packages
bun add @carabiner/hooks-core @carabiner/types @carabiner/execution

# For development
bun add -d @carabiner/hooks-testing @carabiner/hooks-validators

Available Packages

All packages are available on npm under the `@carabiner` scope:

  • Core: @carabiner/hooks-core - Core hook functionality with SDK integration
  • Types: @carabiner/types - TypeScript type definitions
  • Execution: `@carabiner/exec