Agent skill · software engineering · aiskillstore
creating-claude-hooks
Use when creating or publishing Claude Code hooks - covers executable format, event types, JSON I/O, exit codes, security requirements, and PRPM package structure
Why this skill is useful
Adds detailed executable requirements and JSON I/O patterns for creating Claude Code hooks that aren't in public documentation.
What it needs
Requires jq installed locally. About 6k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.
What this skill does
Creating Claude Code Hooks Use this skill when creating, improving, or publishing Claude Code hooks. Provides essential guidance on hook format, event handling, I/O conventions, and package structure. When to Use This Skill Activate this skill when: User asks to create a new Claude Code hook User wants to publish a hook as a PRPM package User needs to understand hook format or events User is troubleshooting hook execution User asks about hook vs skill vs command differences Quick Reference Hook File Format Aspect Requirement --------------- ------------------------------------------------- Location .claude/hooks/<event-name> Format Executable file (shell, TypeScript, Python, etc.) Permissions Must be executable (chmod +x) Shebang Required (#!/bin/bash or #!/usr/bin/env node) Input JSON via stdin Output Text via stdout (shown to user) Exit Codes 0 = success, 2 = block, other = error Available Events Event When It Fires Common Use Cases -------------------- --------------------------- ---------------------------------------- session-start New session begins Environment setup, logging, checks user-prompt-submit Before user input processes Validation, enhancement, filtering tool-call Before tool execution Permission checks, logging, modification assistant-response After assistant responds Formatting, logging, cleanup Hook Format Requirements File Location Project hooks: User-global hooks: Executable Requirements Every hook MUST: 1. Have a shebang line: 2. Be executable: 3. Handle JSON input from stdin: 4. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills aiskillstore/creating-claude-hooks