scaffold-health-checks
Scaffold FastAPI/gRPC liveness, readiness, and startup health checks, graceful shutdown, and optional Kubernetes probes.
Skill by SyntaxArc
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/syntaxarc-scaffold-health-checks
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, devops
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/scaffold-health-checks
What's inside
- Skill name
scaffold-health-checks- Description
- Scaffold FastAPI/gRPC liveness, readiness, and startup health checks, graceful shutdown, and optional Kubernetes probes. Use for "health endpoint", "readiness/liveness probe", or "k8s probes".
- License
- MIT
- Instructions
- 178 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- k8s-probes-grpc.yaml · reference/
- k8s-probes-http.yaml · reference/
SKILL.md (first lines)
# Scaffold ArchiPy Health Checks
## Read first
Read these plugin rules in full before generating files (paths relative to this skill directory; Claude Code: `${CLAUDE_SKILL_DIR}/../../rules/`):
- `../../rules/using-archipy-services.mdc`
## Before writing files
1. Inspect package/config, current transports, app lifecycle, dependency adapters, DI wiring, deployment manifests, and
existing health endpoints.
2. Infer package name, transport, ports, and readiness dependencies from the repository.
3. Ask only for unresolved choices: dependencies to include, heartbeat deadlock detection, or Kubernetes YAML.
4. Preserve existing health routes and manifests; merge compatible additions instead of overwriting.
## Prefer ArchiPy
Health checks are app code. ArchiPy does not ship stock HTTP routes or a stock gRPC `Health` servicer.
**Probe semantics** (liveness vs readiness vs startup, K8s notes, common mistakes, FastAPI sketches): keep
`../archipy-docs/reference/health-checks.md` § Health checks as the source of truth — do not invent alternate probe meanings or
duplicate endpoint sketches here. Resolve `../...` paths relative to this `SKILL.md`'s directory in the plugin
installation — not the app workspace.
```bash
uv add "archipy[fastapi]" # HTTP probes
uv add "archipy[grpc]" # gRPC server + grpcio-health-checking
```
Prefer existing app bootstrap:
```python
from archipy.helpers.utils.app_utils import AppUtils
from archipy.configs.base_config import BaseConfig
# FastAPI
app = AppUtils.create_fastapi_app()
app.include_router(create_health_v1_router(container))
# gRPC (sync)
server = AppUtils.create_grpc_app(BaseConfig.global_config())
# register domain servicers, then health:
register_health_servicer(server, container)
# gRPC (async)
server = AppUtils.create_async_grpc_app(BaseConfig.global_config())
```
Do not hand-roll bare `FastAPI()` / `grpc.server()` when AppUtils is in use. Do not mix sync and async gRPC servicer
styles on one server.
## Generate
Resolve files under `reference/` relative to this `SKILL.md` in the plugin installation
(`$CURSOR_PLUGIN_ROOT/skills/scaffold-health-checks/` or
`${CLAUDE_SKILL_DIR}/`). These are plugin templates, not app-relative paths. Copy
and adapt them into the app; never edit the plugin copies.
```text
<package>/services/health/v1/
├── health_checks.py # shared readiness helpers (deps, warm-up, shutdown)
├── health_service.py # FastAPI — when HTTP requested
└── health_grpc_service.py # gRPC HealthServicer wiring — when gRPC requested
deploy/
└── k8s-probes.yaml # optional (httpGet and/or grpc probes)
```
Share readiness helpers across transports. Keep business rules out of transport files.
## FastAPI (`health_service.py`)
- Export a thin router for `GET /health/live` and `GET /health/ready`.
- Return `200` healthy, `503` not ready / unhealthy, with empty bodies: no dependency names, versions, or error text.
- Wire with `include_router` into `manage.py` / app factory.
- Liveness: process-only, no deps. Readiness: deps + warm-up + shutdown, timeouts; per-check detail goes to logs only.
- Probes live in `repositories/health_check/` (one adapter file per dependency raising `UnavailableError`); the logic never drives adapters or raw SQL.
- Optional heartbeat mode for deadlock detection only when user asks.
- Code sketches and payload shapes: `../archipy-docs/reference/health-checks.md` § Health checks → FastAPI endpoints.
## gRPC (`health_grpc_service.py`)
Use the standard gRPC Health Checking Protocol (`grpc.health.v1.Health`) via `grpcio-health-checking`.
Register at least `""` (overall), `"readiness"`, and `"liveness"`. Map ready/alive → `SERVING`, not ready →
`NOT_SERVING`. Full service-name table and update rules: `../archipy-docs/reference/health-checks.md` § Health checks → gRPC Health
protocol.
### Wire sketch
**`""` and `"readiness"` start `NOT_SERVING`** until warm-up + deps are healthy:
```python
from grpc_health.v1 import health, health_pb2, health_pb2_grpc
def register_health_servicer(server, container) -> health.HealthServicer:
"""Attach standard Health servicer; return handle for status updates."""
health_servicer = health.HealthServicer()
health_pb2_grpc.add_HealthServicer_to_server(health_servicer, server)
health_servicer.set("liveness", health_pb2.HealthCheckResponse.SERVING)
health_servicer.set("readiness", health_pb2.HealthCheckResponse.NOT_SERVING)
health_servicer.set("", health_pb2.HealthCheckResponse.NOT_SERVING)
return health_servicer
```
### Status update rules (summary)
- Warm-up complete + deps healthy → set `""` and `"readiness"` to `SERVING`.
- Dep failure → `""` / `"readiness"` to `NOT_SERVING`; never flip `"liveness"` for dep failures.
- Prefer background updater calling `set()` over slow checks inside every `Check`.
- On `SIGTERM`: set readiness/`""` to `NOT_SERVING`, then `health_servicer.enter_graceful_shutdown()`.
- Async gRPC: same protocol/names; register on `AppUtils.create_async_grpc_app`; keep updates task-safe.
## Startup probes
- HTTP: point startup at `/health/live`.
- gRPC: point startup at service `"liveness"` (prefer over `""`).From SyntaxArc/archipy-plugin, MIT.
More from SyntaxArc/archipy-plugin
- 0.601score
scaffold-observability
SyntaxArc
Configure ArchiPy 5.x OpenTelemetry traces, metrics, logs, and instrumentation.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-logic
SyntaxArc
Scaffold an ArchiPy logic (use case) under logics/{domain}/ with a unit-of-work decorator and DTO I/O.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
archipy-docs
SyntaxArc
Answer how-to questions about ArchiPy 5.x in an app (config, DI, adapters, helpers, errors, layout, observability) from the bundled reference and live docs.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-adapter
SyntaxArc
Scaffold a domain adapter under repositories/{domain}/adapters/ wrapping an ArchiPy adapter or external client.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-bdd
SyntaxArc
Scaffold Behave BDD tests that drive an ArchiPy app through its REST/gRPC services layer against real testcontainers (Postgres, Redis, Kafka, Temporal, …).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-decorator
SyntaxArc
Add or wire helpers/decorators, preferring ArchiPy's (ttl_cache, atomic UoW, trace_span, measure_duration, retry).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-domain
SyntaxArc
Scaffold a full ArchiPy domain slice (DTOs, errors, repository + adapter, logic, service).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-interceptor
SyntaxArc
Add or wire cross-cutting FastAPI/gRPC interceptors or middleware, preferring ArchiPy's.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-models
SyntaxArc
Scaffold ArchiPy models under models/: domain/repository DTOs, errors, optional entities and types.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
redis-search
SyntaxArc
Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-app
SyntaxArc
Bootstrap a new ArchiPy service layout (configs, models, repositories, logics, services, helpers, manage.py).
SkillAFreshness: A★ 3Claude Code +9 - 0.595score
docs-observability
SyntaxArc
Open ArchiPy OpenTelemetry guidance (traces, metrics, logs)
SkillAFreshness: A★ 3Claude Code +9
Signals
- Stars
- 3
- Forks
- 1
- Open issues
- 0
- Last commit (this folder)
- Oct 4, 2026 (24 days ago)
- Last release
- Oct 18, 2026 (10 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/SyntaxArc/archipy-plugin
- Website
- syntaxarc.github.io/ArchiPy/
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from SyntaxArc
- 0.601score
archipy-docs
SyntaxArc
Answer how-to questions about ArchiPy 5.x in an app (config, DI, adapters, helpers, errors, layout, observability) from the bundled reference and live docs.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-adapter
SyntaxArc
Scaffold a domain adapter under repositories/{domain}/adapters/ wrapping an ArchiPy adapter or external client.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
redis-search
SyntaxArc
Scaffold RediSearch full-text, vector, or search-cache adapters in an ArchiPy app.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-app
SyntaxArc
Bootstrap a new ArchiPy service layout (configs, models, repositories, logics, services, helpers, manage.py).
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-logic
SyntaxArc
Scaffold an ArchiPy logic (use case) under logics/{domain}/ with a unit-of-work decorator and DTO I/O.
SkillAFreshness: A★ 3Claude Code +9 - 0.601score
scaffold-bdd
SyntaxArc
Scaffold Behave BDD tests that drive an ArchiPy app through its REST/gRPC services layer against real testcontainers (Postgres, Redis, Kafka, Temporal, …).
SkillAFreshness: A★ 3Claude Code +9
Cite this page
scaffold-health-checks skill. Agent Mart. https://agentmart.dev/skills/syntaxarc-scaffold-health-checks (last updated 2026-10-24)