Token导航 LogoToken导航TokenDH.com
研究检索external-servicegithub未标认证来源可访问clear审计通过

ln-774-healthcheck-setupln 774 健康检查设置

Agent Skill

ln-774-healthcheck-setup 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,864

周安装

275

GitHub Stars

437

下载量

2,222
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:ln-774-healthcheck-setup(ln 774 健康检查设置)
来源仓库:https://github.com/levnikolaevich/claude-code-skills
仓库路径:skills/ln-774-healthcheck-setup
安装命令:
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-774-healthcheck-setup
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/levnikolaevich/claude-code-skills --skill ln-774-healthcheck-setup

简介

用于查找、检索和筛选相关信息。ln-774-healthcheck-setup 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

  • 适合根据关键词或任务场景快速定位候选结果。
  • 可结合来源仓库和原始 README 核验具体用法。
  • 安装前建议确认权限范围和维护状态。
  • 注意是否会触发联网、命令执行或文件读写操作。

SKILL.md

ln-774-healthcheck-setup

Type: L3 Worker Category: 7XX Project Bootstrap

Configures health check endpoints for Kubernetes probes and monitoring.


Overview

AspectDetails
InputContext Store from ln-770
OutputHealth 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 DetectionPython Detection
PostgreSQLNpgsql in csprojpsycopg2 or asyncpg in requirements
MySQLMySql.Data in csprojmysql-connector-python in requirements
RedisStackExchange.Redis in csprojredis in requirements
RabbitMQRabbitMQ.Client in csprojpika or aio-pika in requirements
MongoDBMongoDB.Driver in csprojpymongo in requirements

Phase 2: Design Health Check Strategy

Define three types of health endpoints per Kubernetes best practices.

Endpoint Types

EndpointProbe TypePurposeChecks
/health/liveLivenessIs app alive?App responds (no dependency checks)
/health/readyReadinessCan app serve traffic?All dependencies healthy
/health/startupStartup (K8s 1.16+)Is app initialized?Initial warmup complete

When Each Probe Fails

ProbeFailure ActionKubernetes Behavior
LivenessContainer restartkubelet restarts container
ReadinessRemove from serviceTraffic stopped, no restart
StartupDelay other probesLiveness/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

ParameterLivenessReadinessStartup
initialDelaySeconds1050
periodSeconds1055
timeoutSeconds533
failureThreshold3330
successThreshold111

Startup Probe Calculation:

Max startup time = initialDelaySeconds + (periodSeconds × failureThreshold)
Default: 0 + (5 × 30) = 150 seconds

Phase 5: Generate Implementation

.NET Output Files

FilePurpose
Extensions/HealthCheckExtensions.csHealth check registration
HealthChecks/StartupHealthCheck.csCustom 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

  1. 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:

builder.Services.AddHealthCheckServices(builder.Configuration);
// ...
app.MapHealthCheckEndpoints();

Python Output Files

FilePurpose
routes/health.pyHealth check router
services/health_checker.pyDependency 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

  1. Generate health_checker service for dependency verification

Registration Code:

from routes.health import health_router
app.include_router(health_router)

Kubernetes Manifest Snippet

Generate for inclusion in deployment.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

  1. Endpoint test: curl http://localhost:5000/health/live curl http://localhost:5000/health/ready curl http://localhost:5000/health/startup
  2. Verify response format: {"status": "Healthy", "checks": {"database": {"status": "Healthy", "duration": "00:00:00.0234"}, "redis": {"status": "Healthy", "duration": "00:00:00.0012"}}, "totalDuration": "00:00:00.0250"}
  3. Dependency failure test:

- Stop database - Verify /health/ready returns 503 - Verify /health/live still returns 200


Return to Coordinator

{
  "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


Critical Rules

  • Three separate endpoints/health/live, /health/ready, /health/startup per Kubernetes best practices
  • Liveness must not check dependencies — only confirms app is alive (avoids cascade restarts)
  • Readiness checks all dependencies — DB, Redis, RabbitMQ connectivity verified
  • Auto-detect dependencies from project files — scan csproj/requirements for known packages
  • Idempotent — if AddHealthChecks/MapHealthChecks or /health route exists, return status: "skipped"

Definition of Done

  • Context Store received (stack, project root)
  • Dependencies detected (PostgreSQL, MySQL, Redis, RabbitMQ, MongoDB)
  • Health check endpoints generated (live, ready, startup) for detected stack
  • Kubernetes probe manifest snippet generated with proper timing parameters
  • Syntax validated (dotnet build or py_compile)
  • Structured JSON response returned to ln-770 coordinator

Version: 2.0.0 Last Updated: 2026-01-10

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.11%
按下载量换算625

Gemini CLI

24.85%
按下载量换算552

Codex

18.81%
按下载量换算418

OpenCode

12.94%
按下载量换算288

Antigravity

7.29%
按下载量换算162

windsurf

3.2%
按下载量换算71

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

external-service

该 Skill 可能调用第三方服务、云服务或外部模型 API,使用前需要确认账号、额度、数据发送范围和服务条款。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。

来源信息

继续浏览同类 Skills