enhance-hooks

Validate Claude Code hooks for safety, timeouts, and frontmatter.

951|110|Updated Jan 15, 2026
One-click install
npx skills add https://github.com/avifenesh/awesome-slash --skill enhance-hooks
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: enhance-hooks
Source: https://github.com/avifenesh/awesome-slash/tree/main/plugins/enhance/skills/enhance-hooks
Command: npx skills add https://github.com/avifenesh/awesome-slash --skill enhance-hooks

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Hook definitions in Claude Code often lack safety checks, timeouts, or proper frontmatter, risking unsafe automation and misconfigurations.

Core Features & Use Cases

  • Discover and classify hook files (.md, .sh, .json)
  • Validate frontmatter (name, description, timeout) and ensure correct hook types
  • Analyze hook events (PreToolUse, PostToolUse, Stop, SubagentStop) for appropriate usage
  • Generate a structured report and propose safe fixes to improve reliability

Quick Start

Review your project's hook definitions to verify safety, timeouts, and correct frontmatter.

Frequently Asked Questions about enhance-hooks

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate Claude Code hooks for safety and correct timeout configuration?

Use hook analysis to scan .md, .sh, and .json files for correct frontmatter, validate timeout settings, verify proper exit codes, and ensure appropriate event usage across PreToolUse, PostToolUse, Stop, and SubagentStop.

What is a Claude Code hook analysis and when do I need it?

Hook analysis is a validation process that audits hook definitions for safety risks and misconfigurations. You need it when your project's hooks lack proper safety checks, timeouts, or correct frontmatter metadata to prevent unsafe automation.

How do I check if my PreToolUse and PostToolUse hooks have proper frontmatter?

Analyze hook files to validate the presence and correctness of name, description, and timeout fields within the frontmatter, ensuring the metadata matches the correct hook types specified for PreToolUse and PostToolUse events.

Does Claude Code hook validation support shell scripts and JSON configurations?

Yes, Claude Code hook validation supports discovering and classifying hook files across multiple formats including .sh shell scripts, .json configurations, and .md files to identify potential misconfigurations and ensure script safety.

Why do my Claude Code hooks keep failing due to misconfigurations?

Claude Code hooks often fail due to missing frontmatter, incorrect exit codes, or improper timeout settings. A structured hook analysis can identify these exact misconfigurations and provide actionable remediation guidance.