write-hook

Installation
SKILL.md

Hook Creator

Create hooks that enforce code quality through static analysis.

Core Principles

  1. Exit code 2 blocks - Use to prevent bad code from being written
  2. Fast checks only - Hooks run synchronously; keep under 5 seconds
  3. JSON stdin/stdout - Hooks receive context, can output structured responses
  4. Fail safe - Non-zero (except 2) continues execution with warning
  5. Use Python - Wrap shell commands in Python for cross-platform compatibility

Quick Start

Add a static check hook:

python3 scripts/add_hook.py <hook-name> --type <lint|format|typecheck|custom>
Installs
–
GitHub Stars
16
First Seen
–
write-hook — wayne930242/reflexive-claude-code