claude-hooks_skill

This skill helps you create and configure Claude Code hooks for validation, logging, and automation to streamline workflows.
  • Python

2

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill 89jobrien/steve --skill claude-hooks

  • SKILL.md1.3 KB

Overview

This skill configures and manages Claude Code hooks to validate tools, log activity, send notifications, and run custom automations. It provides patterns and templates to add PreToolUse, PostToolUse, Notification, and Stop hooks quickly and safely. Use it to enforce policies, capture audit trails, and automate cleanup or alerts.

How this skill works

The skill generates and updates hook definitions stored in the CLAUDE configuration file and supplies ready-to-use templates for common events. It wires PreToolUse hooks for input validation and blocking, PostToolUse hooks for logging and cleanup, Notification hooks for alerts, and Stop hooks for final reporting. It also includes matchers and examples to scope hooks to specific tools or contexts.

When to use it

  • Validate tool inputs or block unsafe executions
  • Capture audit logs and metadata after tool runs
  • Send alerts or notifications on specific events
  • Automate cleanup, retries, or follow-up tasks
  • Enforce security controls or policy checks

Best practices

  • Keep hook execution under 1 second to avoid slowing workflows
  • Scope hooks with specific matchers to limit blast radius
  • Handle errors gracefully and fail-safe (don’t block critical flows)
  • Test hooks independently before deploying to production
  • Log structured, minimal output to simplify auditing

Example use cases

  • PreToolUse validation that blocks sensitive data exfiltration attempts
  • PostToolUse logger that records tool outputs and runtime metadata for audits
  • Notification hook that sends Slack or email alerts when a failure pattern appears
  • Stop hook that compiles a final run report and posts to a dashboard
  • Automation hook that retries flaky tools or triggers downstream jobs

FAQ

Hooks are configured in the Claude settings file under the hooks key (typically ~/.claude/settings.json).

How do I limit a hook to a single tool?

Use specific matchers in the hook definition to target a tool name, tool type, or metadata field. Narrow match criteria to avoid unintended triggers.

What should a hook return on error?

Return a safe default and an error log entry. Avoid throwing uncaught exceptions—fail safe so the main workflow can continue if necessary.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
claude-hooks skill by 89jobrien/steve | VeilStrat