Setting the file. One moment. Claude Hook Backed · Skill Writer · getsentry/skills · Skills Docs
Load this when the skill uses Claude Code hooks for deterministic enforcement around tool or lifecycle events.
23.10
Example Hook Backed Skill
- pre-tool validation for risky commands
- post-edit formatting or linting
- scoped guardrails around specific tool events
- Narrow event and matcher scope.
- Explicit side-effect boundaries.
- Fallback behavior when hooks are unavailable.
- Security note for shell execution, path handling, and sensitive files.
- Command hooks run with full user permissions.
- Validate and sanitize inputs.
- Use absolute paths for scripts inside the hook definition.
- Avoid sensitive files such as
.env, .git/, and keys.
- Test hooks before treating them as trusted enforcement.
Async hooks cannot block the action that triggered them; they are not a substitute for synchronous validation.
references/claude-hook-backed.md