Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Evaluate hook security, performance, and SDK compliance. Use for audits.
.claude/skills/athola-hooks-eval/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-03 | ✗→✓ | ▲ Improved | 203% | 0% |
| case-01 | ✗→✓ | ▲ Improved | 280% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 39% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 68% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 10% | 0% |
abstract:hook-authoring)abstract:skills-eval).claude/rules/ (use abstract:rules-eval)This skill provides a detailed framework for evaluating, auditing, and implementing Claude Code hooks across all scopes (plugin, project, global) and both JSON-based and programmatic (Python SDK) hooks.
| Component | Purpose | |-----------|---------| | Hook Types Reference | Complete SDK hook event types and signatures | | Evaluation Criteria | Scoring system and quality gates | | Security Patterns | Common vulnerabilities and mitigations | | Performance Benchmarks | Thresholds and optimization guidance |
pythonHookEvent = Literal[ "PreToolUse", # Before tool execution "PostToolUse", # After tool execution "UserPromptSubmit", # When user submits prompt "Stop", # When stopping execution "SubagentStop", # When a subagent stops "TeammateIdle", # When teammate agent becomes idle (2.1.33+) "TaskCompleted", # When a task finishes execution (2.1.33+) "PreCompact", # Before message compaction ]
Verification: Run the command with --help flag to verify availability.
Note: Python SDK does not support SessionStart, SessionEnd, or Notification hooks due to setup limitations. However, plugins can define SessionStart hooks via hooks.json using shell commands (e.g., leyline's detect-git-platform.sh).
Plugins can declare hooks via "hooks": "./hooks/hooks.json" in plugin.json. The evaluator validates:
pythonasync def my_hook( input_data: dict[str, Any], # Hook-specific input tool_use_id: str | None, # Tool ID (for tool hooks) context: HookContext, # Additional context ) -> dict[str, Any]: # Return decision/messages ...
Verification: Run the command with --help flag to verify availability.
pythonreturn { "hookSpecificOutput": { "hookEventName": "PreToolUse", # Match hook type "permissionDecision": "deny", # Optional: block action "permissionDecisionReason": "...", # Reason for denial "additionalContext": "...", # Optional: context added } }
Verification: Run the command with --help flag to verify availability.
| Category | Points | Focus | |----------|--------|-------| | Security | 30 | Vulnerabilities, injection, validation | | Performance | 25 | Execution time, memory, I/O | | Compliance | 20 | Structure, documentation, error handling | | Reliability | 15 | Timeouts, idempotency, degradation | | Maintainability | 10 | Code structure, modularity |
modules/sdk-hook-types.md for complete Python SDK type definitions, patterns, and examplesmodules/evaluation-criteria.md for detailed scoring rubric and quality gatesmodules/sdk-hook-types.md for vulnerability detection and mitigationmodules/evaluation-criteria.md for benchmarking and optimizationbash# 1. Run detailed evaluation /hooks-eval --detailed # 2. Focus on security issues /hooks-eval --security-only --format sarif # 3. Benchmark performance /hooks-eval --performance-baseline # 4. Check compliance /hooks-eval --compliance-report
Verification: Run the command with --help flag to verify availability.
bash# Complete plugin evaluation pipeline /hooks-eval --detailed # Evaluate all hooks /analyze-hook hooks/specific.py # Deep-dive on one hook /validate-plugin . # Validate overall structure
Verification: Run the command with --help flag to verify availability.
abstract:hook-scope-guide - Decide where to place hooks (plugin/project/global)abstract:hook-authoring - Write hook rules and patternsabstract:validate-plugin - Validate complete plugin structureHook not firing Verify hook pattern matches the event. Check hook logs for errors
Syntax errors Validate JSON/Python syntax before deployment
Permission denied Check hook file permissions and ownership
categories: Security (30), Performance (25), Compliance (20), Reliability (15), Maintainability (10).
the evaluation report is returned.
hooks.json are verified to exist and be executable; missingscripts are listed as FAIL findings.
and applies the correct signature expectations for each type.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-03 | fail→pass | 16,177 | 18,740 | +16% | 1 | 1 | 0% | 1,162 | 3,526 | +203% | 0 | 0 | — |
case-01 | fail→pass | 9,271 | 23,561 | +154% | 1 | 1 | 0% | 1,031 | 3,914 | +280% | 0 | 0 | — |
case-02 | fail→pass | 18,861 | 18,743 | -1% | 1 | 1 | 0% | 2,325 | 3,228 | +39% | 0 | 0 | — |
case-04 | fail→pass | 31,280 | 3,136 | -90% | 1 | 1 | 0% | 1,192 | 2,002 | +68% | 0 | 0 | — |
case-05 | pass→pass | 12,597 | 7,240 | -43% | 1 | 1 | 0% | 1,784 | 2,102 | +18% | 0 | 0 | — |
case-06 | fail→pass | 17,068 | 6,667 | -61% | 1 | 1 | 0% | 2,419 | 2,672 | +10% | 0 | 0 | — |
case-07 | fail→pass | 13,803 | 4,387 | -68% | 1 | 1 | 0% | 2,310 | 2,204 | -5% | 0 | 0 | — |
case-08 | fail→pass | 23,051 | 5,208 | -77% | 1 | 1 | 0% | 1,197 | 2,388 | +99% | 0 | 0 | — |
case-09 | fail→pass | 12,257 | 4,040 | -67% | 1 | 1 | 0% | 2,163 | 2,019 | -7% | 0 | 0 | — |
case-10 | fail→pass | 13,821 | 2,405 | -83% | 1 | 1 | 0% | 2,016 | 1,865 | -7% | 0 | 0 | — |
case-11 | pass→pass | 10,842 | 4,575 | -58% | 1 | 1 | 0% | 1,656 | 2,224 | +34% | 0 | 0 | — |
case-12 | fail→pass | 7,875 | 3,333 | -58% | 1 | 1 | 0% | 1,322 | 2,055 | +55% | 0 | 0 | — |
case-13 | pass→pass | 9,690 | 2,662 | -73% | 1 | 1 | 0% | 1,378 | 1,901 | +38% | 0 | 0 | — |
case-14 | fail→pass | 15,487 | 13,750 | -11% | 1 | 1 | 0% | 2,142 | 3,737 | +74% | 0 | 0 | — |
case-15 | fail→fail | 19,199 | 13,515 | -30% | 1 | 1 | 0% | 3,427 | 3,884 | +13% | 0 | 0 | — |
case-16 | fail→fail | 5,952 | 3,333 | -44% | 1 | 1 | 0% | 934 | 1,849 | +98% | 0 | 0 | — |
case-17 | fail→pass | 13,155 | 2,761 | -79% | 1 | 1 | 0% | 2,127 | 1,929 | -9% | 0 | 0 | — |
case-18 | pass→pass | 15,289 | 2,004 | -87% | 1 | 1 | 0% | 2,249 | 1,795 | -20% | 0 | 0 | — |
case-19 | fail→pass | 6,121 | 4,729 | -23% | 1 | 1 | 0% | 934 | 1,918 | +105% | 0 | 0 | — |
case-20 | fail→pass | 10,517 | 2,753 | -74% | 1 | 1 | 0% | 1,595 | 1,830 | +15% | 0 | 0 | — |
case-21 | fail→pass | 10,128 | 3,408 | -66% | 1 | 1 | 0% | 1,671 | 2,048 | +23% | 0 | 0 | — |
case-22 | fail→pass | 8,448 | 2,391 | -72% | 1 | 1 | 0% | 1,243 | 1,845 | +48% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted, and 20 counted toward the lift figure. The other 2 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +73 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.