health-check
The health-check skill runs diagnostic tests on the Agent Monitor system, verifying API connectivity, database integrity, WebSocket functionality, endpoint availability, hook configuration, and data freshness. Use this skill to troubleshoot system issues, validate deployment configuration, or monitor ongoing operational status with options for quick connectivity checks or extended diagnostics including resource usage analysis.
git clone --depth 1 https://github.com/hoangsonww/Claude-Code-Agent-Monitor /tmp/health-check && cp -r /tmp/health-check/plugins/ccam-devtools/skills/health-check ~/.claude/skills/health-checkSKILL.md
# Health Check Run a comprehensive health check on the Agent Monitor system. ## Input The user provides: **$ARGUMENTS** This may be: - "full" or empty (default: run all checks) - "quick" for a fast connectivity check - "deep" for extended checks including database integrity ## Procedure Run health checks in this order: ### 1. API Health ```bash curl -sf http://localhost:4820/api/health ``` - Verify HTTP 200 response - Check response time (<500ms expected, <1000ms acceptable) - Confirm JSON response body ### 2. Database Health ```bash curl -sf http://localhost:4820/api/stats ``` - Verify stats endpoint returns valid data - Check that counts are non-negative integers - Verify database file exists and has reasonable size ### 3. WebSocket Health - Check that the WebSocket server is listening - Verify WebSocket upgrade is supported on the dashboard port ### 4. API Endpoint Validation Test each major endpoint: ```bash curl -sf http://localhost:4820/api/sessions?limit=1 curl -sf http://localhost:4820/api/events?limit=1 curl -sf http://localhost:4820/api/analytics curl -sf http://localhost:4820/api/pricing curl -sf http://localhost:4820/api/settings/info ``` ### 5. Hook Integration - Verify hook handler script exists - Check hooks are configured in `~/.claude/settings.json` - Verify the handler script targets the correct dashboard URL ### 6. Disk & Resource Usage (deep mode only) - Database file size - Log file sizes (if any) - Available disk space - Node.js process memory usage (if accessible) ### 7. Data Freshness - Time since last event ingested - Time since last session created - Check for stale active sessions (active but no events in >1 hour) ## Output Format Present as a system health dashboard: ``` ╔══════════════════════════════════════════════╗ ║ AGENT MONITOR HEALTH CHECK ║ ║ Timestamp: 2025-04-11 12:00:00 UTC ║ ╠══════════════════════════════════════════════╣ ║ ║ ║ API Server ............ ✅ OK (45ms) ║ ║ Database .............. ✅ OK (2.4 MB) ║ ║ WebSocket ............. ✅ OK ║ ║ API Endpoints ......... ✅ 6/6 passing ║ ║ Hook Integration ...... ⚠️ 5/7 hooks ║ ║ Data Freshness ........ ✅ 3m ago ║ ║ ║ ║ Overall: HEALTHY (5/6 checks passed) ║ ║ ║ ╚══════════════════════════════════════════════╝ ``` For any non-passing check, include detailed explanation and remediation steps below the dashboard.
Operate and maintain the local MCP server for this repository. Use for MCP tool updates, policy-guard changes, host configuration, and MCP runtime troubleshooting.
Run release-readiness checks for this repository. Use when validating docs, scripts, verification coverage, and operational safety before merge or release.
Understand this repository quickly before making changes. Use for architecture discovery, ownership mapping, command selection, and initial implementation planning.
Review backend route and hook logic for regressions, data integrity risks, and missing tests.
Review React UI changes for behavior regressions, state consistency, and UX breakage.
Review MCP server changes for tool safety, schema quality, and host integration correctness.
Debug production-like issues in this repository with disciplined evidence gathering. Use when fixing failing workflows, regressions, flaky behavior, or data inconsistencies across hooks, API, DB, websocket, and UI.
Operate and maintain the local MCP server for this project. Use when creating MCP host config, troubleshooting tool connectivity, modifying tool domains, or adjusting safety policy flags.