用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/athola/claude-night-market --skill hooks-eval命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Turn hunches into accepted results: worthiness score, evidence bar, research-to-rules. Use when vetting ideas. Not for QA; use night-market-validation-and-qa.
Generates and self-executes a diff-derived test plan for a PR. Use when validating PR changes before merge. Do not use for code review; use sanctum:pr-review.
Curate the web-capture index. Use when the capture backlog grows, captures sit unprocessed at seedling/pending, or to surface stored research during work.
正在显示 SKILL.md
基于 SOC 职业分类
| 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 |
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 |
HookEvent = [
,
,
,
,
,
,
,
]
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 |
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 optimization# 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.
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
hooks.json are verified to exist and be executable; missing
scripts are listed as FAIL findings.