重要前提
安装AI Skills的关键前提是:必须科学上网,且开启TUN模式,这一点至关重要,直接决定安装能否顺利完成,在此郑重提醒三遍:科学上网,科学上网,科学上网。查看完整安装教程 →
health-check-endpoints by secondsky/claude-skills
npx skills add https://github.com/secondsky/claude-skills --skill health-check-endpoints实现健康检查以监控服务可用性和就绪状态。
| 探针 | 目的 | 失败操作 |
|---|---|---|
| 存活探针 | 进程是否存活? | 重启容器 |
| 就绪探针 | 能否处理流量? | 从负载均衡器中移除 |
| 启动探针 | 应用是否已启动? | 延迟其他探针 |
| 深度探针 | 所有依赖是否健康? | 触发告警 |
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);
});
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
livenessProbe:
httpGet:
path: /health/live
port: 3000
initialDelaySeconds: 15
periodSeconds: 10
failureThreshold: 3
readinessProbe:
httpGet:
path: /health/ready
port: 3000
initialDelaySeconds: 5
periodSeconds: 10
查看 references/implementations.md 以获取:
每周安装次数
72
仓库
GitHub 星标数
93
首次出现时间
2026年1月25日
安全审计
安装于
claude-code64
gemini-cli58
codex57
cursor57
opencode56
github-copilot54
Implement 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:
Weekly Installs
72
Repository
GitHub Stars
93
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code64
gemini-cli58
codex57
cursor57
opencode56
github-copilot54
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
111,700 周安装
Cubox集成技能:通过Python脚本和Open API自动保存网页与笔记到Cubox
GitHub Agentic Workflows 听写指令:AI驱动工作流语音输入技术指南
GraphQL Schema Stitching & Federation Agent - Apollo Federation v2 超图组合与验证工具
GraphQL Schema Stitcher:Apollo Federation v2 模式缝合工具,统一联邦网关
GraphQL Schema Introspector - 模式自省、查询复杂度分析与API差异报告工具
GraphQL模式自省映射器:API分析、类型生成与模式差异报告