plugins/claude-code-observability/skills/hook-schema-audit/SKILL.md
Audit hook event schema for drift. Compares implementation against official docs.
npx skillsauth add melodic-software/claude-code-plugins hook-schema-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Detect drift between the hook dispatcher's EVENT_FIELD_REGISTRY and official Claude Code documentation.
--fix: Generate updated registry code (output only, does not auto-apply)--json: Machine-readable JSON output for CI/automation--verbose: Show all fields, not just differencesLoad the hook-management skill and query for official hook event schemas:
Skill(hook-management)
Also spawn the claude-code-guide agent for live web documentation:
Task(claude-code-guide, "WebFetch https://code.claude.com/docs/en/claude_code_docs_map.md to find hook event documentation pages. Then WebFetch those pages. Extract the input fields for each hook event: PreToolUse, PostToolUse, PostToolUseFailure, PermissionRequest, Notification, UserPromptSubmit, Stop, SubagentStart, SubagentStop, PreCompact, SessionStart, SessionEnd, TeammateIdle, TaskCompleted. Return structured data with event name and field lists.")
Read the EVENT_FIELD_REGISTRY from hook_dispatcher.py:
# Extract the registry definition
grep -A 30 "EVENT_FIELD_REGISTRY = {" plugins/claude-code-observability/hooks/hook_dispatcher.py
Parse the registry into a structured format for comparison.
For each hook event, compare:
EVENT_FIELD_REGISTRY)Generate a report showing:
| Event | Documented | Implemented | Missing | Extra | |-------|------------|-------------|---------|-------| | pretooluse | 5 | 3 | tool_input | - | | notification | 2 | 0 | message, notification_type | - |
Default output:
Hook Schema Audit Report
========================
Schema Version: 1.7.0
Audit Date: 2026-02-15T15:30:00Z
Coverage Summary:
- Total events: 14
- Fully covered: 11 (79%)
- Partially covered: 2 (14%)
- Missing: 1 (7%)
Findings:
[WARNING] notification: Missing fields: message, notification_type
[WARNING] userpromptsubmit: Missing fields: prompt
[OK] pretooluse: All documented fields present
...
Recommendation: Update EVENT_FIELD_REGISTRY to include missing fields.
With --json:
{
"schema_version": "1.7.0",
"audit_timestamp": "2026-02-15T15:30:00Z",
"coverage": {
"total_events": 14,
"fully_covered": 11,
"partially_covered": 2,
"missing": 1
},
"events": {
"pretooluse": {
"status": "ok",
"documented": ["tool_name", "tool_input", "tool_use_id"],
"implemented": ["tool_name", "tool_input", "tool_use_id"],
"missing": [],
"extra": []
}
}
}
With --fix:
Output updated Python code for EVENT_FIELD_REGISTRY that can be copy-pasted into hook_dispatcher.py.
Based on findings, provide actionable recommendations:
# Basic audit
/claude-code-observability:audit-hook-schema
# CI integration (machine-readable)
/claude-code-observability:audit-hook-schema --json
# Generate fix
/claude-code-observability:audit-hook-schema --fix
# Detailed output
/claude-code-observability:audit-hook-schema --verbose
When using --json:
0: All events fully covered1: Some fields missing (partial coverage)2: Critical drift detected (events missing entirely)development
Search Milan Jovanovic's .NET blog for Clean Architecture, DDD, CQRS, EF Core, and ASP.NET Core patterns. Use for finding applicable patterns, code examples, and architecture guidance. Invoke when working with .NET projects that could benefit from proven architectural patterns.
tools
Install and configure Data API Builder (DAB) for production SQL Server MCP access with RBAC
tools
Manage MssqlMcp servers - status, rebuild, and upstream updates
tools
Developer environment setup guides for Windows, macOS, Linux, and WSL. Use when setting up development machines, installing tools, configuring environments, or following platform-specific setup guides. Covers package management, shell/terminal, code editors, AI tooling, containerization, databases, and more.