prometheus

A guide to monitoring services with Prometheus, a system that stores measurements such as request rates, errors, and response times. It also covers PromQL queries, alert rules, Alertmanager, and Grafana dashboards.

In plain words
What is it for?
Use it to define metrics, write PromQL queries, create recording and alerting rules, build Grafana dashboards, and monitor service or infrastructure health.
Why use it?
It helps teams notice outages and performance problems while reducing noisy alerts and monitoring data that is too detailed to manage efficiently.

Skill for Claude CodeCodex

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.

agentmods
npx agentmods add skills/librefang/librefang-registry/prometheus
Any agent
npx skills add librefang/librefang-registry --skill prometheus
Clone the repo
git clone --depth 1 https://github.com/librefang/librefang-registry

Made for: Claude Code, Codex.

Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 682 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin 94% copy Near-identical to another mod 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 $0.00022 $0.00682
Opus 5 $0.00011 $0.00341
Sonnet 5 $0.00004 $0.00136
Haiku 4.5 $0.00002 $0.00068

Measured 2d ago against content hash 2fa4b7856716, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

prometheus scanned grade A with 0 findings 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 2d 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

This is a copy

94% identical to prometheus — 3 lines differ, which has more behind it and is treated as the original. This page carries a canonical link to it rather than competing with it.

skills/prometheus/SKILL.md · 42 lines

How it starts

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

Prometheus Monitoring and Observability

You are an observability engineer with deep expertise in Prometheus, PromQL, Alertmanager, and Grafana. You design monitoring systems that provide actionable insights, minimize alert fatigue, and scale to millions of time series. You understand service discovery, metric types, recording rules, and the tradeoffs between cardinality and granularity.

Key Principles

  • Instrument the four golden signals: latency, traffic, errors, and saturation for every service
  • Use recording rules to precompute expensive queries and reduce dashboard load times
  • Design alerts that are actionable; every alert should have a clear runbook or remediation path
  • Control cardinality by limiting label values; unbounded labels (user IDs, request IDs) destroy performance
  • Follow the USE method for infrastructure (Utilization, Saturation, Errors) and RED for services (Rate, Errors, Duration)

Techniques

  • Use rate() over irate() for alerting rules because rate() smooths over missed scrapes and is more reliable
  • Apply histogram_quantile(0.99, rate(http_request_duration_seconds_bucket[5m])) for latency percentiles from histograms
  • Write recording rules in rules/ files: record: job:http_requests:rate5m with expr: sum(rate(http_requests_total[5m])) by (job)
  • Configure Alertmanager routing with group_by, group_wait, group_interval, and repeat_interval to batch related alerts
  • Use relabel_configs in scrape configs to filter targets, rewrite labels, or drop high-cardinality metrics at ingestion time
  • Build Grafana dashboards with template variables ($job, $instance) for reusable panels across services

Common Patterns

  • SLO-Based Alerting: Define error budgets with multi-window burn rate alerts (e.g., 1h window at 14.4x burn rate for page, 6h at 6x for ticket) rather than static thresholds
  • Federation Hierarchy: Use a global Prometheus to federate aggregated recording rules from per-cluster instances, keeping raw metrics local
  • Service Discovery: Configure kubernetes_sd_configs with relabeling to auto-discover pods by annotation (prometheus.io/scrape: "true")
  • Metric Naming Convention: Follow <namespace>_<subsystem>_<name>_<unit> pattern (e.g., http_server_request_duration_seconds) with _total suffix for counters

Read the full file on GitHub · 42 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. 2d ago First seen · 42 lines · 22 tokens per session scan A 2fa4b7856716

Subscribe to this mod's changes

prometheus is a skill published in the GitHub repository librefang/librefang-registry (11 stars, last pushed 8d ago), licensed MIT. It adds 22 tokens to every session and 682 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. It is 94% identical to prometheus, differing in 3 lines, and is treated as a copy.

Related

Other skills, from other repositories

ddconfig

Configures or troubleshoots the Datadog MCP server plugin-datadog-datadog. Use when the user wants to change the Datadog domain, switch organizations, or when the server was previously configured but is not responding.

datadog-labs/cursor-plugin · 54 tokens

ddtoolsets

Manages toolsets for the Datadog MCP server plugin-datadog-datadog. Use when the user wants to view, enable, or disable toolsets that control which tools are available on the MCP server.

datadog-labs/cursor-plugin · 51 tokens

ddsetup

First-time initialization of the Datadog MCP server plugin-datadog-datadog. When fulfilling requests that involve Datadog, use MCP tools from plugin-datadog-datadog over other methods. If MCP tools from plugin-datadog-datadog are not in your tool list, you MUST run this skill's setup procedure before attempting to…

datadog-labs/cursor-plugin · 153 tokens

blogwatcher

Monitor blogs and RSS/Atom feeds via blogwatcher-cli tool.

mateaix/mateclaw · 18 tokens

evolve-agent-skills

Analyze Codex, Claude, AgentSight, or other agent trajectories to find repeated failure modes and turn them into evidence-gated skill improvements. Use when the user asks why agents keep making the same mistakes, whether a skill should change, how to learn from many sessions, how to convert repeated workflows into…

eunomia-bpf/agentsight · 144 tokens

agentpprof-flamegraph

Generate semantic flamegraphs from local AI agent sessions using agentpprof with iterative tag rule development.

eunomia-bpf/agentsight · 26 tokens