Token导航 LogoToken导航

Agent Skill · 开发

monitoring-setup(监控设置)

monitoring-setup 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

monitoring-setup 是开发类 Agent Skill,可用宿主为 Codex、Claude、Cursor、Gemini CLI,通过GitHub 仓库获取,权限为需要联网;许可证信息还不明确,第三方扫描已通过,按安装量在开发类的 21,746 个 Skill 里排第 19,580。

总安装 267周安装 11GitHub Stars 4下载 87核验 2026-05-01

安装说明

本站只整理中文说明,不托管安装包,也不代用户安装。
GitHub
许可证
unknown

安装方式

通过对话安装

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

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

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/accolver/skill-maker --skill monitoring-setup

这个 Skill 是做什么的

开发类 Skill 面向写代码、改代码和排查问题,一般会读写仓库文件,部分还会执行构建或测试命令。

monitoring-setup 为服务添加生产级可观测性,集成健康检查、指标、追踪与告警形成完整监控体系。适用于准备系统上线或增强 SLO 支持,输出可直接对接 Prometheus、Grafana、OpenTelemetry 等标准栈。提供代码插桩模板、告警规则和运行手册,确保监控即结构化输出而非临时日志。

安装命令为 npx skills add https://github.com/accolver/skill-maker --skill monitoring-setup,需写入应用代码与配置权限。注意:不用于分析已有监控系统的故障,而是补充缺失的监控覆盖。

来源仓库内路径:skills/monitoring-setup

上手步骤

4 步
  1. 1

    确认自己的宿主工具

    公开资料标注支持 Codex、Claude、Cursor、Gemini CLI;先确认自己用的是其中之一,再按对应工具的 Skills 目录放置。

  2. 2

    拿到安装命令

    可以直接复制的命令是 npx skills add https://github.com/accolver/skill-maker --skill monitoring-setup;命令里的占位符换成自己的路径或密钥再执行。

  3. 3

    安装后重启宿主

    命令执行完要完全退出宿主工具再打开,让新装的 Skill 被重新扫描到,否则列表里可能看不到。

  4. 4

    按最小权限试用

    它需要需要联网,先在测试目录或测试账号里跑,确认没问题再放到正式项目。

常见问题

6 条

monitoring-setup 怎么安装?

在终端执行 npx skills add https://github.com/accolver/skill-maker --skill monitoring-setup。装完完全退出宿主工具再打开,让它重新扫描本地 Skill。

monitoring-setup 支持哪些 AI 工具?

公开资料标注支持 Codex、Claude、Cursor、Gemini CLI。其他工具只要能读取本地 Skill 目录,一般也能手动放进去,但要自己确认触发方式是否一致。

monitoring-setup 需要什么权限?

权限级别是需要联网。该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

monitoring-setup 是免费的吗?

公开资料没有标注明确许可证,收费和商用限制都无法确认。正式使用前请到来源仓库核对授权说明。

monitoring-setup 用的人多吗?

公开数据是累计安装 267 次,近一周安装 11 次,下载 87 次,GitHub 4 星。这些数字来自第三方目录统计,只能当作热度参考,不代表质量或安全性。

monitoring-setup 安全吗?

第三方扫描结果为通过,但这只覆盖已知的静态检查项,不能替代自己读一遍源码和安装命令。

值得选的地方和要先想清楚的地方

值得选的地方

  • 同时适配 4 种工具,换客户端不用重新找替代品。
  • 第三方扫描已通过,常见的高风险行为没有命中。

先想清楚的地方

  • 许可证没有明确标注,能不能商用、能不能再分发都不确定。
  • 第三方目录整理,版本更新和行为细节以来源仓库为准。

适不适合你

更适合

  • 已经在用 Codex,想直接扩展它能力的人。
  • 需要处理开发类任务、又不想每次都手写提示词的人。

不太适合

  • 需要明确授权才能用到公司项目里的场景。
  • 需要厂商级技术支持和 SLA 的生产系统。

开发类 Skill 对比

6 个同类
Skill总安装GitHub 星权限许可证扫描
skill-vetter

技能审查员 · OpenClaw

8,779,018986操作浏览器MIT-0通过
ontology

本体论 · OpenClaw

6,636,960576只读MIT-0通过
entra-app-registration

内部应用程序注册 · Codex、Claude

6,631,872764接触敏感数据未明确通过
entra-app-registration

内部应用程序注册 · Codex、Claude

3,757,680201接触敏感数据未明确通过
nano-banana-pro

纳米香蕉专业版 · OpenClaw

3,526,898364接触敏感数据MIT-0有提醒
monitoring-setup

监控设置 · 本页

2674需要联网未明确通过

按安装量取同分类前几名;数字来自第三方目录统计,只作热度参考,不代表质量结论。

