Add validation hooks, best practices skill, and new commands to enforce NetBox data quality standards: Hooks: - SessionStart: Test NetBox connectivity, report data quality issues - PreToolUse: Validate VM/device parameters before create/update New Commands: - /cmdb-audit: Data quality analysis (vms, devices, naming, roles) - /cmdb-register: Register current machine with running applications - /cmdb-sync: Sync machine state with NetBox, detect drift Best Practices Skill: - Dependency order (regions -> sites -> devices -> VMs) - Site/tenant/platform assignment requirements - Naming conventions enforcement - Role consolidation guidance Updated agent with validation requirements, dependency order checks, naming convention warnings, and duplicate prevention. Marketplace: 5.0.0 -> 5.1.0 Plugin: 1.0.0 -> 1.1.0 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
1.4 KiB
Bash
Executable File
45 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
||
# Verify all hooks are command type (not prompt)
|
||
# Run this after any plugin update
|
||
|
||
echo "=== HOOK VERIFICATION ==="
|
||
echo ""
|
||
|
||
FAILED=0
|
||
|
||
# Check ALL hooks.json files in .claude directory
|
||
for f in $(find ~/.claude -name "hooks.json" 2>/dev/null); do
|
||
if grep -q '"type": "prompt"' "$f" || grep -q '"type":"prompt"' "$f"; then
|
||
echo "❌ PROMPT HOOK FOUND: $f"
|
||
FAILED=1
|
||
fi
|
||
done
|
||
|
||
# Note about cache (informational only - do NOT clear mid-session)
|
||
if [ -d ~/.claude/plugins/cache/leo-claude-mktplace ]; then
|
||
echo "ℹ️ Cache exists: ~/.claude/plugins/cache/leo-claude-mktplace"
|
||
echo " (This is normal - do NOT clear mid-session or MCP tools will break)"
|
||
echo " To apply plugin changes: restart Claude Code session"
|
||
fi
|
||
|
||
# Verify installed hooks are command type
|
||
for plugin in doc-guardian code-sentinel projman pr-review project-hygiene data-platform cmdb-assistant; do
|
||
HOOK_FILE=~/.claude/plugins/marketplaces/leo-claude-mktplace/plugins/$plugin/hooks/hooks.json
|
||
if [ -f "$HOOK_FILE" ]; then
|
||
if grep -q '"type": "command"' "$HOOK_FILE" || grep -q '"type":"command"' "$HOOK_FILE"; then
|
||
echo "✓ $plugin: command type"
|
||
else
|
||
echo "❌ $plugin: NOT command type"
|
||
FAILED=1
|
||
fi
|
||
fi
|
||
done
|
||
|
||
echo ""
|
||
if [ $FAILED -eq 0 ]; then
|
||
echo "✓ All hooks verified OK"
|
||
else
|
||
echo "❌ ISSUES FOUND - fix before using"
|
||
exit 1
|
||
fi
|