jpskill.com
🛠️ 開発・MCP コミュニティ

health-check-endpoints

Implement comprehensive health check endpoints for liveness, readiness, and dependency monitoring. Use when deploying to Kubernetes, implementing load balancer health checks, or monitoring service availability.

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o health-check-endpoints.zip https://jpskill.com/download/21443.zip && unzip -o health-check-endpoints.zip && rm health-check-endpoints.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/21443.zip -OutFile "$d\health-check-endpoints.zip"; Expand-Archive "$d\health-check-endpoints.zip" -DestinationPath $d -Force; ri "$d\health-check-endpoints.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して health-check-endpoints.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → health-check-endpoints フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
5

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

[Skill 名] health-check-endpoints

ヘルスチェックエンドポイント

目次

概要

サービスの健全性、依存関係、トラフィックを受け入れる準備状況を監視するために、ヘルスチェックエンドポイントを実装します。

使用場面

  • Kubernetes の liveness および readiness プローブ
  • ロードバランサーのヘルスチェック
  • サービスディスカバリと登録
  • 監視およびアラートシステム
  • サーキットブレーカーの決定
  • オートスケーリングのトリガー
  • デプロイの検証

クイックスタート

最小限の動作例です。

import express from "express";
import { Pool } from "pg";
import Redis from "ioredis";

interface HealthStatus {
  status: "healthy" | "degraded" | "unhealthy";
  timestamp: string;
  uptime: number;
  checks: Record<string, CheckResult>;
  version?: string;
  environment?: string;
}

interface CheckResult {
  status: "pass" | "fail" | "warn";
  time: number;
  output?: string;
  error?: string;
}

class HealthCheckService {
  private startTime = Date.now();
  private version = process.env.APP_VERSION || "1.0.0";
  private environment = process.env.NODE_ENV || "development";

// ... (完全な実装についてはリファレンスガイドを参照してください)

リファレンスガイド

references/ ディレクトリにある詳細な実装です。

ガイド 内容
Express.js Health Checks Express.js ヘルスチェック
Spring Boot Actuator-Style (Java) Spring Boot Actuator スタイル (Java)
Python Flask Health Checks Python Flask ヘルスチェック

ベストプラクティス

✅ DO (推奨事項)

  • liveness プローブと readiness プローブを個別に実装します
  • liveness プローブは軽量に保ちます
  • readiness プローブでは重要な依存関係をチェックします
  • 適切な HTTP ステータスコードを返します
  • 応答時間メトリクスを含めます
  • 妥当なタイムアウトを設定します
  • ヘルスチェックの結果を短時間キャッシュします
  • バージョンと環境情報を含めます
  • ヘルスチェックの失敗を監視します

❌ DON'T (非推奨事項)

  • liveness プローブで依存関係をチェックします
  • ヘルスチェックが失敗したときに 200 を返します
  • 応答に時間がかかりすぎます
  • 重要な依存関係のチェックをスキップします
  • 機密情報を公開します
  • ヘルスチェックの失敗を無視します
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

Health Check Endpoints

Table of Contents

Overview

Implement health check endpoints to monitor service health, dependencies, and readiness for traffic.

When to Use

  • Kubernetes liveness and readiness probes
  • Load balancer health checks
  • Service discovery and registration
  • Monitoring and alerting systems
  • Circuit breaker decisions
  • Auto-scaling triggers
  • Deployment verification

Quick Start

Minimal working example:

import express from "express";
import { Pool } from "pg";
import Redis from "ioredis";

interface HealthStatus {
  status: "healthy" | "degraded" | "unhealthy";
  timestamp: string;
  uptime: number;
  checks: Record<string, CheckResult>;
  version?: string;
  environment?: string;
}

interface CheckResult {
  status: "pass" | "fail" | "warn";
  time: number;
  output?: string;
  error?: string;
}

class HealthCheckService {
  private startTime = Date.now();
  private version = process.env.APP_VERSION || "1.0.0";
  private environment = process.env.NODE_ENV || "development";

// ... (see reference guides for full implementation)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
Express.js Health Checks Express.js Health Checks
Spring Boot Actuator-Style (Java) Spring Boot Actuator-Style (Java)
Python Flask Health Checks Python Flask Health Checks

Best Practices

✅ DO

  • Implement separate liveness and readiness probes
  • Keep liveness probes lightweight
  • Check critical dependencies in readiness
  • Return appropriate HTTP status codes
  • Include response time metrics
  • Set reasonable timeouts
  • Cache health check results briefly
  • Include version and environment info
  • Monitor health check failures

❌ DON'T

  • Make liveness probes check dependencies
  • Return 200 for failed health checks
  • Take too long to respond
  • Skip important dependency checks
  • Expose sensitive information
  • Ignore health check failures

同梱ファイル

※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。