
Claude Hook Writer
- 196 repo stars
- Updated July 25, 2026
- secondsky/claude-skills
Write secure, reliable Claude Code hooks with best-practice validation and pitfall prevention.
About
This skill gives expert guidance for writing secure, reliable, and performant Claude Code hooks, validating design decisions and enforcing best practices. A developer uses it when creating, reviewing, or debugging hooks to extend or guard their Claude Code agent workflow.
- Expert Claude Code hook guidance
- Validates design decisions
- Enforces security best practices
- Prevents common pitfalls
Claude Hook Writer by the numbers
- Data as of Jul 28, 2026 (Skillselion catalog sync)
/plugin marketplace add secondsky/claude-skills/plugin install claude-hook-writer@claude-skillsAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| repo stars | ★ 196 |
|---|---|
| Last updated | July 25, 2026 |
| Repository | secondsky/claude-skills ↗ |
What it does
Write secure, reliable Claude Code hooks with best-practice validation and pitfall prevention.
README.md
Claude Hook Writer Skill
Production-ready skill for writing secure, reliable, and performant Claude Code hooks.
Auto-Trigger Keywords
- Claude Code hooks
- hook writer
- PreToolUse hook
- PostToolUse hook
- UserPromptSubmit hook
- SessionStart hook
- hook security
- hook validation
- PRPM package
- bash hook
- hook configuration
- hook testing
When to Use
- Creating new Claude Code hooks
- Reviewing hook code for security issues
- Debugging hook failures
- Optimizing slow hooks
- Publishing hooks as PRPM packages
- Understanding hook exit codes and behavior
Key Features
- Security Requirements: Input validation, path sanitization, sensitive file protection
- Reliability Patterns: Handle missing dependencies, set timeouts, log properly
- Performance Guidelines: Keep hooks fast, use specific matchers, dedupe operations
- Code Templates: Format on save, block sensitive files, command logger, security hooks
- Testing Strategies: Manual testing, edge cases, integration testing
- PRPM Publishing: Package structure, configuration, advanced options
Common Pitfalls Covered
- Not quoting variables (breaks on spaces)
- Trusting input without validation
- Blocking operations too long
- Using wrong exit codes
- Logging to stdout instead of stderr
- Assuming tools exist
Source
Adapted from PRPM claude-hook-writer
License
MIT