SKILL.md 原文

Monitoring Setup

Overview

Add production-grade observability to any service by instrumenting health checks, metrics, tracing, and alerts as a cohesive system. The skill treats monitoring as structured output — not ad-hoc logging — producing files that integrate with standard observability stacks (Prometheus, Grafana, OpenTelemetry, PagerDuty/OpsGenie).

When to use

  • The task is to instrument or operationalize an existing service with health checks, metrics, tracing, alerts, or runbooks.
  • The user is preparing a system for production readiness, SLOs, or on-call support.
  • The deliverable is observability configuration, code instrumentation, and operational guidance.
  • The problem is missing monitoring coverage, not analysis of an already-failing monitoring stack.

Do NOT use when:

  • The task is debugging a current incident or broken observability pipeline.
  • The request is only vendor-specific dashboard clicking with no reusable monitoring design.
  • The work is log aggregation alone without broader observability requirements.

Response format

Always structure the final response with these top-level sections, in this order:

  1. Summary — state the task, scope, and main conclusion in 1-3 sentences.
  2. Decision / Approach — state the key classification, assumptions, or chosen path.
  3. Artifacts — provide the primary deliverable(s) for this skill. Use clear subheadings for multiple files, commands, JSON payloads, queries, or documents.
  4. Validation — state checks performed, important risks, caveats, or unresolved questions.
  5. Next steps — list concrete follow-up actions, or write None if nothing remains.

Rules:

  • Do not omit a section; write None when a section does not apply.
  • If files are produced, list each file path under Artifacts before its contents.
  • If commands, JSON, SQL, YAML, or code are produced, put each artifact in fenced code blocks with the correct language tag when possible.
  • Keep section names exactly as written above so output stays predictable across skills.

Workflow

1. Add health check endpoints

Create three distinct health check endpoints. Each serves a different purpose in orchestration systems like Kubernetes:

EndpointPathPurposeWhat to check
LivenessGET /healthz"Is the process alive?"Process is running, not deadlocked. Minimal checks only.
ReadinessGET /readyz"Can this instance serve traffic?"Database connected, cache warm, dependencies reachable.
StartupGET /startupz"Has initialization completed?"Migrations run, config loaded, initial data seeded.

Critical distinction: Liveness should NEVER check external dependencies. If your liveness probe checks the database and the DB goes down, Kubernetes will restart your healthy pods — making an outage worse. Liveness = "is this process fundamentally broken?" Readiness = "should traffic be routed here?"

Response format:

{
  "status": "ok",
  "checks": {
    "database": { "status": "ok", "latency_ms": 2 },
    "cache": { "status": "ok", "latency_ms": 1 },
    "external_api": { "status": "degraded", "latency_ms": 450 }
  },
  "version": "1.2.3",
  "uptime_seconds": 84321
}

Return HTTP 200 for healthy, 503 for unhealthy. Include individual check statuses so operators can see which dependency is failing.

2. Instrument metrics collection

Use the RED and USE methods to ensure comprehensive coverage:

RED method (for request-driven services):

MetricWhat to measurePrometheus typeExample
RateRequests per secondCounterhttp_requests_total{method, path, status}
ErrorsFailed requests per secondCounterhttp_errors_total{method, path, code}
DurationRequest latency distributionHistogramhttp_request_duration_seconds{method, path}

USE method (for resource-driven components):

MetricWhat to measurePrometheus typeExample
Utilization% of resource capacity in useGaugedb_pool_utilization_ratio
SaturationQueue depth / backpressureGaugerequest_queue_length
ErrorsResource-level error countCounterdb_connection_errors_total

Implementation requirements:

  • Use Prometheus client library for the service's language
  • Expose metrics at GET /metrics in Prometheus exposition format
  • Use histogram buckets appropriate for the service: [0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1, 2.5, 5, 10] seconds for HTTP
  • Label metrics with method, path (normalized), and status_code
  • Add a metrics middleware that instruments ALL requests automatically
  • Include process metrics (memory, CPU, GC, event loop lag where applicable)

3. Add distributed tracing

Implement OpenTelemetry-compatible tracing with correlation ID propagation:

Trace context propagation:

  • Generate a unique trace-id (128-bit hex) for each incoming request without one
  • Propagate via W3C Trace Context headers: traceparent, tracestate
  • Also support X-Correlation-ID / X-Request-ID for backward compatibility
  • Pass trace context to ALL downstream HTTP calls, message queue publishes, and async jobs

Span creation:

  • Create a root span for each incoming request
  • Create child spans for: database queries, external HTTP calls, cache operations, message queue operations
  • Include span attributes: http.method, http.url, http.status_code, db.system, db.statement
  • Set span status to ERROR on failures with error message

