add-health-check · git:20261115.237aa7d · 2026-11-15 · sha256 d6cfb0d40d0e1cb4
add-health-check git:20261115.237aa7dA
Immutable. This exact content never changes and is served at /api/v1/blob/d6cfb0d40d0e1cb4.
No tool to install first
claude plugin marketplace add https://markdownregistry.com/mp/a/art_x6alg4dqtu6cjxet/d6cfb0d40d0e1cb4bcbd9097c86816a8c35569af56fa5fcfdd8b7e5eb7b9b311.json
Then /plugin install add-health-check@markdownregistry-x6alg4dqtu6cjxet in Claude Code. It installs this exact version, the one graded A here, pinned to the commit it was graded at, and leaves it there.
---
name: add-health-check
description: Adds liveness and readiness endpoints that test real dependencies with short timeouts, so orchestrators restart the right things.
disable-model-invocation: true
---
Add health endpoints to this service. Dependencies to include: $ARGUMENTS (detect them from config if empty).
1. Read the app entry point, config and client setup to list real dependencies: database, cache, queue, object storage, upstream APIs.
2. Add `GET /livez`: returns 200 with no dependency calls. It only proves the process responds.
3. Add `GET /readyz`: runs one cheap check per required dependency in parallel (for example `SELECT 1`, a cache PING), each with a 1 to 2 second timeout. Return 200 when all pass, otherwise 503 with JSON like {"status":"degraded","failed":["database"]}.
4. Mark optional dependencies as non-fatal so a flaky analytics API does not take the service out of rotation.
5. Never include secrets, hostnames, stack traces or version numbers in the body. Skip auth on these routes but do not expose them publicly if the platform supports an internal port.
6. Reuse existing connections; do not open a new pool per probe.
7. Add tests for all-healthy and one-dependency-down, then run them. Show the probe snippet for the deploy config and ask before editing it.