$ recombobulate _
home / tips / ask-claude-to-scaffold-production-ready-health-check-endpoints
0

Ask Claude to Scaffold Production-Ready Health Check Endpoints

bagwaa @bagwaa · Mar 26, 2026 · Workflows
ask-claude-to-scaffold-production-ready-health-check-endpoints

Load balancers, Kubernetes, and uptime monitors all need a health check endpoint to know when your app is ready to serve traffic. Claude can scaffold one that actually checks your dependencies, not just returns a 200.

Add a /health endpoint that checks: database connectivity with a lightweight query,
Redis availability with a ping, and disk space above 10% free. Return 200 OK with a
JSON status summary when healthy, or 503 Service Unavailable if any check fails.

Claude generates structured JSON responses that orchestrators understand:

{
  "status": "degraded",
  "services": {
    "database": "healthy",
    "redis": "unhealthy",
    "disk": "healthy"
  },
  "uptime": 3842
}

For Kubernetes deployments, ask for separate liveness and readiness probes:

Add a /health/live endpoint that just confirms the process is running, and a
/health/ready endpoint that only passes once database migrations have completed
and the job queue has processed its backlog.

The distinction matters: liveness failures restart the container, readiness failures just stop routing traffic to it.

You can also ask Claude to add basic auth to the health endpoint so it isn't publicly explorable, or to include response time measurements for each dependency check.

A health endpoint is the cheapest thing you can add to prevent 3am incidents.

~/recombobulate $ tip --comments --count=0

Log in to leave a comment.

~/recombobulate $ tip --related --limit=3
0
Scan Pending Changes for Security Issues with /security-review

The /security-review command scans your uncommitted changes for injection vectors, auth gaps, hardcoded secrets, and other common vulnerabilities.

bagwaa @bagwaa · 2 hours ago
0
Run Setup Scripts on Every Session with the SessionStart Hook

The SessionStart hook fires when any session begins or resumes, making it ideal for loading environment variables and running one-time setup scripts.

bagwaa @bagwaa · 2 hours ago
0
Write Property-Based Tests with fast-check and Claude

Ask Claude to write property-based tests for your functions using fast-check — it identifies the mathematical invariants in your code and generates tests that cover inputs you'd never enumerate by hand.

bagwaa @bagwaa · 2 hours ago