Skip to content
Back to skills

Health Check Endpoints

ASecurity

Health check endpoints for liveness, readiness, dependency monitoring. Use for Kubernetes, load balancers, auto-scaling, or encountering probe failures, startup delays, dependency checks, timeout configuration errors.

  • 250 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added February 7, 2026
developmentjavascriptpythonjavaexpressflaskspringkubernetesdatabase

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned February 12, 2026

npx -y skills add secondsky/claude-skills --skill health-check-endpoints --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Health Check Endpoints?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Health Check Endpoints
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/secondsky-health-check-endpoints/badge)](https://www.skillsdirectory.com/skills/secondsky-health-check-endpoints)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: health-check-endpoints
description: Health check endpoints for liveness, readiness, dependency monitoring. Use for Kubernetes, load balancers, auto-scaling, or encountering probe failures, startup delays, dependency checks, timeout configuration errors.
---

# Health Check Endpoints

Implement health checks for monitoring service availability and readiness.

## Probe Types

| Probe | Purpose | Failure Action |
|-------|---------|----------------|
| Liveness | Is process alive? | Restart container |
| Readiness | Can handle traffic? | Remove from LB |
| Startup | Has app started? | Delay other probes |
| Deep | All deps healthy? | Trigger alerts |

## Implementation (Express)

```javascript
class HealthChecker {
  async checkDatabase() {
    const start = Date.now();
    try {
      await db.query('SELECT 1');
      return { status: 'healthy', latency: Date.now() - start };
    } catch (err) {
      return { status: 'unhealthy', error: String(err?.message || err) };
    }
  }

  async checkRedis() {
    try {
      await redis.ping();
      return { status: 'healthy' };
    } catch (err) {
      return { status: 'unhealthy', error: err.message };
    }
  }

  async getReadiness() {
    const checks = await Promise.all([
      this.checkDatabase(),
      this.checkRedis()
    ]);
    const healthy = checks.every(c => c.status === 'healthy');
    return { healthy, checks };
  }
}

// Liveness - lightweight
app.get('/health/live', (req, res) => {
  res.json({ status: 'ok', timestamp: new Date().toISOString() });
});

// Readiness - check dependencies
app.get('/health/ready', async (req, res) => {
  const health = await healthChecker.getReadiness();
  res.status(health.healthy ? 200 : 503).json(health);
});
```

## Kubernetes Configuration

```yaml
livenessProbe:
  httpGet:
    path: /health/live
    port: 3000
  initialDelaySeconds: 15
  periodSeconds: 10
  failureThreshold: 3

readinessProbe:
  httpGet:
    path: /health/ready
    port: 3000
  initialDelaySeconds: 5
  periodSeconds: 10
```

## Best Practices

- Keep liveness checks minimal (no external deps)
- Check only critical systems in readiness
- Return 200 for healthy, 503 for unhealthy
- Set reasonable timeouts to prevent cascading failures
- Include response time metrics

## Additional Implementations

See [references/implementations.md](references/implementations.md) for:
- Python Flask complete health checker
- Java Spring Boot Actuator
- Full Kubernetes deployment config

## Never Do

- Make liveness depend on external services
- Return 200 when dependencies are down
- Skip dependency checks in readiness

Files in this skill

  • SKILL.md2.6 KB
  • references/implementations.md6.6 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.