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; use night-market-operations.
Evaluate hook security, performance, and SDK compliance. Use for audits.
$ npx -y skills add athola/claude-night-market --skill hooks-eval --agent claude-codeHow it fires
How this skill gets triggered: by you, by Claude, or both.
/hooks-evalContext preview
The summary Claude sees to decide when to auto-load this skill.
Evaluate hook security, performance, and SDK compliance. Use for audits.
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 model_hint: standard 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
]**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:
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 {
"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 |
# 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.
# 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.
##
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; use night-market-operations.
States load-bearing decisions, invariants, and weak points. Use when judging a design change. Do not use for gating; use night-market-change-control.
Rebuild the dev environment: uv, Python tiers, pins, traps. Use when onboarding or toolchain breaks. Do not use for daily commands; use night-market-operations.
Classify, gate, and review changes. Use when landing a PR, releasing, or amending rules. Do not use for failure triage; use night-market-debugging-playbook.
Search and record project memory (Discussions, journal, ADRs). Use before re-investigating anything. Do not use for settled battles; see failure-archaeology.
Bind loop 'done' to unfakeable gates. Use to harden egregore/herald loops or promote completion_integrity. Not for QA gates; use night-market-validation-and-qa.