Home › Learn › Claude Code Hooks — Lifecycle Automation for Agents
Claude Code Hooks — Lifecycle Automation for Agents
Claude Code hooks are shell commands that Claude Code runs automatically at well-defined points in the agent's lifecycle. They're configured in ~/.config/claude-code/settings.json under the hooks key, scoped by event name (PreToolUse, PostToolUse, Stop, UserPromptSubmit, Subagent
Claude Code hooks are shell commands that Claude Code runs automatically at well-defined points in the agent's lifecycle. They're configured in ~/.config/claude-code/settings.json under the hooks key, scoped by event name (PreToolUse, PostToolUse, Stop, UserPromptSubmit, SubagentStop) and optionally filtered by tool name or matcher pattern.
Hooks are how you wire Claude Code into your existing workflow: format code before edits commit, validate generated SQL, post a notification when a long task finishes, or block dangerous bash commands at the proxy layer. Unlike skills (which Claude invokes when it judges them relevant), hooks fire deterministically — the harness runs them, not the model.
The skills below either ship hook configurations of their own or are designed to be invoked from within hooks (a Stop-event hook that runs a code-review skill, for instance). For the raw mechanic, see Anthropic's official Claude Code docs.
Top 40 indexed skills
- hubspot-webhook-handlersSales
Build and harden HubSpot v3 webhook handlers that survive production: HMAC-SHA256 signature verification, Redis SET NX deduplication, async batch processing with immediate 200 ACK, dead-letter queuing for permanent…
- subscription-lifecycle-requirementsGeneral
Use when documenting, reviewing, or gathering requirements for Salesforce CPQ subscription lifecycle behavior: how amendments, renewals, upgrades, downgrades, and cancellations must work for a specific business.…
- hubspot-lifecycle-and-listsSales
Manage HubSpot lifecycle stages and list segmentation in production without silently destroying CRM trust. Covers lifecycle stage progression guards that prevent regression, dynamic list criteria drift, static list…
- guidewire-webhooks-integrationsGeneral
Consume Guidewire App Events into downstream systems (SQS/SNS, Kafka, webhooks) and survive the event-side failures — events not firing because Gosu registration was missed, duplicates from queue redelivery,…
- hooked-uxGeneral
Build habit-forming product loops using the Hook Model (Trigger, Action, Variable Reward, Investment). Use when the user mentions "users aren't coming back", "engagement loops", "habit…
- webflow-webhooks-eventsGeneral
Implement Webflow webhook registration, signature verification, and event handling for form_submission, site_publish, ecomm_new_order, page_created, and more. Use when setting up webhook endpoints, implementing…
- copywriting-hooksGrowth
Generate opening hooks for long-form articles in EN or FR — blog posts, Substack/Medium/dev.to, LinkedIn long-form, paid newsletters, opinion essays, reported features, technical deep-dives. Trigger whenever the user…
- hook-writeScience
Generate 5-10 hook variations for any post, thread, or caption across X, LinkedIn, Instagram, and TikTok — using different styles (question, contrarian, statistic, story, observation, promise) so the best one can be…
- hooks-patternsEngineering
Use when reasoning about React Hooks as a discipline: when a render is the right shape for state, why the Rules of Hooks exist as a compile-time invariant, how the dependency array encodes a contract between closure…
- miro-webhooks-eventsGeneral
Implement Miro REST API v2 webhooks with board subscriptions, event handling, and signature verification for real-time board change notifications. Trigger with phrases like "miro webhook", "miro…
- stripe-webhook-signature-verificationSecurity
Use when validating incoming Stripe webhook requests in a Node.js or Next.js backend before processing any payment event. Verifies the `stripe-signature` header against `STRIPE_WEBHOOK_SECRET` using Stripe's…
- twinmind-webhooks-eventsContent
Handle TwinMind meeting events including transcription completion, action item extraction, and calendar sync notifications. Use when implementing webhooks events, or managing TwinMind meeting AI operations. Trigger…
- vercel-webhooks-eventsEngineering
Implement Vercel webhook handling with signature verification and event processing. Use when setting up webhook endpoints, processing deployment events, or building integrations that react to Vercel deployment…
- anima-webhooks-eventsGeneral
Use Figma webhooks to trigger automatic Anima code generation on design changes. Use when building event-driven design-to-code pipelines, auto-generating components when Figma files change, or integrating design…
- bamboohr-webhooks-eventsGeneral
Implement BambooHR webhook endpoints with HMAC signature validation and employee change event handling. Covers global and permissioned webhooks. Use when setting up real-time employee notifications, implementing sync…
- groq-webhooks-eventsEngineering
Build event-driven architectures with Groq streaming, batch processing, and async patterns. Use when setting up real-time SSE endpoints, batch processing pipelines, or event-driven LLM processing with Groq. Trigger…
- intercom-webhooks-eventsGeneral
Implement Intercom webhook handling and data event tracking. Use when setting up webhook endpoints, processing Intercom notifications, or submitting custom data events for contact activity tracking. Trigger with…
- lindy-webhooks-eventsGeneral
Configure Lindy AI webhook triggers, callback patterns, and event handling. Use when setting up webhook triggers, implementing callback receivers, or building event-driven Lindy integrations. Trigger with phrases…
- lwc-styling-hooksGrowth
Use when theming Lightning base components or custom LWCs with SLDS Styling Hooks — CSS custom properties such as `--slds-c-button-color-background`, `--slds-g-color-brand-base-50`, and `--sds-c-*` — across app,…
- notion-webhooks-eventsGeneral
Build change detection and event handling for Notion workspaces using polling, native webhooks, and third-party connectors. Use when implementing real-time sync, change feeds, incremental backup, or event-driven…
- onenote-webhooks-eventsGeneral
Implement change detection for OneNote using polling and delta queries (webhooks decommissioned June 2023). Use when building real-time sync, change monitoring, or event-driven OneNote integrations. Trigger with…
- perplexity-webhooks-eventsEngineering
Build event-driven architectures around Perplexity Sonar API with streaming, batch pipelines, and scheduled search monitoring. Trigger with phrases like "perplexity streaming", "perplexity…
- supabase-webhooks-eventsEngineering
Implement Supabase database webhooks, pg_net async HTTP, LISTEN/NOTIFY, and Edge Function event handlers with signature verification. Use when setting up database webhooks for INSERT/UPDATE/DELETE events, sending…
- clade-webhooks-eventsGeneral
Use Anthropic Message Batches for async bulk processing and event handling. Use when working with webhooks-events patterns. Trigger with "anthropic batches", "claude batch api", "anthropic…
- hook-event-emitterEngineering
로컬 관측성(observability) 스킬 — Claude Code hook 이벤트를 JSONL 큐로 fan-out하고 localhost WebSocket 브로드캐스트로 대시보드에 노출. 외부 전송 0건, Artibot 내부 전용. Use when building a local hook monitor, agent dashboard, event tap, or any…
- outbound-webhook-from-salesforceEngineering
Use when Salesforce must POST a webhook to a third-party endpoint after a record change — with signed payloads, retries, dead-lettering, rate limits, and idempotency. Covers design choice between Outbound Message,…
- webhook-inbound-patternsEngineering
Use when implementing an inbound webhook receiver in Salesforce: routing via Apex REST and Salesforce Sites, authenticating webhook payloads via HMAC, ensuring idempotent processing, and handling the 5-second…
- abridge-webhooks-eventsGeneral
Implement Abridge webhook handling for clinical documentation events. Use when receiving note completion notifications, encounter status changes, provider enrollment events, or quality alert callbacks from Abridge.…
- adobe-webhooks-eventsEngineering
Implement Adobe I/O Events webhook registration, RSA-SHA256 signature verification, challenge handshake, and event-driven architectures with Creative Cloud, Experience Platform, and Firefly Services events. Trigger…
- alchemy-webhooks-eventsGeneral
Implement Alchemy Notify webhooks for real-time blockchain event notifications. Use when tracking wallet activity, monitoring mined transactions, watching smart contract events, or building real-time dApp features.…
- algolia-webhooks-eventsGrowth
Implement Algolia Insights API for click/conversion tracking, search analytics, and real-time event-driven index updates via database change listeners. Trigger: "algolia events", "algolia…
- anth-webhooks-eventsEngineering
Implement event-driven patterns with Claude API: streaming SSE events, Message Batches callbacks, and async processing architectures. Use when building real-time Claude integrations or processing batch results.…
- apify-webhooks-eventsGeneral
Implement Apify webhooks for Actor run notifications and event-driven pipelines. Use when setting up run completion alerts, building event-driven scraping pipelines, or configuring ad-hoc webhooks for individual…
- apollo-webhooks-eventsSales
Implement Apollo.io webhook and event-driven integrations. Use when receiving Apollo notifications, syncing data on changes, or building event-driven pipelines from Apollo activity. Trigger with phrases like…
- assemblyai-webhooks-eventsContent
Implement AssemblyAI webhook handling for transcription completion events. Use when setting up webhook endpoints, handling transcription callbacks, or processing async transcription results via webhooks. Trigger with…
- attio-webhooks-eventsGeneral
Implement Attio v2 webhooks -- subscribe to record/list/note/task events, verify signatures, filter by object or attribute, and handle idempotently. Trigger: "attio webhook", "attio events",…
- brightdata-webhooks-eventsGeneral
Implement Bright Data webhook signature validation and event handling. Use when setting up webhook endpoints, implementing signature verification, or handling Bright Data event notifications securely. Trigger with…
- canva-webhooks-eventsGeneral
Implement Canva Connect API webhook handling with JWK signature verification. Use when setting up webhook endpoints, handling Canva event notifications, or implementing real-time design collaboration features.…
- castai-webhooks-eventsGeneral
Configure CAST AI webhook notifications for cluster events and audit logs. Use when setting up alerts for node scaling, cost threshold events, or integrating CAST AI events with Slack, PagerDuty, or custom endpoints.…
- clade-reference-architectureEngineering
Build Claude Code plugins — skills, agents, MCP servers, hooks, and slash commands. Use when working with reference-architecture patterns. The complete guide to extending Claude Code with the Anthropic plugin system.…
Frequently asked questions
What hook events does Claude Code support?
PreToolUse (before Claude invokes a tool, can block), PostToolUse (after a tool returns), Stop (when the agent reaches a natural stopping point), UserPromptSubmit (every time the user submits input), and SubagentStop (when a delegated subagent finishes). The full list and matcher syntax is in Anthropic's official Claude Code documentation — we don't restate the spec here because it moves.Can a hook block Claude from taking an action?
PreToolUse hook that exits non-zero blocks the pending tool call and the exit message is fed back to Claude. This is the standard pattern for guardrails: refuse rm -rf, refuse force-pushes to main, require a confirmation for git tag deletes, etc. See the skills below tagged type:hook for working examples.Where do hooks live: per-project or global?
./.claude/settings.json (project-local) with ~/.claude/settings.json (user-global) at session start; later entries win on conflict. Per-skill hook configs from ~/.claude/skills/<name>/SKILL.md frontmatter merge into the same tree.