Configuration output — generate a trace config file:

// tracing.js - OpenTelemetry configuration
const { NodeSDK } = require("@opentelemetry/sdk-node");
const { getNodeAutoInstrumentations } = require(
  "@opentelemetry/auto-instrumentations-node",
);
const { OTLPTraceExporter } = require(
  "@opentelemetry/exporter-trace-otlp-http",
);

const sdk = new NodeSDK({
  traceExporter: new OTLPTraceExporter({
    url: process.env.OTEL_EXPORTER_OTLP_ENDPOINT ||
      "http://localhost:4318/v1/traces",
  }),
  instrumentations: [getNodeAutoInstrumentations()],
  serviceName: process.env.OTEL_SERVICE_NAME || "my-service",
});

sdk.start();

4. Configure alert thresholds

Define alerts based on SLOs (Service Level Objectives), not arbitrary values. The process:

  1. Define SLOs — e.g., "99.9% of requests complete in < 500ms"
  2. Derive SLIs — the metric that measures the SLO (e.g., http_request_duration_seconds)
  3. Set burn rate alerts — alert when you're consuming error budget too fast

Alert threshold guidelines:

SLO TargetBurn Rate 1hBurn Rate 6hBurn Rate 24h
99.9%14.4x6x3x
99.5%14.4x6x3x
99.0%14.4x6x3x

Alert rule format (Prometheus alerting rules):

groups:
  - name: slo-alerts
    rules:
      - alert: HighErrorRate
        expr: |
          (
            sum(rate(http_requests_total{status=~"5.."}[5m]))
            /
            sum(rate(http_requests_total[5m]))
          ) > (1 - 0.999) * 14.4
        for: 5m
        labels:
          severity: critical
          team: platform
        annotations:
          summary: "Error rate burning through SLO budget at 14.4x"
          description: "Current error rate: {{ $value | humanizePercentage }}"
          runbook: "https://runbooks.example.com/high-error-rate"
          dashboard: "https://grafana.example.com/d/slo-overview"

      - alert: HighLatency
        expr: |
          histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))
          > 0.5
        for: 5m
        labels:
          severity: warning
          team: platform
        annotations:
          summary: "P99 latency exceeds 500ms SLO target"
          runbook: "https://runbooks.example.com/high-latency"

Escalation policy:

SeverityResponse TimeNotification ChannelEscalation After
critical5 minutesPagerDuty page15 min to lead
warning30 minutesSlack #alerts2 hours to team
infoNext businessSlack #monitoringNone

Every alert MUST include a runbook annotation linking to resolution steps.

5. Create runbook templates

Generate a runbook for each alert with this structure:

# Runbook: [Alert Name]

## Alert Details

- **Severity:** critical/warning/info
- **SLO:** Which SLO this protects
- **Dashboard:** Link to relevant Grafana dashboard

## Symptoms

What the operator will observe when this fires.

## Diagnosis Steps

1. Check [specific metric/dashboard]
2. Look for [specific log pattern]
3. Verify [specific dependency]

## Resolution

### If caused by [root cause A]

1. Step-by-step fix

### If caused by [root cause B]

1. Step-by-step fix

## Escalation

- If not resolved in [time]: escalate to [team/person]
- If customer-facing: notify [channel]

6. Generate dashboard configuration

Produce a Grafana dashboard JSON or config covering:

  • Overview row: Request rate, error rate, latency P50/P95/P99
  • Health row: Health check status, uptime, version
  • Resources row: CPU, memory, DB pool utilization, queue depth
  • SLO row: Error budget remaining, burn rate, SLO compliance

Checklist

  • Liveness endpoint at /healthz — checks process only, NOT dependencies
  • Readiness endpoint at /readyz — checks all dependencies with individual status
  • Startup endpoint at /startupz — checks initialization completion
  • Health responses include status, individual checks, version, uptime
  • Metrics endpoint at /metrics in Prometheus exposition format
  • RED metrics: request rate, error rate, duration histogram
  • USE metrics: utilization, saturation, errors for resources
  • Metrics middleware instruments all requests automatically
  • Trace context propagation via W3C headers (traceparent)
  • Correlation ID generated for requests without trace context
  • Child spans for DB queries, HTTP calls, cache, message queues
  • Alert thresholds derived from SLOs, not arbitrary values
  • Every alert has severity, team label, runbook link, and dashboard link
  • Escalation policy defined per severity level
  • Runbook template generated for each alert
  • Dashboard config covers request metrics, health, resources, and SLOs

Example

Input: "Add monitoring to our Express.js order service"

Output files produced:

