health-check

Check health status of all running services and dependencies. Use when verifying services are running, debugging connectivity issues, or monitoring system status.

16 stars

Best use case

health-check is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Check health status of all running services and dependencies. Use when verifying services are running, debugging connectivity issues, or monitoring system status.

Teams using health-check should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/health-check/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/development/health-check/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/health-check/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How health-check Compares

Feature / Agenthealth-checkStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Check health status of all running services and dependencies. Use when verifying services are running, debugging connectivity issues, or monitoring system status.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# Service Health Checker

Check the health and status of all services, databases, and dependencies.

## Arguments
- `$ARGUMENTS`: Specific service name (optional - checks all if not specified)

## Services Configuration

| Service | Type | Health Endpoint | Port |
|---------|------|-----------------|------|
| eruditiontx-services-mvp | FastAPI | `/health`, `/v1/health` | 8000 |
| mathmatterstx-services | FastAPI | `/health`, `/v1/health` | 8002 |
| eruditiontx-client-mvp | React | `/` | 3000 |
| notaryo.ph | Next.js | `/api/health` | 3000 |
| MongoDB | Database | Connection test | 27017 |
| PostgreSQL | Database | Connection test | 5432 |
| Redis | Cache | `PING` | 6379 |
| MinIO | Storage | `/minio/health/live` | 9000 |

## Health Check Commands

### HTTP Services

```bash
# Basic health check
curl -sf http://localhost:$PORT/health && echo "OK" || echo "FAILED"

# With timeout
curl -sf --max-time 5 http://localhost:$PORT/health

# Get response details
curl -sf -w "\nStatus: %{http_code}\nTime: %{time_total}s\n" http://localhost:$PORT/health

# Check multiple endpoints
for port in 8000 8002 3000; do
    echo "Checking port $port..."
    curl -sf --max-time 5 http://localhost:$port/health && echo " OK" || echo " FAILED"
done
```

### Database Services

**MongoDB:**
```bash
# Check connection
mongosh --eval "db.adminCommand('ping')" --quiet
# or
mongosh mongodb://localhost:27017/test --eval "db.runCommand({ping: 1})"
```

**PostgreSQL:**
```bash
# Check connection
pg_isready -h localhost -p 5432
# or with psql
psql -h localhost -U postgres -c "SELECT 1" > /dev/null 2>&1 && echo "OK" || echo "FAILED"
```

**Redis:**
```bash
redis-cli ping
# Should return "PONG"
```

### Process Status

**Systemd Services:**
```bash
systemctl is-active erudition-service
systemctl status erudition-service --no-pager
```

**Docker Containers:**
```bash
docker ps --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
docker inspect --format='{{.State.Health.Status}}' $CONTAINER
```

**PM2 Processes:**
```bash
pm2 status
pm2 show $APP_NAME
```

### Port Checks

```bash
# Check if port is listening
lsof -i :$PORT
# or
netstat -tlnp | grep $PORT
# or on macOS
lsof -nP -iTCP:$PORT | grep LISTEN
```

## Comprehensive Health Check

Run all checks at once:

```bash
echo "=== Service Health Check ==="
echo ""

# HTTP Services
echo "HTTP Services:"
for service in "8000:eruditiontx-api" "8002:mathmatterstx-api" "3000:frontend"; do
    port=$(echo $service | cut -d: -f1)
    name=$(echo $service | cut -d: -f2)
    status=$(curl -sf --max-time 3 http://localhost:$port/health && echo "UP" || echo "DOWN")
    printf "  %-20s %s\n" "$name" "$status"
done

echo ""
echo "Databases:"
# MongoDB
mongo_status=$(mongosh --eval "db.adminCommand('ping')" --quiet 2>/dev/null && echo "UP" || echo "DOWN")
printf "  %-20s %s\n" "MongoDB" "$mongo_status"

# PostgreSQL
pg_status=$(pg_isready -h localhost -p 5432 2>/dev/null && echo "UP" || echo "DOWN")
printf "  %-20s %s\n" "PostgreSQL" "$pg_status"

# Redis
redis_status=$(redis-cli ping 2>/dev/null | grep -q PONG && echo "UP" || echo "DOWN")
printf "  %-20s %s\n" "Redis" "$redis_status"

echo ""
echo "Docker Containers:"
docker ps --format "  {{.Names}}: {{.Status}}" 2>/dev/null || echo "  Docker not running"
```

## Output Format

