Agent skill · software engineering · aiskillstore

hook

Use PROACTIVELY when you need to create, update, configure, or validate Claude hooks for various events and integrations

Why this skill is useful

Adds a structured workflow for creating and validating Claude hooks, including specific error handling and security practices not commonly found in public documentation.

What it needs

Requires bash, python installed locally. About 2k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

1. Context Main Objective: Create or update Claude Code hook scripts named $1 with requirements: $2 Secondary Objective: Ensure hooks are properly linked in settings and follow security best practices User Input: [$1 = hook name, $2 = hook requirements/description] 2. Workflow Phase 1: Discovery & Analysis [P0] T001: Assess if you needed more context about hook specifications. If so, read .claude/skills/hook/hooks.md [P0] T002: Check if hook already exists in .claude/hooks/ directory [P0] T003: Review @.claude/settings.local.json for existing hook configurations [P1] T004: Identify appropriate Claude Code events to hook into [P1] T005: Assess security and performance implications [P2] Phase 2: Implementation [P0] T006: Create new hook script OR update existing hook script in .claude/hooks/ [P0] T007: Implement hook logic with proper error handling [P0] T008: Add logging and debugging capabilities [P1] T009: Create input validation and sanitization routines [P1] T010: Document hook behavior in script comments [P2] Phase 3: Configuration [P1] T011: Update @.claude/settings.local.json to link the hook [P0] T012: Configure appropriate event triggers [P1] T013: Set necessary permissions and access levels [P1] T014: Ensure compatibility with existing hooks [P2] Phase 4: Validation [P1] T015: Test hook execution without creating test files [P0] T016: Verify error handling and edge cases [P1] T017: Check for security vulnerabilities [P1] T018: Validate performance impact [P2] T019: Provide comprehensive report to main agent [P0] 3. Implementation Strategy For new hooks: Create script file in .claude/hooks/ following naming convention For updates: Read existing hook, preserve working logic, apply requested changes Use Python or Bash depending on complexity requirements Implement idempotent operations where possible Follow existing hook patterns in the codebase for consistency Read .claude/skills/hook-writer/hooks.md for hook specifications PROACTIVELY 4. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/hook

View the source on GitHub

Browse the @skills marketplace