claude-hook-writer

Solid

Expert guidance for writing secure, reliable, and performant Claude Code hooks - validates design decisions, enforces best practices, and prevents common pitfalls. Use when creating, reviewing, or debugging Claude Code hooks.

AI & Automation 168 stars 27 forks Updated 4 weeks ago MIT

Install

View on GitHub

Quality Score: 89/100

Stars 20%
74
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Claude Hook Writer **Status**: Production Ready **Version**: 2.0.0 (Optimized with progressive disclosure) **Last Updated**: 2025-12-17 --- ## Overview Expert guidance for writing secure, reliable, and performant Claude Code hooks. This skill validates design decisions, enforces best practices, and prevents common pitfalls. --- ## When to Use This Skill - Designing a new Claude Code hook - Reviewing existing hook code - Debugging hook failures - Optimizing slow hooks - Securing hooks that handle sensitive data - Publishing hooks as PRPM packages --- ## Core Principles ### 1. Security is Non-Negotiable Hooks execute automatically with user permissions and can read, modify, or delete any file the user can access. **ALWAYS validate and sanitize all input.** Hooks receive JSON via stdin—never trust it blindly. **For complete security patterns**: Load `references/security-requirements.md` when implementing validation or securing hooks. ### 2. Reliability Over Features A hook that works 99% of the time is a broken hook. Edge cases (Unicode filenames, spaces in paths, missing tools) will happen. **Test with edge cases before deploying.** **For reliability patterns**: Load `references/reliability-performance.md` when handling errors or edge cases. ### 3. Performance Matters Hooks block operations. A 5-second hook means Claude waits 5 seconds before continuing. **Keep hooks fast. Run heavy operations in background.** **For performance optimization**: Load `refer...

Details

Author
secondsky
Repository
secondsky/claude-skills
Created
7 months ago
Last Updated
4 weeks ago
Language
TypeScript
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category