/harness-claude:resilience-health-checksfrom harness-claude
Implements health check endpoints (liveness, readiness, startup) for service monitoring in Kubernetes or load-balanced environments.
Claude never picks this skill on its own
Its frontmatter has no description. Without a description, Claude Code leaves it out of the list Claude chooses from. Typing /harness-claude:resilience-health-checks still runs it.
What the skill costs in Claude's context, stage by stage
No description Claude Code can read, so Claude's list leaves it out: only you can start it.
SKILL.md joins the conversation and stays.
Implement health check endpoints for service readiness, liveness, and dependency monitoring
/health/live (liveness), /health/ready (readiness), /health/startup (startup).// health/health-controller.ts
interface HealthComponent {
name: string;
status: 'up' | 'down' | 'degraded';
latency?: number;
details?: string;
}
interface HealthResponse {
status: 'healthy' | 'unhealthy' | 'degraded';
uptime: number;
timestamp: string;
components: HealthComponent[];
}
export class HealthChecker {
private ready = false;
private shuttingDown = false;
private startTime = Date.now();
private checks: Array<{ name: string; check: () => Promise<HealthComponent> }> = [];
registerCheck(name: string, check: () => Promise<HealthComponent>) {
this.checks.push({ name, check });
}
setReady(ready: boolean) {
this.ready = ready;
}
setShuttingDown() {
this.shuttingDown = true;
this.ready = false;
}
async liveness(): Promise<{ status: number; body: object }> {
return {
status: 200,
body: { status: 'alive', uptime: Date.now() - this.startTime },
};
}
async readiness(): Promise<{ status: number; body: HealthResponse }> {
if (this.shuttingDown || !this.ready) {
return {
status: 503,
body: {
status: 'unhealthy',
uptime: Date.now() - this.startTime,
timestamp: new Date().toISOString(),
components: [
{
name: 'server',
status: 'down',
details: this.shuttingDown ? 'shutting down' : 'not ready',
},
],
},
};
}
const components = await Promise.all(
this.checks.map(async ({ name, check }) => {
try {
return await check();
} catch (err) {
return { name, status: 'down' as const, details: String(err) };
}
})
);
const allUp = components.every((c) => c.status === 'up');
const anyDown = components.some((c) => c.status === 'down');
return {
status: anyDown ? 503 : 200,
body: {
status: anyDown ? 'unhealthy' : allUp ? 'healthy' : 'degraded',
uptime: Date.now() - this.startTime,
timestamp: new Date().toISOString(),
components,
},
};
}
}
// Registering checks
const health = new HealthChecker();
health.registerCheck('database', async () => {
const start = Date.now();
await pool.query('SELECT 1');
return { name: 'database', status: 'up', latency: Date.now() - start };
});
health.registerCheck('redis', async () => {
const start = Date.now();
await redis.ping();
return { name: 'redis', status: 'up', latency: Date.now() - start };
});
// Graceful shutdown
process.on('SIGTERM', () => {
health.setShuttingDown();
// Allow in-flight requests to complete
setTimeout(() => process.exit(0), 30000);
});
Kubernetes probe configuration:
livenessProbe:
httpGet: { path: /health/live, port: 3000 }
initialDelaySeconds: 5
periodSeconds: 10
failureThreshold: 3 # Restart after 3 failures
readinessProbe:
httpGet: { path: /health/ready, port: 3000 }
periodSeconds: 5
failureThreshold: 2 # Remove from service after 2 failures
startupProbe:
httpGet: { path: /health/startup, port: 3000 }
periodSeconds: 5
failureThreshold: 30 # Allow up to 150s for startup
Liveness vs readiness: Liveness failure triggers a pod restart. Readiness failure removes the pod from the service endpoint (no traffic routed to it). Making liveness too strict causes unnecessary restarts. Making readiness too lenient routes traffic to broken instances.
Health check anti-patterns:
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub intense-visions/harness-engineering --plugin harness-claudeRead when SKILL.md points to them.
793 skills in this plugin
/a11y-aria-patternsARIA Patterns> Apply ARIA roles, states, and properties correctly to enhance assistive technology support for custom widgets/a11y-color-contrastColor Contrast and Color Independence> Ensure sufficient color contrast ratios and never use color as the sole means of conveying information/a11y-form-patternsAccessible Form Patterns> Build accessible forms with proper labeling, grouped controls, inline validation, and clear error communicationOther plugins' skills for the same job