enhance-hooks

Featured

Use when reviewing hooks for safety, timeouts, and correct frontmatter.

AI & Automation 967 stars 111 forks Updated 4 days ago MIT

Install

View on GitHub

Quality Score: 96/100

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

Skill Content

# enhance-hooks Analyze hook definitions and scripts for safety, correctness, and best practices. ## Parse Arguments ```javascript const args = '$ARGUMENTS'.split(' ').filter(Boolean); const targetPath = args.find(a => !a.startsWith('--')) || '.'; const fix = args.includes('--fix'); ``` ## Workflow 1. **Discover** - Find hook files (.md, .sh, .json) 2. **Classify** - Identify hook type and event 3. **Parse** - Extract frontmatter and script content 4. **Check** - Run all pattern checks against knowledge below 5. **Filter** - Apply certainty filtering 6. **Report** - Generate markdown output 7. **Fix** - Apply auto-fixes if --fix flag present --- ## Hook Knowledge Reference ### What Are Hooks Hooks are automated actions triggered at specific points in a Claude Code session. They enable validation, monitoring, and control of Claude's actions through bash commands or LLM-based evaluation. ### Hook Lifecycle (Complete Reference) Hooks fire in this sequence: | Order | Event | Description | Matcher Required | |-------|-------|-------------|------------------| | 1 | `SessionStart` | Session begins or resumes | No | | 2 | `UserPromptSubmit` | User submits a prompt | No | | 3 | `PreToolUse` | Before tool execution (can modify/block) | Yes | | 4 | `PermissionRequest` | When permission dialog appears | Yes | | 5 | `PostToolUse` | After tool succeeds | Yes | | 6 | `SubagentStart` | When spawning a subagent | No | | 7 | `SubagentStop` | When subagent finishes | No | | 8 | `Sto...

Details

Author
agent-sh
Repository
agent-sh/agentsys
Created
7 months ago
Last Updated
4 days ago
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category