# Healthcheck

> Add health, readiness, and liveness check endpoints to a service — verifying dependencies (db, cache, queues) — matching the project's framework, for load balancers and orchestrators. Use when the user says "add a health check", "add a /health endpoint", "add readiness/liveness probes", "health endpoint for Kubernetes", or "how do I check if the service is up".

- **Type:** Skill
- **Install:** `agentstack add skill-pradnyeshp-claude-skills-healthcheck`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [Pradnyeshp](https://agentstack.voostack.com/s/pradnyeshp)
- **Installs:** 0
- **Category:** [Cloud & Infrastructure](https://agentstack.voostack.com/c/cloud-infrastructure)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [Pradnyeshp](https://github.com/Pradnyeshp)
- **Source:** https://github.com/Pradnyeshp/Claude-Skills/tree/main/.claude/skills/healthcheck

## Install

```sh
agentstack add skill-pradnyeshp-claude-skills-healthcheck
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

## Service & dependency signals

!`grep -rilE "express|fastify|koa|nestjs|flask|fastapi|django|gin|echo|actix|rails|spring" package.json pyproject.toml go.mod Gemfile 2>/dev/null | head`

!`grep -rilE "createConnection|DataSource|pg|mongoose|redis|prisma|sqlalchemy|database_url" --include='*.*' . 2>/dev/null | grep -vE 'node_modules|\.git|dist|build|test' | head -8`

## Instructions

Add health check endpoint(s) to this service per `$ARGUMENTS`. Match the project's framework and how it registers routes — don't introduce a new server or router.

### Method

1. **Detect the framework and an existing route** to copy registration style, middleware, and conventions (Express/Fastify/Nest, Flask/FastAPI/Django, Gin/Echo, Rails, Spring). Mirror it.
2. **Distinguish liveness from readiness** — they answer different questions, so prefer two endpoints:
   - **Liveness** (`/livez` or `/health`) — is the process up? Cheap, no dependency calls; returns 200 unless the process is broken. Orchestrators restart on failure, so it must not fail just because a dependency is down.
   - **Readiness** (`/readyz` or `/health/ready`) — can it serve traffic *right now*? Checks critical dependencies (db, cache, queue, required downstreams) and returns 503 when any is unavailable so the load balancer stops routing to it.
3. **Check real dependencies, cheaply.** Use a lightweight probe per dependency (`SELECT 1`, a Redis `PING`, a fast head request) with a short timeout so a hung dependency can't hang the check. Run them concurrently where the language makes it easy.
4. **Return a useful, safe body.** A JSON payload with overall status and per-dependency `up`/`down` + latency aids debugging — but don't leak connection strings, credentials, internal hostnames, or versions to an unauthenticated endpoint. Set the right status code (200 healthy / 503 not ready) since probes key on it.
5. **Wire it up** following the project's routing, and note any config (the path, whether it should bypass auth/rate-limiting, the orchestrator probe settings to point at it).

### Rules

1. Liveness must not depend on external services — tying it to the db means a db blip triggers pointless restarts. Keep dependency checks in readiness.
2. Every dependency probe needs a timeout; a health check that can hang is worse than none.
3. Don't leak sensitive detail (secrets, internal topology, exact versions) in the response or expose an internal-only check publicly without auth.
4. Reuse the app's existing db/cache clients and config — don't open new connections per request or hardcode endpoints.
5. After adding, summarize the endpoints, what each checks, the status codes, and the probe configuration to use (e.g. Kubernetes `livenessProbe`/`readinessProbe`).

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [Pradnyeshp](https://github.com/Pradnyeshp)
- **Source:** [Pradnyeshp/Claude-Skills](https://github.com/Pradnyeshp/Claude-Skills)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-pradnyeshp-claude-skills-healthcheck
- Seller: https://agentstack.voostack.com/s/pradnyeshp
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
