claude-code-plugin-ref…
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops;…
Evaluate hook security, performance, and SDK compliance. Use for audits.
Claude Code
$ npx -y skills add athola/claude-night-market --skill hooks-eval --agent claude-code
Codex
$ npx skills add athola/claude-night-market --skill hooks-eval -a codex -y
Cursor
$ npx skills add athola/claude-night-market --skill hooks-eval -a cursor -y
Gemini CLI
$ npx skills add athola/claude-night-market --skill hooks-eval -a gemini-cli -y
GitHub Copilot
$ npx skills add athola/claude-night-market --skill hooks-eval -a github-copilot -y
OpenCode
$ npx skills add athola/claude-night-market --skill hooks-eval -a opencode -y
Windsurf
$ npx skills add athola/claude-night-market --skill hooks-eval -a windsurf -y
name: hooks-eval description: 'Evaluate hook security, performance, and SDK compliance. Use for audits.' alwaysApply: false category: hook-management tags: - hooks - evaluation - security - performance - claude-sdk - agent-sdk dependencies: - hook-scope-guide provides: infrastructure: - hook-evaluation - security-scanning - performance-analysis patterns: - hook-auditing - sdk-integration - compliance-checking sdk_features: - python-sdk-hooks - hook-callbacks - hook-matchers estimated_tokens: 1200 modules: - modules/evaluation-criteria.md - modules/sdk-hook-types.md role: entrypoint
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 |
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
]**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:
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
...return {
"hookSpecificOutput": {
"hookEventName": "PreToolUse", # Match hook type
"permissionDecision": "deny", # Optional: block action
"permissionDecisionReason": "...", # Reason for denial
"additionalContext": "...", # Optional: context added
}
}| 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 |
# 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
# 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
**Hook not firing** Verify hook pattern matches the event. Check hook logs for errors
**Syntax errors** Run `python3 plugins/abstract/scripts/hook_validator.py hooks/hooks.json` (or a Python hook file) before deployment. It parses the file and reports structure and SDK-signature problems.
**Permission denied** Check hook file permissions and ownership
categories: Security (30), Performance (25), Compliance (20), Reliability (15), Maintainability (10).
the evaluation report is returned.
scripts are listed as FAIL findings.
and ap
A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.
Explain plugin, skill, command, agent, and hook mechanics used here. Use when authoring or debugging plugins. Do not use for ops;…
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use…
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily…
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use…
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled…
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use…
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…
Ask which skill or flow fits your situation. A router over the skills in this repo.