hook-authoring - Author and validate standalone hook scripts
Defines conventions for authoring hook scripts, handling hook events, enforcing exit-code and JSON contracts, and protecting paths from traversal.
Tags
Updated: 2026-11-25Capabilities
Typical Inputs
Typical Outputs
What this skill does
- Author standalone hook scripts
- Handle hook event types
- Enforce exit code contracts
- Read and emit hook JSON
- Normalize filesystem paths
- Extract shell target paths
- Protect paths from traversal
Inputs
- Hook event JSON
- Tool input data
- Filesystem paths
- Bash commands
- PowerShell commands
- Git worktree registry
Outputs
- JSON on stdout
- Messages on stderr
- Hook exit status
- Protected-path decisions
Requirements
- Claude Code hook runtime
- Standalone script execution
- JSON stdin support
- Filesystem access
- Git worktree registry access
