Skip to main content
skill CX Codex

health-check · hoangsonww — Claude Code skill: checks and install

This skill checks Agent Monitor’s API, database, WebSocket, endpoints, hooks, and data freshness. Use it to spot issues in a monitoring setup.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill health-check -a claude-code
Open on GitHub

What health-check does

In full mode, the skill queries the local API and stats endpoints at localhost:4820, tests WebSocket support and key API endpoints, then checks hook integration. It also checks when the latest event arrived and the latest session was created, and flags active sessions with no events for more than an hour.

quick is for a connectivity check. deep adds database integrity and resource checks: database and log sizes, free disk space, and Node.js process memory when accessible. Hook checks cover the handler script and ~/.claude/settings.json. The local API checks require Agent Monitor to be running.

The skill formats its findings as a system health dashboard. For failed checks, it provides an explanation and remediation steps.

What it helps with

  • check whether the Agent Monitor API responds
  • find database or WebSocket issues
  • test the main API endpoints
  • inspect hook configuration
  • identify stale active sessions

Example prompts for the agent

  • Run health-check in full mode and show the Agent Monitor status dashboard.
  • Run a quick connectivity check with health-check quick.
  • Run health-check deep and include database integrity and resource usage.

How to install health-check

1Skills CLI (Vercel)

npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill health-check -a claude-code

2Manually: put the files in place

~/.claude/skills/health-check/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/health-check/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about health-check

How do I install health-check in Claude Code?

Run npx skills add hoangsonww/Claude-Code-Agent-Monitor --skill health-check -a claude-code. The skill file is at ~/.claude/skills/health-check/SKILL.md.

What does health-check do?

It checks Agent Monitor’s API, database, WebSocket, endpoints, hooks, and data freshness. Deep mode also checks database integrity and resource usage.

How do quick and deep modes differ?

quick performs a connectivity check. deep adds database integrity checks, file sizes, available disk space, and Node.js process memory when accessible.

Source text

SKILL.md · MIT
---
name: health-check
description: >
  Run comprehensive health checks on the Claude Code Agent Monitor system.
  Validates dashboard API, database, WebSocket, hooks, and disk usage.
  Use to verify the monitoring setup is working correctly.
---

# 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.

© hoangsonww · MIT · hoangsonww/Claude-Code-Agent-Monitor

Similar skills

All skills for DevOps and infrastructure →

health-check by other authors comes first.

From the same set60

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor