aj-geddes avatar

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-code

Installs 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
1secondsky avatarapi-error-handlingsecondsky/claude-skillsImplements standardized API error responses with proper status codes, logging, and user-friendly messages. Use when building production APIs, implementing error455skills.sh installs
2bobmatnyc avatardigitalocean-managementbobmatnyc/claude-mpm-skillsDigitalOcean management services for monitoring, uptime checks, and resource organization with Projects. Use when setting up observability, alerts, and operatio451skills.sh installs
3openclaudia avatardemand-genopenclaudia/openclaudia-skillsBuild a demand generation strategy and multi-channel campaigns. Use when the user says "demand gen", "demand generation", "lead generation strategy", "pipeline 450skills.sh installs
4aj-geddes avataralert-managementaj-geddes/useful-ai-promptsImplement comprehensive alert management with PagerDuty, escalation policies, and incident coordination. Use when setting up alerting systems, managing on-call 447skills.sh installs
5aj-geddes avatarazure-app-serviceaj-geddes/useful-ai-promptsDeploy and manage web apps using Azure App Service with auto-scaling, deployment slots, SSL/TLS, and monitoring. Use for hosting web applications on Azure.445skills.sh installs
6aj-geddes avatarcontinuous-testingaj-geddes/useful-ai-promptsIntegrate automated testing into CI/CD pipelines for continuous quality feedback. Use for continuous testing, CI testing, automated testing pipelines, test orch441skills.sh installs