---
title: "Hooks"
description: "Hooks are deterministic TypeScript checks on Claude Code lifecycle events, from session start to tool calls. They block unsafe commands and save memory."
canonical: "https://orchestkit.dev/docs/hooks"
---

# Hooks

Hooks are deterministic TypeScript checks on Claude Code lifecycle events, from session start to tool calls. They block unsafe commands and save memory.

import { Card, Cards } from 'fumadocs-ui/components/card';

OrchestKit's hooks are a library of deterministic TypeScript checks that fire on Claude Code lifecycle events, from session start to every tool call. They block unsafe commands, gate quality and save memory without the model choosing to run them. Hooks run in Claude Code; the skills and agents also load in Cursor and Codex.

Hooks are the deterministic layer. They fire on lifecycle events rather than being invoked, which makes them the right place for guardrails that must not depend on the model choosing to run them.

<Cards>
  <Card
    title="Overview"
    description="What hooks do and when they fire."
    href="/docs/hooks/overview"
  />
  <Card
    title="Architecture"
    description="The dispatcher, the entries map, and how registration works."
    href="/docs/hooks/architecture"
  />
  <Card
    title="Lifecycle hooks"
    description="Session start, prompt submit, and stop events."
    href="/docs/hooks/lifecycle-hooks"
  />
  <Card
    title="Safety hooks"
    description="Guardrails that block destructive or unsafe tool calls."
    href="/docs/hooks/safety-hooks"
  />
  <Card
    title="Memory hooks"
    description="Capturing and recalling context across sessions."
    href="/docs/hooks/memory-hooks"
  />
  <Card
    title="Writing hooks"
    description="Adding a hook, registering it, and keeping counts in sync."
    href="/docs/hooks/writing-hooks"
  />
</Cards>
