AGENT SKILL

监控技术栈部署与配置

deploying-monitoring-stacks

用于部署监控技术栈,包括 Prometheus、Grafana 和 Datadog。可通过“部署监控技术栈”“搭建 Prometheus”“配置 Grafana”或“安装 Datadog 代理”等短语触发。生成生产级可用的配置,涵盖指标采集、可视化仪表盘和告警规则。

适用职业SRE 工程师
License 许可
MIT
最近更新
2025-12-18
Stars
★ 29
Forks
9

01 前言 Front Matter

name
deploying-monitoring-stacks
license
MIT
version
1.0.0
description
Use when deploying monitoring stacks including Prometheus, Grafana, and Datadog. Trigger with phrases like "deploy monitoring stack", "setup prometheus", "configure grafana", or "install datadog agent". Generates production-ready configurations with metric collection, visualization dashboards, and alerting rules.
allowed-tools
[ "Read", "Write", "Edit", "Grep", "Glob", "Bash(docker:*)", "Bash(kubectl:*)" ]

02 资源文件 18

03 SKILL.md 正文

Prerequisites

Before using this skill, ensure:

  • Target infrastructure is identified (Kubernetes, Docker, bare metal)
  • Metric endpoints are accessible from monitoring platform
  • Storage backend is configured for time-series data
  • Alert notification channels are defined (email, Slack, PagerDuty)
  • Resource requirements are calculated based on scale

Instructions

  1. Select Platform: Choose Prometheus/Grafana, Datadog, or hybrid approach
  2. Deploy Collectors: Install exporters and agents on monitored systems
  3. Configure Scraping: Define metric collection endpoints and intervals
  4. Set Up Storage: Configure retention policies and data compaction
  5. Create Dashboards: Build visualization panels for key metrics
  6. Define Alerts: Create alerting rules with appropriate thresholds
  7. Test Monitoring: Verify metrics flow and alert triggering

Output

Prometheus + Grafana (Kubernetes):

# {baseDir}/monitoring/prometheus.yaml
apiVersion: v1
kind: ConfigMap
metadata:
  name: prometheus-config
data:
  prometheus.yml: |
    global:
      scrape_interval: 15s
      evaluation_interval: 15s
    scrape_configs:
      - job_name: 'kubernetes-pods'
        kubernetes_sd_configs:
          - role: pod
        relabel_configs:
          - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
            action: keep
            regex: true
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: prometheus
spec:
  replicas: 1
  template:
    spec:
      containers:
      - name: prometheus
        image: prom/prometheus:latest
        args:
          - '--config.file=/etc/prometheus/prometheus.yml'
          - '--storage.tsdb.retention.time=30d'
        ports:
        - containerPort: 9090

Grafana Dashboard Configuration:

{
  "dashboard": {
    "title": "Application Metrics",
    "panels": [
      {
        "title": "CPU Usage",
        "type": "graph",
        "targets": [
          {
            "expr": "rate(container_cpu_usage_seconds_total[5m])"
          }
        ]
      }
    ]
  }
}

Error Handling

Metrics Not Appearing

  • Error: "No data points"
  • Solution: Verify scrape targets are accessible and returning metrics

High Cardinality

  • Error: "Too many time series"
  • Solution: Reduce label combinations or increase Prometheus resources

Alert Not Firing

  • Error: "Alert condition met but no notification"
  • Solution: Check Alertmanager configuration and notification channels

Dashboard Load Failure

  • Error: "Failed to load dashboard"
  • Solution: Verify Grafana datasource configuration and permissions

Resources

04 同仓库更多 Skills

BbgnsurfTech
BbgnsurfTech/claude-skills-collection

UI 视觉回归测试

testing-visual-regression

使用截图比较检测 UI 组件中的视觉变化。 在检测意外的 UI 更改或像素差异时使用。 用“测试视觉变化”、“比较截图”或“检测 UI 回归”等短语触发。

测试工程师测试与质量保障
★ 29
BbgnsurfTech
BbgnsurfTech/claude-skills-collection

单元测试自动生成

generating-unit-tests

从源代码自动生成全面的单元测试,覆盖正常路径、边界条件和错误情况。 在为函数、类或模块创建测试覆盖时使用。 用“生成单元测试”、“为…创建测试”或“添加测试覆盖”等短语触发。

测试工程师测试与质量保障
★ 29
BbgnsurfTech
BbgnsurfTech/claude-skills-collection

测试报告生成与可视化

generating-test-reports

生成包含指标、覆盖率和可视化内容的全面测试报告。 在执行专项测试时使用。 用“生成测试报告”、“创建测试文档”或“显示测试指标”等短语触发。

测试工程师测试与质量保障
★ 29
BbgnsurfTech
BbgnsurfTech/claude-skills-collection

测试执行编排与协调

orchestrating-test-execution

协调跨多个环境和框架的并行测试执行。 在执行专项测试时使用。 用“编排测试”、“运行并行测试”或“协调测试执行”等短语触发。

测试工程师测试与质量保障
★ 29
BbgnsurfTech
BbgnsurfTech/claude-skills-collection

managing-test-environments

Provision and manage isolated test environments with configuration and data. Use when performing specialized testing. Trigger with phrases like "manage test environment", "provision test env", or "setup test infrastructure".

★ 29
BbgnsurfTech
BbgnsurfTech/claude-skills-collection

generating-test-doubles

Generate mocks, stubs, spies, and fakes for dependency isolation. Use when creating mocks, stubs, or test isolation fixtures. Trigger with phrases like "generate mocks", "create test doubles", or "setup stubs".

★ 29