> ## Documentation Index
> Fetch the complete documentation index at: https://ai.easyaf.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Summary of the CloudNimble.ClaudeEssentials.Hooks.Inputs Namespace

## 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

| Class | Hook Event | Description |
| - | - | - |
| `PreToolUseHookInput<T>` | PreToolUse | Received before a tool executes |
| `PostToolUseHookInput<T,R>` | PostToolUse | Received after a tool completes |
| `PermissionRequestHookInput<T>` | PermissionRequest | Received when permission is requested |
| `UserPromptSubmitHookInput` | UserPromptSubmit | Received when user submits a prompt |
| `StopHookInput` | Stop | Received when Claude finishes responding |
| `SubagentStopHookInput` | SubagentStop | Received when a subagent completes |
| `NotificationHookInput` | Notification | Received for notifications |
| `SessionStartHookInput` | SessionStart | Received when a session starts |
| `SessionEndHookInput` | SessionEnd | Received when a session ends |
| `PreCompactHookInput` | PreCompact | Received before context compaction |

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:

```csharp theme={null}
// For PreToolUse hooks
var input = ClaudeHooksSerializer.DeserializePreToolUseInput(Console.In.ReadToEnd());
Console.WriteLine($"Tool: {input?.ToolName}");
Console.WriteLine($"Session: {input?.SessionId}");

// For strongly-typed tool input (requires custom JsonSerializerContext)
var typedInput = ClaudeHooksSerializer.DeserializePreToolUseInput<MyToolInput>(
json, MyJsonContext.Default.PreToolUseHookInputMyToolInput);
```

### 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

### &#x20;Classes

| Name | Summary |
| - | - |
| [HookInputBase](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/HookInputBase.md) | Base class containing common fields present in all hook inputs.  All hooks receive these fields via JSON through stdin. |
| [ToolHookInputBase](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/ToolHookInputBase.md) | Base class for tool-related hook inputs that contain tool name, input, and use ID.  Used as a base for PreToolUse and PostToolUse hook inputs. |
| [NotificationHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/NotificationHookInput.md) | Represents the input received by a Notification hook.  This hook runs when Claude Code sends notifications. |
| [PermissionRequestHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PermissionRequestHookInput.md) | Represents the input received by a PermissionRequest hook.  This hook runs when a permission dialog is shown and can automatically allow or deny permissions. |
| [PostToolUseHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PostToolUseHookInput.md) | Represents the input received by a PostToolUse hook.  This hook runs after tool calls complete and includes the tool's response. |
| [PreCompactHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PreCompactHookInput.md) | Represents the input received by a PreCompact hook.  This hook runs before a compact operation. |
| [PreToolUseHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/PreToolUseHookInput.md) | Represents the input received by a PreToolUse hook.  This hook runs before tool calls are executed and can block or modify them. |
| [SessionEndHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SessionEndHookInput.md) | Represents the input received by a SessionEnd hook.  This hook runs when a Claude Code session ends. |
| [SessionStartHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SessionStartHookInput.md) | Represents the input received by a SessionStart hook.  This hook runs when Claude Code starts a new session or resumes one. |
| [StopHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/StopHookInput.md) | Represents the input received by a Stop hook.  This hook runs when Claude Code finishes responding. |
| [SubagentStopHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/SubagentStopHookInput.md) | Represents the input received by a SubagentStop hook.  This hook runs when subagent tasks complete. |
| [UserPromptSubmitHookInput](https://ai.easyaf.dev/claudeessentials/api-reference/CloudNimble/ClaudeEssentials/Hooks/Inputs/UserPromptSubmitHookInput.md) | Represents the input received by a UserPromptSubmit hook.  This hook runs when the user submits a prompt, before Claude processes it. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.