Agent skill
health-report
Run a health check of the AI Harness system. Checks bot status, database, heartbeat tasks, and vault consistency.
Install this agent skill to your Project
npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/other/other/health-report
SKILL.md
Health Report
Run a health check of the AI Harness system.
Live System State
!ps aux | grep -E "(bot\.ts|heartbeat-runner|claude)" | grep -v grep 2>/dev/null || echo "(no processes)"
!launchctl list | grep com.aiharness 2>/dev/null || echo "(no launchd agents)"
!ls -lh bridges/discord/harness.db 2>/dev/null || echo "(no database)"
!tail -3 heartbeat-tasks/logs/*.log 2>/dev/null | head -20 || echo "(no logs)"
Check Modules
Parse $ARGUMENTS to determine scope. Default is full (all checks).
Bot Check (bot or full)
- Check if bot process is running: look for
bot.tsin process list (from live state above) - Check PID file:
bridges/discord/.bot.pid— does it exist? Is the PID alive? - Check database exists and is readable:
bridges/discord/harness.db - Report: running/stopped, PID, uptime estimate
Database Check (db or full)
- Check
harness.dbexists and size - Run
sqlite3 harness.db "SELECT name FROM sqlite_master WHERE type='table'"to verify schema - Check WAL file:
harness.db-walexistence and size - Count rows in key tables: sessions, channel_configs, task_queue, dead_letter
- Report: table counts, file size, WAL status
Heartbeat Check (heartbeat or full)
- List LaunchAgent plists:
~/Library/LaunchAgents/com.aiharness.heartbeat.*.plist - For each, check if loaded in launchctl (from live state above)
- Read state files:
heartbeat-tasks/*.state.json— check last_run, consecutive_failures - Flag any tasks with consecutive_failures > 0
- Report: task name, status (loaded/unloaded), last run, failures
Vault Check (vault or full)
- Count files in
vault/learnings/by type prefix (LRN/ERR/FEAT) - Check for orphaned wikilinks: grep for
[[references and verify targets exist - Check for entries missing required frontmatter fields
- Count entries by status
- Report: file counts, any issues found
Truncation Check (truncation or full)
- Read
context-log/truncation-stats.jsonif it exists - Report: events by source, average % lost, critical count
- Flag any sources with critical truncation events
- Read last 10 lines of
context-log/truncation-events.jsonlfor recent events - Report: worst truncation sources, whether structure damage occurred
Quick Check (quick)
Run only: bot process alive? Database exists? Any heartbeat failures? One-line summary.
Output Format
=== AI Harness Health Report ===
Bot: RUNNING (PID 12345)
Database: OK (harness.db, 256KB, 5 tables)
Heartbeat: 2/2 tasks loaded, 0 failures
Vault: 42 learnings (38 resolved), 0 issues
Truncation: 15 events, 0 critical, avg 12% lost
Overall: HEALTHY
For issues, add a ⚠ Issues section listing each problem and suggested fix.
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
agent-ops-spec
Manage specification documents in .agent/specs/. Use when user provides requirements, acceptance criteria, or feature descriptions that need to be tracked and validated against implementation.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-testing
Test strategy, execution, and coverage analysis. Use when designing tests, running test suites, or analyzing test results beyond baseline checks.
agent-ops-state
Maintain .agent state files. Use at session start, after meaningful steps, and before concluding: read/update constitution/memory/focus/issues/baseline consistently.
Didn't find tool you were looking for?