<< All versions
Skill v1.0.0
currentAutomated scan100/100vibeeval/vibecosystem/mot
──Details
PublishedApril 29, 2026 at 10:14 PM
Content Hashsha256:996bab29f5c3205a...
Git SHA6172d4ac24fc
──Files
Files (1 file, 7.2 KB)
SKILL.md7.2 KBactive
SKILL.md · 268 lines · 7.2 KB
version: "1.0.0"
name: mot description: System health check (MOT) for skills, agents, hooks, and memory model: sonnet allowed-tools: [Read, Bash, Glob, Grep]
MOT - System Health Check
Run comprehensive health checks on all Claude Code components.
Usage
/mot # Full audit (all categories)/mot skills # Just skills/mot agents # Just agents/mot hooks # Just hooks/mot memory # Just memory system/mot --fix # Auto-fix simple issues/mot --quick # P0 checks only (fast)
Audit Process
Phase 1: Skills Audit
bash
# Count skillsecho "=== SKILLS ==="SKILL_COUNT=$(find .claude/skills -name "SKILL.md" | wc -l | xargs)echo "Found $SKILL_COUNT skill files"# Check frontmatter parsingFAIL=0for skill in $(find .claude/skills -name "SKILL.md"); doif ! head -1 "$skill" | grep -q "^---$"; thenecho "FAIL: No frontmatter: $skill"FAIL=$((FAIL+1))fidoneecho "Frontmatter: $((SKILL_COUNT - FAIL)) pass, $FAIL fail"# Check name matches directoryFAIL=0for skill in $(find .claude/skills -name "SKILL.md"); dodir=$(basename $(dirname "$skill"))name=$(grep "^name:" "$skill" 2>/dev/null | head -1 | cut -d: -f2 | xargs)if [ -n "$name" ] && [ "$dir" != "$name" ]; thenecho "FAIL: Name mismatch $dir vs $name"FAIL=$((FAIL+1))fidoneecho "Name consistency: $((SKILL_COUNT - FAIL)) pass, $FAIL fail"
Phase 2: Agents Audit
bash
echo "=== AGENTS ==="AGENT_COUNT=$(ls .claude/agents/*.md 2>/dev/null | wc -l | xargs)echo "Found $AGENT_COUNT agent files"# Check required fieldsFAIL=0for agent in .claude/agents/*.md; do[ -f "$agent" ] || continue# Check name field existsif ! grep -q "^name:" "$agent"; thenecho "FAIL: Missing name: $agent"FAIL=$((FAIL+1))continuefi# Check model is validmodel=$(grep "^model:" "$agent" | head -1 | cut -d: -f2 | xargs)case "$model" inopus|sonnet|haiku) ;;*) echo "FAIL: Invalid model '$model': $agent"; FAIL=$((FAIL+1)) ;;esacdoneecho "Agent validation: $((AGENT_COUNT - FAIL)) pass, $FAIL fail"# Check for dangling references (agents that reference non-existent agents)echo "Checking agent cross-references..."for agent in .claude/agents/*.md; do[ -f "$agent" ] || continue# Find subagent_type referencesrefs=$(grep -oE 'subagent_type[=:]["'\'']*([a-z-]+)' "$agent" 2>/dev/null | sed 's/.*["'\'']//' | sed 's/["'\'']$//')for ref in $refs; doif [ ! -f ".claude/agents/$ref.md" ]; thenecho "WARN: $agent references non-existent agent: $ref"fidonedone
Phase 3: Hooks Audit
bash
echo "=== HOOKS ==="# Check TypeScript source countTS_COUNT=$(ls .claude/hooks/src/*.ts 2>/dev/null | wc -l | xargs)echo "Found $TS_COUNT TypeScript source files"# Check bundles existBUNDLE_COUNT=$(ls .claude/hooks/dist/*.mjs 2>/dev/null | wc -l | xargs)echo "Found $BUNDLE_COUNT built bundles"# Check shell wrappers are executableFAIL=0for sh in .claude/hooks/*.sh; do[ -f "$sh" ] || continueif [ ! -x "$sh" ]; thenecho "FAIL: Not executable: $sh"FAIL=$((FAIL+1))fidoneSH_COUNT=$(ls .claude/hooks/*.sh 2>/dev/null | wc -l | xargs)echo "Shell wrappers: $((SH_COUNT - FAIL)) executable, $FAIL need chmod +x"# Check hooks registered in settings.json existecho "Checking registered hooks..."FAIL=0# Extract hook commands from settings.json and verify files existgrep -oE '"command":\s*"[^"]*\.sh"' .claude/settings.json 2>/dev/null | \sed 's/.*"\([^"]*\.sh\)".*/\1/' | \sed 's|\$CLAUDE_PROJECT_DIR|.claude|g' | \sed "s|\$HOME|$HOME|g" | \sort -u | while read hook; do# Resolve to actual pathresolved=$(echo "$hook" | sed 's|^\./||')if [ ! -f "$resolved" ] && [ ! -f "./$resolved" ]; thenecho "WARN: Registered hook not found: $hook"fidone
Phase 4: Memory Audit
bash
echo "=== MEMORY SYSTEM ==="# Check DATABASE_URLif [ -z "$DATABASE_URL" ]; thenecho "FAIL: DATABASE_URL not set"elseecho "PASS: DATABASE_URL is set"# Test connectionif psql "$DATABASE_URL" -c "SELECT 1" > /dev/null 2>&1; thenecho "PASS: PostgreSQL reachable"# Check pgvectorif psql "$DATABASE_URL" -c "SELECT extname FROM pg_extension WHERE extname='vector'" 2>/dev/null | grep -q vector; thenecho "PASS: pgvector extension installed"elseecho "FAIL: pgvector extension not installed"fi# Check table existsif psql "$DATABASE_URL" -c "\d archival_memory" > /dev/null 2>&1; thenecho "PASS: archival_memory table exists"# Count learningsCOUNT=$(psql "$DATABASE_URL" -t -c "SELECT COUNT(*) FROM archival_memory" 2>/dev/null | xargs)echo "INFO: $COUNT learnings stored"elseecho "FAIL: archival_memory table missing"fielseecho "FAIL: PostgreSQL not reachable"fifi# Check Python dependenciesecho "Checking Python dependencies..."(cd opc && uv run python -c "import psycopg2; import pgvector; import sentence_transformers" 2>/dev/null) && \echo "PASS: Python dependencies available" || \echo "WARN: Some Python dependencies missing"
Phase 5: Cross-Reference Audit
bash
echo "=== CROSS-REFERENCES ==="# Check skills reference valid agentsecho "Checking skill → agent references..."FAIL=0for skill in $(find .claude/skills -name "SKILL.md"); dorefs=$(grep -oE 'subagent_type[=:]["'\'']*([a-z-]+)' "$skill" 2>/dev/null | sed 's/.*["'\'']//' | sed 's/["'\'']$//')for ref in $refs; doif [ -n "$ref" ] && [ ! -f ".claude/agents/$ref.md" ]; thenecho "FAIL: $skill references missing agent: $ref"FAIL=$((FAIL+1))fidonedoneecho "Skill→Agent refs: $FAIL broken"
Auto-Fix (--fix flag)
If --fix is specified, automatically fix:
- Make shell wrappers executable
``bash
chmod +x .claude/hooks/*.sh
``
- Rebuild hooks if TypeScript newer than bundles
``bash
cd .claude/hooks && npm run build
``
- Create missing cache directories
``bash
mkdir -p .claude/cache/agents/{scout,kraken,oracle,spark}
mkdir -p .claude/cache/mot
``
Output Format
Write full report to .claude/cache/mot/report-{timestamp}.md:
markdown
# MOT Health ReportGenerated: {timestamp}## Summary| Category | Pass | Fail | Warn ||----------|------|------|------|| Skills | 204 | 2 | 0 || Agents | 47 | 1 | 3 || Hooks | 58 | 2 | 1 || Memory | 4 | 0 | 1 || X-Refs | 0 | 0 | 2 |## Issues Found### P0 - Critical-[FAIL] Hook build failed: tldr-context-inject.ts### P1 - High-[FAIL] Agent references missing: scot → scout (typo)### P2 - Medium-[WARN] 3 hooks need rebuild (dist older than src)### P3 - Low-[INFO] VOYAGE_API_KEY not set (using local BGE)
Exit Codes
0- All P0/P1 checks pass1- Any P0/P1 failure2- Only P2/P3 warnings
Quick Mode (--quick)
Only run P0 checks:
- Frontmatter parses
- Hooks build
- Shell wrappers executable
- PostgreSQL reachable