Skip to main content

Summary

The Inputs namespace contains classes for deserializing JSON data that Claude Code sends to hooks via stdin. Each hook event type has a corresponding input class.

Input Classes

All input classes inherit from HookInputBase which provides common properties like SessionId, TranscriptPath, and CurrentWorkingDirectory.

Usage

Deserializing Hook Input

Use ClaudeHooksSerializer to deserialize input from stdin:

Common Base Properties

All inputs include these properties from HookInputBase:
  • SessionId - Unique session identifier
  • TranscriptPath - Path to conversation transcript
  • CurrentWorkingDirectory - Active working directory
  • PermissionMode - Current permission mode
  • HookEventName - The event that triggered this hook

Types

Classes