ln-774-healthcheck-setup
Configures health check endpoints for Kubernetes readiness/liveness/startup
Best use case
ln-774-healthcheck-setup is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
Configures health check endpoints for Kubernetes readiness/liveness/startup
Teams using ln-774-healthcheck-setup should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/ln-774-healthcheck-setup/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How ln-774-healthcheck-setup Compares
| Feature / Agent | ln-774-healthcheck-setup | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
Configures health check endpoints for Kubernetes readiness/liveness/startup
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# ln-774-healthcheck-setup
**Type:** L3 Worker
**Category:** 7XX Project Bootstrap
**Parent:** ln-770-crosscutting-setup
Configures health check endpoints for Kubernetes probes and monitoring.
---
## Overview
| Aspect | Details |
|--------|---------|
| **Input** | Context Store from ln-770 |
| **Output** | Health check endpoints and Kubernetes probe configuration |
| **Stacks** | .NET (AspNetCore.Diagnostics.HealthChecks), Python (FastAPI routes) |
---
## Phase 1: Receive Context + Identify Dependencies
Accept Context Store and scan for dependencies to monitor.
**Required Context:**
- `STACK`: .NET or Python
- `PROJECT_ROOT`: Project directory path
**Idempotency Check:**
- .NET: Grep for `AddHealthChecks` or `MapHealthChecks`
- Python: Grep for `/health` route
- If found: Return `{ "status": "skipped" }`
**Dependency Detection:**
| Dependency | .NET Detection | Python Detection |
|------------|----------------|------------------|
| PostgreSQL | `Npgsql` in csproj | `psycopg2` or `asyncpg` in requirements |
| MySQL | `MySql.Data` in csproj | `mysql-connector-python` in requirements |
| Redis | `StackExchange.Redis` in csproj | `redis` in requirements |
| RabbitMQ | `RabbitMQ.Client` in csproj | `pika` or `aio-pika` in requirements |
| MongoDB | `MongoDB.Driver` in csproj | `pymongo` in requirements |
---
## Phase 2: Design Health Check Strategy
Define three types of health endpoints per Kubernetes best practices.
### Endpoint Types
| Endpoint | Probe Type | Purpose | Checks |
|----------|------------|---------|--------|
| `/health/live` | Liveness | Is app alive? | App responds (no dependency checks) |
| `/health/ready` | Readiness | Can app serve traffic? | All dependencies healthy |
| `/health/startup` | Startup (K8s 1.16+) | Is app initialized? | Initial warmup complete |
### When Each Probe Fails
| Probe | Failure Action | Kubernetes Behavior |
|-------|----------------|---------------------|
| Liveness | Container restart | kubelet restarts container |
| Readiness | Remove from service | Traffic stopped, no restart |
| Startup | Delay other probes | Liveness/Readiness paused |
---
## Phase 3: Research Health Check Patterns
Use MCP tools for current documentation.
**For .NET:**
```
MCP ref: "ASP.NET Core health checks Kubernetes probes"
Context7: /dotnet/aspnetcore
```
**For Python:**
```
MCP ref: "FastAPI health check endpoint Kubernetes"
Context7: /tiangolo/fastapi
```
**Key Patterns to Research:**
1. Database health checks (connection pool)
2. Redis connectivity check
3. Custom health check implementation
4. Health check response writer customization
---
## Phase 4: Configure Kubernetes Probes
Determine probe timing based on application characteristics.
### Probe Configuration
| Parameter | Liveness | Readiness | Startup |
|-----------|----------|-----------|---------|
| `initialDelaySeconds` | 10 | 5 | 0 |
| `periodSeconds` | 10 | 5 | 5 |
| `timeoutSeconds` | 5 | 3 | 3 |
| `failureThreshold` | 3 | 3 | 30 |
| `successThreshold` | 1 | 1 | 1 |
**Startup Probe Calculation:**
```
Max startup time = initialDelaySeconds + (periodSeconds × failureThreshold)
Default: 0 + (5 × 30) = 150 seconds
```
---
## Phase 5: Generate Implementation
### .NET Output Files
| File | Purpose |
|------|---------|
| `Extensions/HealthCheckExtensions.cs` | Health check registration |
| `HealthChecks/StartupHealthCheck.cs` | Custom startup check |
**Generation Process:**
1. Use MCP ref for current ASP.NET Core health checks API
2. Generate HealthCheckExtensions with:
- AddHealthChecks registration
- Database health check (if detected)
- Redis health check (if detected)
- Custom StartupHealthCheck
3. Configure three endpoints with proper tags
**Packages to Add:**
- `AspNetCore.HealthChecks.NpgSql` (if PostgreSQL)
- `AspNetCore.HealthChecks.Redis` (if Redis)
- `AspNetCore.HealthChecks.MySql` (if MySQL)
**Registration Code:**
```csharp
builder.Services.AddHealthCheckServices(builder.Configuration);
// ...
app.MapHealthCheckEndpoints();
```
### Python Output Files
| File | Purpose |
|------|---------|
| `routes/health.py` | Health check router |
| `services/health_checker.py` | Dependency health checks |
**Generation Process:**
1. Use MCP ref for FastAPI health patterns
2. Generate health router with:
- /health/live endpoint (simple)
- /health/ready endpoint (with dependency checks)
- /health/startup endpoint
3. Generate health_checker service for dependency verification
**Registration Code:**
```python
from routes.health import health_router
app.include_router(health_router)
```
### Kubernetes Manifest Snippet
Generate for inclusion in deployment.yaml:
```yaml
livenessProbe:
httpGet:
path: /health/live
port: 5000
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /health/ready
port: 5000
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 3
failureThreshold: 3
startupProbe:
httpGet:
path: /health/startup
port: 5000
periodSeconds: 5
failureThreshold: 30
```
---
## Phase 6: Validate
**Validation Steps:**
1. **Syntax check:**
- .NET: `dotnet build --no-restore`
- Python: `python -m py_compile routes/health.py`
2. **Endpoint test:**
```bash
curl http://localhost:5000/health/live
curl http://localhost:5000/health/ready
curl http://localhost:5000/health/startup
```
3. **Verify response format:**
```json
{
"status": "Healthy",
"checks": {
"database": { "status": "Healthy", "duration": "00:00:00.0234" },
"redis": { "status": "Healthy", "duration": "00:00:00.0012" }
},
"totalDuration": "00:00:00.0250"
}
```
4. **Dependency failure test:**
- Stop database
- Verify `/health/ready` returns 503
- Verify `/health/live` still returns 200
---
## Return to Coordinator
```json
{
"status": "success",
"files_created": [
"Extensions/HealthCheckExtensions.cs",
"HealthChecks/StartupHealthCheck.cs"
],
"packages_added": [
"AspNetCore.HealthChecks.NpgSql"
],
"registration_code": "builder.Services.AddHealthCheckServices(configuration);",
"message": "Configured health checks with liveness, readiness, and startup probes"
}
```
---
## Reference Links
- [ASP.NET Core Health Checks](https://learn.microsoft.com/aspnet/core/host-and-deploy/health-checks)
- [Kubernetes Probes](https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/)
- [AWS EKS Health Check Best Practices](https://docs.aws.amazon.com/eks/latest/best-practices/application.html)
---
**Version:** 2.0.0
**Last Updated:** 2026-01-10Related Skills
gainforest-oauth-setup
Implement ATProto OAuth authentication in a Next.js App Router application using gainforest-sdk-nextjs. Use when adding login, logout, session management, or authentication flows that integrate with GainForest, Hypercerts, or ATProto PDSes (climateai.org, gainforest.id).
flowglad-setup
Install and configure the Flowglad SDK for Next.js, Express, and React applications. Use this skill when adding billing to an app, setting up Flowglad for the first time, or configuring SDK providers and route handlers.
data-client-setup
Install and set up @data-client/react or @data-client/vue in a project. Detects project type (NextJS, Expo, React Native, Vue, plain React) and protocol (REST, GraphQL, custom), then hands off to protocol-specific setup skills.
conda-env-setup
This skill should be used when the user asks to "setup conda environment", "configure Python environment", "activate conda automatically", "set conda environment for workspace", or mentions conda environment activation for Claude Code. Provides automatic conda environment configuration for workspaces.
clerk-setup
Add Clerk authentication to any project by following the official quickstart guides.
ccw-maven-setup
Prepares Maven build environment for Claude Code Web by installing Java 25 and configuring Maven proxy. Run automatically before Maven operations in CCW.
bronze-layer-setup
End-to-end Bronze layer creation for testing and demos. Creates table DDLs, generates fake data with Faker, copies from existing sources, and configures Asset Bundle jobs. Covers Unity Catalog compliance, Change Data Feed, automatic liquid clustering, and governance metadata. Use when setting up Bronze layer tables, creating test/demo data, rapid prototyping Medallion Architecture, or bootstrapping a new Databricks project. For Faker-specific patterns (corruption rates, function signatures, provider examples), load the faker-data-generation skill.
bknd-client-setup
Use when setting up Bknd SDK in a frontend application. Covers Api class initialization, token storage, auth state handling, React integration with BkndBrowserApp and useApp hook, framework-specific setup (Vite, Next.js, standalone), and TypeScript type registration.
astro-setup
Astro project initialization and configuration patterns. Use when setting up new Astro projects or configuring Astro features.
angular-app-setup
Creates an Angular 20 app directly in the current folder with strict defaults, deterministic non-interactive flags, and preflight safety checks. Use when the user asks to create, scaffold, or initialize Angular 20 in place and wants build/test verification.
ai-sdk-setup
Install the Vercel AI SDK with AI Elements components. Build a streaming chat interface with the useChat hook.
setup-design-system
Initialize the design system or create new UI components with accessibility, Tailwind/shadcn integration, and documentation. Use when setting up the initial design system, adding component categories, or creating complex UI components that need design review.