monitoring

monitoring is a skill for Claude Code, Codex from chaterm/terminal-skills. It costs 8 tokens per session (2,288 once invoked), scanned A, original, Apache-2.0.

A guide to monitoring systems with Prometheus and Grafana. Prometheus collects time-based measurements called metrics, while PromQL is the query language used to calculate values such as request rates, errors, resource use, and latency.

In plain words
What is it for?
Use it to write PromQL queries, configure Prometheus, and measure CPU, memory, disk, network traffic, HTTP errors, request rates, and response-time percentiles.
Why use it?
It removes the need to remember common monitoring queries and configuration examples. Developers can start investigating system health with ready-made patterns.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to write PromQL queries, configure Prometheus, and measure CPU, memory, disk, network traffic, HTTP errors, request rates, and response-time percentiles.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/chaterm/terminal-skills/monitoring
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add chaterm/terminal-skills --skill monitoring
Clone the repo
git clone --depth 1 https://github.com/chaterm/terminal-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for monitoring

README.md
[![agentmods](https://agentmods.dev/badge/skills/chaterm/terminal-skills/monitoring/github.svg)](https://agentmods.dev/skills/chaterm/terminal-skills/monitoring)
Your own site
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/monitoring"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/monitoring/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for monitoring

Your own site · 80×15
<a href="https://agentmods.dev/skills/chaterm/terminal-skills/monitoring"><img src="https://agentmods.dev/badge/skills/chaterm/terminal-skills/monitoring.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 8 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,288 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00008 $0.02288
Opus 5 $0.00004 $0.01144
Sonnet 5 $0.00002 $0.00458
Haiku 4.5 $0.00001 $0.00229

Measured 9d ago against content hash 8d2730ab5b14, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade A, and why

monitoring scanned grade A with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl http://prometheus:9090/api/v1/targets
devops/monitoring/SKILL.md · 345 lines

How it starts

The opening of the file, as written. The whole thing — 345 lines — stays where its author put it; the contents beside it link to each section on GitHub.

监控与告警

概述

Prometheus、Grafana、告警规则配置等技能。

Prometheus

基础查询(PromQL)

# 即时向量
http_requests_total
http_requests_total{job="api", status="200"}

# 范围向量
http_requests_total[5m]

# 偏移
http_requests_total offset 1h

# 聚合
sum(http_requests_total)
sum by (job) (http_requests_total)
sum without (instance) (http_requests_total)

# 速率
rate(http_requests_total[5m])
irate(http_requests_total[5m])

# 增量
increase(http_requests_total[1h])

# 直方图分位数
histogram_quantile(0.95, rate(http_request_duration_seconds_bucket[5m]))

常用查询

# CPU 使用率
100 - (avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100)

# 内存使用率
(1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100

# 磁盘使用率
(1 - node_filesystem_avail_bytes / node_filesystem_size_bytes) * 100

# 网络流量
rate(node_network_receive_bytes_total[5m])
rate(node_network_transmit_bytes_total[5m])

# HTTP 请求速率
sum(rate(http_requests_total[5m])) by (status)

# 错误率
sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m]))

# 延迟 P99
histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))

配置文件

# prometheus.yml
global:
  scrape_interval: 15s
  evaluation_interval: 15s

alerting:
  alertmanagers:
    - static_configs:
        - targets:
            - alertmanager:9093

rule_files:
  - "rules/*.yml"

scrape_configs:
  - job_name: 'prometheus'
    static_configs:
      - targets: ['localhost:9090']

  - job_name: 'node'
    static_configs:
      - targets: ['node1:9100', 'node2:9100']

  - job_name: 'kubernetes-pods'
    kubernetes_sd_configs:
      - role: pod
    relabel_configs:
      - source_labels: [__meta_kubernetes_pod_annotation_prometheus_io_scrape]
        action: keep
        regex: true

告警规则

# rules/alerts.yml
groups:
  - name: node
    rules:
      - alert: HighCPUUsage
        expr: 100 - (avg by (instance) (irate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 80
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "High CPU usage on {{ $labels.instance }}"
          description: "CPU usage is {{ $value }}%"

      - alert: HighMemoryUsage
        expr: (1 - node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes) * 100 > 85
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "High memory usage on {{ $labels.instance }}"

      - alert: DiskSpaceLow
        expr: (1 - node_filesystem_avail_bytes / node_filesystem_size_bytes) * 100 > 85
        for: 5m
        labels:
          severity: critical
        annotations:
          summary: "Disk space low on {{ $labels.instance }}"

  - name: application
    rules:
      - alert: HighErrorRate
        expr: sum(rate(http_requests_total{status=~"5.."}[5m])) / sum(rate(http_requests_total[5m])) > 0.05
        for: 5m
        labels:
          severity: critical
        annotations:
          summary: "High error rate"
          description: "Error rate is {{ $value | humanizePercentage }}"

      - alert: HighLatency
        expr: histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le)) > 1
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "High latency"

Read the full file on GitHub · 345 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 345 lines · 8 tokens per session scan A 8d2730ab5b14

Subscribe to this mod's changes

monitoring is a skill published in the GitHub repository chaterm/terminal-skills (58 stars, last pushed 6mo ago), licensed Apache-2.0. It adds 8 tokens to every session and 2,288 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

monitoring-expert

Expert-level monitoring and observability with Prometheus, Grafana, logging, and alerting. Use when the user mentions observability, Prometheus, Grafana, logging, metrics, or alerting, or when the task involves The Three Pillars of Observability, Monitoring Fundamentals, Prometheus Configuration, or Alert Rules.

personamanagmentlayer/pcl · 70 tokens

grafana-expert

Expert-level Grafana dashboards, visualization, data sources, alerting, and production operations. Use when the user mentions dashboards, visualization, monitoring, observability, or alerting, or when the task involves Grafana Architecture, Installation on Kubernetes, Data Sources, or Dashboard JSON.

personamanagmentlayer/pcl · 61 tokens

prometheus-expert

Expert-level Prometheus monitoring, metrics collection, PromQL queries, alerting, and production operations. Use when the user mentions monitoring, metrics, observability, alerting, or PromQL, or when the task involves Prometheus Architecture, Installation on Kubernetes, ServiceMonitor, or PromQL Queries.

personamanagmentlayer/pcl · 65 tokens

monitoring-alerting-commerce

Track store health in real time with dashboards for checkout success rate, payment failures, cart errors, and custom SLO alerting.

finsilabs/awesome-ecommerce-skills · 31 tokens

monitoring-logging

Application monitoring, logging systems, and alerting.

miles990/claude-software-skills · 14 tokens

prom-query

Prometheus Metrics Query & Alert Interpreter — query metrics, interpret timeseries, triage alerts.

cacheforge-ai/cacheforge-skills · 21 tokens