Skip to content
Development
Skill

/health

Service/infra health via liveness/readiness checks, resource usage, quick diagnostics. Triggers: health check, services up, system status, infra health, degraded service.

From plugin
ai-toolkit
180117 skills44 agents

Claude Code

$ npx -y skills add softspark/ai-toolkit --skill health --agent claude-code

SKILL.md

health.SKILL.md
name: health
description: "Service/infra health via liveness/readiness checks, resource usage, quick diagnostics. Triggers: health check, services up, system status, infra health, degraded service."
effort: medium
disable-model-invocation: true
argument-hint: "[service]"
allowed-tools: Bash, Read

Health Check

$ARGUMENTS

Check the health of all project services.

Project context

  • Services: !`docker compose ps 2>/dev/null || echo "no-docker"`

Auto-Detection

Detect services from `docker-compose.yml`, `.env`, or project configuration.

Quick Check

# If using Docker Compose
docker compose ps

# Process check (bare metal)
ps aux | grep -E "(node|python|java|php)" | grep -v grep

Common Service Checks

| Service | Health Check | |---------|-------------| | HTTP API | `curl -f http://localhost:{port}/health` | | PostgreSQL | `pg_isready -h localhost -p 5432` | | MySQL | `mysqladmin ping -h localhost` | | Redis | `redis-cli ping` | | MongoDB | `mongosh --eval "db.runCommand({ping:1})"` | | Elasticsearch | `curl -f http://localhost:9200/_cluster/health` | | RabbitMQ | `curl -f http://localhost:15672/api/healthchecks/node` |

Diagnostics

# Container logs (if Docker)
docker compose logs --tail 50 {service}

# Resource usage
docker stats --no-stream   # Docker
htop                       # Bare metal

# Disk usage
df -h                      # System
docker system df           # Docker

# Network
netstat -tlnp              # Listening ports
curl -I http://localhost:{port}  # Connectivity

Common Issues

| Symptom | Check | Solution | |---------|-------|----------| | Service not responding | Process running? Port open? | Restart service | | Slow responses | Resource usage, connections | Scale or optimize | | Connection refused | Network, firewall, port | Check config | | Out of memory | `free -h`, container limits | Increase limits |

Automated Health Check

Run the bundled script for a JSON health report:

python3 ${CLAUDE_SKILL_DIR}/scripts/health_check.py http://localhost:8000

Health Report Format

services:
  {service-name}:
    status: healthy|degraded|down
    uptime: Xd Xh
    cpu: X%
    memory: XMB
    notes: "any issues"

Rules

  • **MUST** report measured values — never mark a service healthy without a successful probe
  • **NEVER** restart a degraded service without the user's explicit go-ahead
  • **CRITICAL**: separate liveness (process up) from readiness (accepting traffic) in the report
  • **MANDATORY**: if a health endpoint times out, classify as `degraded`, not `healthy`

Gotchas

  • `docker compose ps` shows `Up` even when a container is **crash-looping** via restart policy — look at the `STATUS` column for `(unhealthy)` or `Restarting` rather than trusting "Up" alone.
  • Many `/health` endpoints return 200 as long as the web server answers, even when the DB connection is down. If the service exposes a `/ready` or `/healthz?deep=true` endpoint, prefer it — shallow health is a lie.
  • `pg_isready` reports success the moment Postgres accepts TCP, which happens seconds before the DB is actually query-ready after a restart. Chain it with a trivial `SELECT 1`.
  • `docker stats --no-stream` needs cgroups v2 access; on older hosts or LXC containers it returns 0% CPU/memory silently instead of erroring. Verify at least one non-zero value before trusting the report.

When NOT to Use

  • To debug a specific failing service — use `/debug` after the health check narrows it down
  • For performance bottlenecks — use `/performance-profiling`
  • For a production incident with page/alert — use `/workflow incident-response`
  • For CI pipeline status — use `/ci`
Read more
@softspark
Ships withai-toolkit

AI coding toolkit with machine-enforced safety, 116 skills, 44 agents, lifecycle hooks, persona presets, opt-in plugin packs, and benchmark tooling.

180117 skills44 agents
Get the whole plugin

Stars on GitHub

Momentum

stars in total
180
Star history of softspark/ai-toolkit on GitHub, a chart by star-history.com

Other skills on ai-toolkit.

ai-toolkit-rules

ai-toolkit-rules

Mandatory engineering, security, testing, git, performance, quality, and response rules. Claude MUST load this skill for every…

mem-search

mem-search

Searches past coding sessions for observations, decisions, context. Triggers: mem-search, recall session, past work, prior…

a11y-validate

a11y-validate

Accessibility validator: WCAG 2.1 AA, EN 301 549, EAA. Triggers: a11y, accessibility, WCAG, EAA, ARIA, contrast, keyboard, screen…

agent-creator

agent-creator

Creates new specialized agents with frontmatter, tools, delegation. Triggers: new agent, create agent, agent scaffold,…

analyze

analyze

Analyzes code quality, complexity, patterns across codebase. Triggers: quality report, hotspot scan, code analysis, architecture…

api-patterns

api-patterns

API design: naming, versioning, pagination, idempotency, OpenAPI, error contracts and safe retries. Triggers: API design, REST,…

More skills from other plugins.

brainstorming
Auto-invoked

brainstorming

You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or…

@obra@obraInstall Skill
ask-matt

ask-matt

Ask which skill or flow fits your situation. A router over the skills in this repo.

skills3w309k
@mattpocock@mattpocockInstall Skill
accessibility
Auto-invoked

accessibility

Design, implement, and audit accessible UI to WCAG 2.2 Level AA across Web, iOS, and Android — semantic ARIA roles and labels,…

ecc4w293k
@affaan-m@affaan-mInstall Skill
compiler-commit

compiler-commit

Use when you want to verify compiler changes and commit with the correct convention. Runs tests, lint, and format, then commits…

react2w252k
@facebook@facebookInstall Skill

Questions about health.

Which coding agents can use health?
health installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.