LogoClawIndex
CasesSkillsAbout
LogoClawIndex

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-25

Capabilities

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

Source

  • Spec: SKILL.md

ClawIndex

OpenClaw Skills & Use Case Index

ClawIndex is an ecosystem-driven index of OpenClaw skills and real-world use cases.

Index

Skills·
Cases

Meta

About·
Disclaimer·
Email·
GitHub
© 2026 ClawIndex All Rights Reserved.
hooks
shell scripting
path security
JSON protocol
Claude Code
tool guards
Author standalone hook scripts
Handle hook event types
Enforce exit code contracts
Read and emit hook JSON
Hook event JSON
Tool input data
Filesystem paths
JSON on stdout
Messages on stderr
Hook exit status