meta-hook-creator
Hook Creator
Overview
Claude Code hooks are user-defined shell commands, LLM prompts, or agent evaluations that execute automatically at specific lifecycle points. Hooks receive JSON context via stdin, take action, and communicate results through exit codes, stdout, and stderr.
When to use: Blocking dangerous commands, auto-formatting after writes, protecting sensitive files, custom notifications, environment setup, enforcing project conventions, auto-approving safe tools, running tests after changes.
When NOT to use: Static context injection (use CLAUDE.md), simple permission rules (use allowlist settings), one-time setup (use shell scripts directly).
Quick Reference
| Pattern | Event | Matcher | Key Points |
|---|---|---|---|
| Block tool call | PreToolUse |
Tool name | Exit 2 or JSON permissionDecision: "deny" |
| Auto-approve tool | PreToolUse |
Tool name | JSON permissionDecision: "allow" |
| Modify tool input | PreToolUse |
Tool name | JSON updatedInput with modified parameters |
| Format after write | PostToolUse |
Write|Edit |
Run formatter, exit 0 |
| Log tool failures | PostToolUseFailure |
Tool name | Fires when tool throws error or returns failure |
More from oakoss/agent-skills
playwright
|
200ui-ux-polish
Iterative UI/UX polishing workflow for web applications. Use when improving visual polish, refining desktop and mobile UX separately, running iterative enhancement cycles, applying design patterns like glassmorphism or bento grids, or auditing accessibility and WCAG compliance. Use for Stripe-level visual quality, responsive optimization, and design system alignment.
153find-skills
|
119knowledge-graph-builder
>
101tailwind
Tailwind CSS v4 patterns and design systems. Use when configuring Tailwind themes, building components, implementing dark mode, using container queries, migrating from v3, integrating shadcn/ui, or fixing build errors. Use for tailwind, css, styling, theme, design-tokens.
85pnpm-workspace
pnpm workspace monorepo management with filtering, catalogs, and shared configs. Use when setting up monorepos, managing workspace dependencies, filtering package commands, or sharing configuration across packages.
78