RepoDepot
Category

Hooks

Hooks let you run your own scripts on Claude Code lifecycle events. Add permission gates, audit logs, notifications, or completely custom behavior without touching the agentic loop itself.

Frequently asked

About hooks

What are Claude Code hooks?+

Hooks are user-defined scripts that run on Claude Code lifecycle events — PreToolUse, PostToolUse, Stop, Notification, and others. They let you add permission gates, audit logs, or custom behavior without modifying the agent loop.

What can a hook do?+

Hooks receive event metadata via stdin and can approve, deny, or modify tool calls. Common uses: blocking writes to sensitive files, logging tool usage, sending notifications when Claude is waiting for input.

How do I configure a Claude Code hook?+

Add an entry under hooks in your settings.json with the matching event and the command to run. The command is invoked synchronously and can return a JSON decision.

Browse other categories