Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
athola avatar

Hooks Eval

  • 92 installs
  • 325 repo stars
  • Updated August 2, 2026
  • athola/claude-night-market

hooks-eval is an agent skill that scores Claude Code hooks on a 100-point security-first rubric with explicit quality gates.

About

hooks-eval is a checker skill from the Claude Night Market skills-eval line that gives solo builders a repeatable way to grade Claude Code hooks before they go live. Instead of eyeballing a PreToolUse or PostToolUse script in chat, you run it through a 100-point Multi-Criteria Decision Analysis rubric where security carries the largest share—30 points of deductions for critical injection and eval issues down to low-severity leakage patterns. Performance is scored as its own 25-point pillar so slow or chatty hooks do not slip through on aesthetics alone. The readme ties scoring to normalized metrics and penalty-based aggregation so results stay comparable across repos. Use it when you are iterating agent-tooling under build, during ship-phase review or security hardening, or when you re-check hooks after config changes in operate. It is procedural knowledge packaged as evaluation criteria, not a hosted scanner—your agent applies the tables and gates locally against the hook source you provide.

  • 100-point MCDA scoring rubric with documented vector normalization and stakeholder-weight methodology
  • Security analysis block (30 points) with Critical −15, High −8, Medium −4, and Low −1 per finding
  • Performance analysis block (25 points) as a dedicated weighted criterion alongside security
  • Security checklist rows for dynamic eval with user input, command injection, unvalidated paths, and embedded secrets
  • Aligns with the night-market skills-eval multi-metric evaluation methodology and sensitivity analysis guidance

Hooks Eval by the numbers

  • 92 all-time installs (skills.sh)
  • Ranked #465 of 1,352 Code Review & Quality skills by installs in the Skillselion catalog
  • Security screen: LOW risk (skills.sh audit)
  • Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/athola/claude-night-market --skill hooks-eval

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs92
repo stars325
Security audit3 / 3 scanners passed
Last updatedAugust 2, 2026
Repositoryathola/claude-night-market

What it does

Score Claude Code hook scripts against a security-first 100-point rubric before you enable them in your agent loop.

Who is it for?

Best when you add Claude Code hooks and want MCDA-weighted security and performance review before enabling automation.

Skip if: Skip if you have no Claude Code hook lifecycle, or anyone and only needs generic app pen-testing unrelated to agent hook scripts.

When should I use this skill?

Use when evaluating Claude Code hook scripts for security vulnerabilities, performance risk, and overall quality gates before enabling or merging them.

What you get

You get a normalized score, categorized security deductions, and a clear pass/fail against quality gates so you can fix hooks or ship them with justified confidence.

  • Weighted hook score out of 100 with security and performance breakdown
  • Checklist-mapped findings with severity and point deductions
  • Pass/fail recommendation against documented quality gates

By the numbers

  • 100-point total scoring system
  • 30-point security analysis weight with per-severity deductions
  • 25-point performance analysis weight

Files

SKILL.mdMarkdownGitHub ↗

Table of Contents

Hooks Evaluation Framework

Overview

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.

Key Capabilities

  • Security Analysis: Vulnerability scanning, dangerous pattern detection, injection prevention
  • Performance Analysis: Execution time benchmarking, resource usage, optimization
  • Compliance Checking: Structure validation, documentation requirements, best practices
  • SDK Integration: Python SDK hook types, callbacks, matchers, and patterns

Core Components

ComponentPurpose
Hook Types ReferenceComplete SDK hook event types and signatures
Evaluation CriteriaScoring system and quality gates
Security PatternsCommon vulnerabilities and mitigations
Performance BenchmarksThresholds and optimization guidance

Quick Reference

Hook Event Types

HookEvent = 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).

Plugin-Level hooks.json

Plugins can declare hooks via "hooks": "./hooks/hooks.json" in plugin.json. The evaluator validates:

  • Referenced hooks.json exists and is valid JSON
  • Shell commands referenced in hooks exist and are executable
  • Hook matchers use valid event types

Hook Callback Signature

async 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.

Return Values

return {
    "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.

Quality Scoring (100 points)

CategoryPointsFocus
Security30Vulnerabilities, injection, validation
Performance25Execution time, memory, I/O
Compliance20Structure, documentation, error handling
Reliability15Timeouts, idempotency, degradation
Maintainability10Code structure, modularity

Detailed Resources

  • SDK Hook Types: See modules/sdk-hook-types.md for complete Python SDK type definitions, patterns, and examples
  • Evaluation Criteria: See modules/evaluation-criteria.md for detailed scoring rubric and quality gates
  • Security Patterns: See modules/sdk-hook-types.md for vulnerability detection and mitigation
  • Performance Guide: See modules/evaluation-criteria.md for benchmarking and optimization

Basic Evaluation Workflow

# 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.

Integration with Other Tools

# 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.

Related Skills

  • abstract:hook-scope-guide - Decide where to place hooks (plugin/project/global)
  • abstract:hook-authoring - Write hook rules and patterns
  • abstract:validate-plugin - Validate complete plugin structure

Troubleshooting

Common Issues

Hook 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

Related skills

How it compares

Use a structured hook rubric instead of one-off chat reviews that skip weighted security penalties and repeatable scoring.

FAQ

Who is hooks-eval for?

It is for developers and small teams shipping Claude Code agent hooks who need a documented scoring rubric—not a popularity list entry—before hooks touch real tool-use traffic.

When should I use hooks-eval?

Use it in Build—agent-tooling while authoring hooks, in Ship—security before merging hook changes, in Ship—review on PRs, and in Operate—iterate after you change paths, dependencies, or hook events; run it whenever a hook reads user input or runs shell commands.

Is hooks-eval safe to install?

Treat it as evaluation criteria your agent follows locally; review the Security Audits panel on this Prism page for the ingested package risk signals before enabling it in automated workflows.

Code Review & Qualityintegrationstesting

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.