enhance-hooks

Featured

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

AI & Automation 1,019 stars 117 forks Updated 1 weeks ago MIT

Install

View on GitHub

Quality Score: 93/100

Stars 20%
100
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
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
10 months ago
Last Updated
1 weeks ago
Language
JavaScript
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Listed

hook-development

Use for auditing, reviewing or debugging Claude Code hooks, and for questions about how they behave - a hook that never fires, fires on the wrong calls, or has its block, deny, allow, exit code 2 or additionalContext ignored; a check of the hooks in settings.json, hooks/hooks.json or skill and agent frontmatter before a release; the debug log; or how an event, matcher, if filter, handler type, exit code, JSON output, timeout or async hook works. Covers command, HTTP, MCP tool, prompt and agent hooks, workspace trust and mods in the same chain, checked against the current docs and the changelog for the installed version, with a config linter, a hook probe and a changelog script. Use it even when the user only pastes a hook or says it does nothing. Not for writing a new hook (writing-hooks), Git hooks, React hooks or webhooks.

1 Updated today
nerymurillohnd
AI & Automation Featured

eval-hooks

Audit Claude Code hooks defined in settings.json files for validity, performance safety, and correctness. Resolves each command against the filesystem, checks exit-code strategy for blocking hooks, flags missing timeouts, and reviews interactive vs async patterns. Use when setting up hooks for the first time, debugging a hook that never fires or hangs the agent, or doing a periodic hooks hygiene pass.

6,616 Updated today
FlorianBruniaux
AI & Automation Listed

custom-hooks

Create project-specific hook scripts and register them in settings.json. Extends the framework's enforcement layer.

10 Updated 2 weeks ago
joris887