Health check endpoints for liveness, readiness, dependency monitoring. Use for Kubernetes, load balancers, auto-scaling, or encountering probe failures, startup delays, dependency checks, timeout configuration errors.
Implements health check endpoints for liveness, readiness, and dependency monitoring.
npx claudepluginhub secondsky/claude-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
references/implementations.mdImplement health checks for monitoring service availability and readiness.
| Probe | Purpose | Failure Action |
|---|---|---|
| Liveness | Is process alive? | Restart container |
| Readiness | Can handle traffic? | Remove from LB |
| Startup | Has app started? | Delay other probes |
| Deep | All deps healthy? | Trigger alerts |
class HealthChecker {
async checkDatabase() {
const start = Date.now();
try {
await db.query('SELECT 1');
return { status: 'healthy', latency: Date.now() - start };
} catch (err) {
return { status: 'unhealthy', error: String(err?.message || err) };
}
}
async checkRedis() {
try {
await redis.ping();
return { status: 'healthy' };
} catch (err) {
return { status: 'unhealthy', error: err.message };
}
}
async getReadiness() {
const checks = await Promise.all([
this.checkDatabase(),
this.checkRedis()
]);
const healthy = checks.every(c => c.status === 'healthy');
return { healthy, checks };
}
}
// Liveness - lightweight
app.get('/health/live', (req, res) => {
res.json({ status: 'ok', timestamp: new Date().toISOString() });
});
// Readiness - check dependencies
app.get('/health/ready', async (req, res) => {
const health = await healthChecker.getReadiness();
res.status(health.healthy ? 200 : 503).json(health);
});
livenessProbe:
httpGet:
path: /health/live
port: 3000
initialDelaySeconds: 15
periodSeconds: 10
failureThreshold: 3
readinessProbe:
httpGet:
path: /health/ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
See references/implementations.md for:
Expert guidance for Next.js Cache Components and Partial Prerendering (PPR). **PROACTIVE ACTIVATION**: Use this skill automatically when working in Next.js projects that have `cacheComponents: true` in their next.config.ts/next.config.js. When this config is detected, proactively apply Cache Components patterns and best practices to all React Server Component implementations. **DETECTION**: At the start of a session in a Next.js project, check for `cacheComponents: true` in next.config. If enabled, this skill's patterns should guide all component authoring, data fetching, and caching decisions. **USE CASES**: Implementing 'use cache' directive, configuring cache lifetimes with cacheLife(), tagging cached data with cacheTag(), invalidating caches with updateTag()/revalidateTag(), optimizing static vs dynamic content boundaries, debugging cache issues, and reviewing Cache Component implementations.
Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.