```
Health Check Report
Generated: [timestamp]

Services:
  Service                 Status    Response Time
  ---------------------   ------    -------------
  eruditiontx-api         UP        45ms
  mathmatterstx-api       UP        32ms
  frontend                UP        28ms

Databases:
  Database                Status    Connection
  ---------------------   ------    ----------
  MongoDB                 UP        localhost:27017
  PostgreSQL              DOWN      Connection refused
  Redis                   UP        localhost:6379

Infrastructure:
  Component               Status
  ---------------------   ------
  Docker                  Running (5 containers)
  Nginx                   Running

Issues Found:
  - PostgreSQL is not running
  - Port 5432 not listening

Recommendations:
  1. Start PostgreSQL: brew services start postgresql
  2. Check PostgreSQL logs: tail -f /usr/local/var/log/postgresql.log
```

## Alerting

If critical services are down:

```bash
# Send alert (example with curl to Slack webhook)
if ! curl -sf http://localhost:8000/health > /dev/null; then
    curl -X POST -H 'Content-type: application/json' \
        --data '{"text":"ALERT: eruditiontx-api is DOWN"}' \
        $SLACK_WEBHOOK_URL
fi
```

## Troubleshooting

If a service is down:

1. **Check if process is running**: `ps aux | grep $SERVICE`
2. **Check port binding**: `lsof -i :$PORT`
3. **Check logs**: `/logs $SERVICE error`
4. **Restart service**: `sudo systemctl restart $SERVICE`

Related Skills

storefront-health

16
from diegosouzapw/awesome-omni-skill

Run a storefront performance audit with Lighthouse and Core Web Vitals analysis

security-check

16
from diegosouzapw/awesome-omni-skill

Voer geautomatiseerde security checks uit op codebases. Scant broncode, configuraties en dependencies op kwetsbaarheden met Semgrep, Trivy en Gitleaks. Categoriseert findings per OWASP Top 10 met genormaliseerde severity levels. Gebruik bij security scans, PR reviews, of compliance checks.

qa-check

16
from diegosouzapw/awesome-omni-skill

Mandatory quality assurance for all dev work before publishing. Use BEFORE deploying any project to production. Validates build, tests browser functionality, checks mobile responsiveness, and ensures no broken links/images.

pyright-type-checker

16
from diegosouzapw/awesome-omni-skill

Pyright fast Python type checker from Microsoft with VS Code integration and strict type checking modes

ln-774-healthcheck-setup

16
from diegosouzapw/awesome-omni-skill

Configures health check endpoints for Kubernetes readiness/liveness/startup

healthcare-ui-design

16
from diegosouzapw/awesome-omni-skill

Clinical-grade UI/UX patterns for healthcare applications across web (Bootstrap 5/Tabler + PHP) and Android (Jetpack Compose + Material 3). Covers patient records, vital signs, medication safety, care plans, scheduling, telemedicine, dashboards, patient portals, and clinical communication. Enforces HIPAA compliance, WCAG 2.2 AA accessibility, medical safety workflows, and role-based interfaces for clinicians, nurses, patients, and administrators. Use when building or reviewing EMR/EHR systems, hospital management, clinic apps, telemedicine platforms, patient portals, health dashboards, or any healthcare-related interface.

gradle-dependency-checker

16
from diegosouzapw/awesome-omni-skill

Executes Gradle dependency check commands, retrieves and analyzes dependency trees, and extracts version information for key dependencies such as kotlin/kotlinx/skiko/androidx. Use when users need to check Gradle project dependency versions or analyze dependency relationships.

entry-point-check

16
from diegosouzapw/awesome-omni-skill

验证 VS 的 entry_points 字段是否与 SPEC_PRJ_ENTRYPOINTS(入口类型标签)一致,生成缺失入口清单和补充建议。当准备 CONSTRAINT 验收前使用。

debug-validator-checkpoint-inconsistency

16
from diegosouzapw/awesome-omni-skill

Debug validator checkpoint inconsistencies where some validators are behind others. Use when alerts mention "checkpoint inconsistency", "validators behind", or "inconsistent latest checkpoints", or when asked to debug validator sets, investigate validator delays, or troubleshoot metadata fetch failures for a chain. Defaults to default_ism app context if not specified.

code-review-checklist

16
from diegosouzapw/awesome-omni-skill

Comprehensive checklist for conducting thorough code reviews covering functionality, security, performance, and maintainability

checkstyle-rules

16
from diegosouzapw/awesome-omni-skill

Use when applying Checkstyle built-in checks for Java code including naming conventions, code metrics, and suppressions.

checklist-generator

16
from diegosouzapw/awesome-omni-skill

Generate context-aware quality checklists for code review and QA using IEEE 1028 base standards plus LLM contextual additions