
Health Check Endpoints
You need health checks for Kubernetes probes, load balancers, or any system that needs to know if your service is actually ready to handle traffic. This implements the classic pattern: lightweight liveness endpoints that just confirm the process is alive, plus readiness checks that verify your database, Redis, and other dependencies are reachable. It includes examples for Express, Spring Boot, and Flask with proper HTTP status codes and response time tracking. The separation between liveness and readiness is critical because you don't want Kubernetes killing your pod just because your database is slow. The implementations cache results briefly to avoid hammering dependencies with every probe request.
- skills.sh installs
- 461
- GitHub stars
- 379
- last updated
- Aug 21, 2026
Install
$ npx -y skills add aj-geddes/useful-ai-prompts --skill health-check-endpoints --agent claude-codeInstalls into .claude/skills of the current project.
Files
Health Check Endpoints
Table of Contents
Overview
Implement health check endpoints to monitor service health, dependencies, and readiness for traffic.
When to Use
- Kubernetes liveness and readiness probes
- Load balancer health checks
- Service discovery and registration
- Monitoring and alerting systems
- Circuit breaker decisions
- Auto-scaling triggers
- Deployment verification
Quick Start
Minimal working example:
import express from "express";
import { Pool } from "pg";
import Redis from "ioredis";
interface HealthStatus {
status: "healthy" | "degraded" | "unhealthy";
timestamp: string;
uptime: number;
checks: Record<string, CheckResult>;
version?: string;
environment?: string;
}
interface CheckResult {
status: "pass" | "fail" | "warn";
time: number;
output?: string;
error?: string;
}
Sponsors
Details
- Repository
- github.com/aj-geddes/useful-ai-prompts
- Categories
- DevOps & CI/CD, AI & Agent Building
- First seen
- Jun 3, 2026
More from aj-geddes/useful-ai-prompts
All 258- Serverless Architecture461
- Transaction Management461
- Webhook Integration461
- Secrets Rotation459
- Runbook Creation458
- Deployment Documentation457
- Stored Procedures457
- Autoscaling Configuration456
- Profiling Optimization456
- Cpu Profiling455
- Security Documentation455
- Frontend Routing454
- Load Balancer Setup454
- Property Based Testing454
- Aws Rds Database453
- Log Aggregation453
- Documentation Site Setup452
- Monorepo Management451
- Retrospective Facilitation451
- Api Filtering Sorting450
- Cloud Migration Planning450
- Design Handoff450
- Git Hooks Setup450
- Cloud Storage Optimization449