FileContents
health.jsLiveness, readiness, startup route handlers
metrics.jsPrometheus client setup + metrics middleware
tracing.jsOpenTelemetry SDK configuration
alert-rules.ymlPrometheus alerting rules with SLO-based thresholds
runbooks/One markdown file per alert
dashboard.jsonGrafana dashboard configuration

Example health endpoint implementation:

// health.js
const express = require("express");
const router = express.Router();
const { Pool } = require("pg");

const startTime = Date.now();
let startupComplete = false;

// Liveness - process alive, no dependency checks
router.get("/healthz", (req, res) => {
  res.status(200).json({
    status: "ok",
    uptime_seconds: Math.floor((Date.now() - startTime) / 1000),
  });
});

// Readiness - can serve traffic
router.get("/readyz", async (req, res) => {
  const checks = {};
  let healthy = true;

  // Check database
  try {
    const start = Date.now();
    await pool.query("SELECT 1");
    checks.database = { status: "ok", latency_ms: Date.now() - start };
  } catch (err) {
    checks.database = { status: "error", error: err.message };
    healthy = false;
  }

  // Check Redis
  try {
    const start = Date.now();
    await redis.ping();
    checks.cache = { status: "ok", latency_ms: Date.now() - start };
  } catch (err) {
    checks.cache = { status: "error", error: err.message };
    healthy = false;
  }

  res.status(healthy ? 200 : 503).json({
    status: healthy ? "ok" : "unhealthy",
    checks,
    version: process.env.APP_VERSION || "unknown",
    uptime_seconds: Math.floor((Date.now() - startTime) / 1000),
  });
});

// Startup - initialization complete
router.get("/startupz", (req, res) => {
  res.status(startupComplete ? 200 : 503).json({
    status: startupComplete ? "ok" : "starting",
    uptime_seconds: Math.floor((Date.now() - startTime) / 1000),
  });
});

function markStartupComplete() {
  startupComplete = true;
}

module.exports = { router, markStartupComplete };

Common mistakes

MistakeFix
Liveness checks database/external depsLiveness = process health only. Move dependency checks to readiness. DB down + liveness fail = cascading restarts.
Using console.log instead of metricsLogs are for debugging, metrics are for monitoring. Use counters/histograms for anything you'd alert on.
Arbitrary alert thresholds ("error > 10")Derive thresholds from SLOs and burn rates. "10 errors" means nothing without knowing request volume.
No correlation ID propagationGenerate trace ID on ingress, propagate to ALL downstream calls. Without this, distributed debugging is impossible.
Missing runbook links on alertsEvery alert must link to a runbook. An alert without a runbook is just noise that trains operators to ignore alerts.
Single health endpoint for everythingSeparate liveness/readiness/startup. Kubernetes uses them differently; conflating them causes incorrect pod lifecycle decisions.
Metrics without labelsAlways label with method, path, status. Aggregate metrics hide the signal — you need to slice by dimension.
No histogram buckets for latencyUse histograms, not averages. P99 latency matters more than mean. Configure buckets for your expected range.

Quick reference

ComponentOutput fileFormat
Health checkshealth.{js,ts,py}Express/Fastify/Flask routes
Metricsmetrics.{js,ts,py}Prometheus client + middleware
Tracingtracing.{js,ts,py}OpenTelemetry SDK config
Alert rulesalert-rules.ymlPrometheus alerting rules
Runbooksrunbooks/*.mdMarkdown per alert
Dashboarddashboard.jsonGrafana dashboard JSON

Key principles

  1. Liveness is sacred — Never put dependency checks in liveness probes. A liveness failure triggers a pod restart. If your DB is down and liveness checks the DB, Kubernetes restarts all pods, making recovery harder. Liveness answers only: "is this process fundamentally broken?"
  2. SLOs drive alerts — Every alert threshold must trace back to a Service Level Objective. "Error rate > 1%" is meaningless without knowing the SLO. Use burn rate alerting: alert when you're consuming error budget faster than sustainable.
  3. Metrics over logs — Anything you would alert on must be a metric, not a log line. Metrics are aggregatable, queryable, and cheap. Log-based alerting is fragile, expensive, and misses patterns that counters catch naturally.
  4. Trace everything cross-service — Every request entering the system gets a trace ID. Every downstream call propagates it. Without end-to-end tracing, debugging distributed systems requires correlating timestamps across log streams — which doesn't scale.
  5. Alerts without runbooks are noise — Every alert must link to a runbook with diagnosis steps and resolution procedures. Operators receiving alerts without context will either ignore them or waste time investigating from scratch. Runbooks encode institutional knowledge.

平台分布

Codex

36.12%
按下载量换算31

Claude

32.41%
按下载量换算28

Cursor

19.02%
按下载量换算17

Gemini CLI

8.83%
按下载量换算8

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。目前只有一个公开来源,建议同时核对源仓库。

继续浏览同类 Skills