prometheus-alertmanager

prometheus-alertmanager is a skill for Claude Code, Codex from sawrus/agent-guides. It costs 54 tokens per session (736 once invoked), scanned A, original, MIT.

Guidance for writing Prometheus alert and recording rules and Alertmanager routing configuration. Prometheus collects time-series measurements, while Alertmanager groups, routes, silences, and suppresses alerts.

In plain words
What is it for?
Use it to define alerts for errors, latency, and other service signals, create reusable measurement rules, and configure alert routing, grouping, inhibition, and silences.
Why use it?
It helps turn service failures and unusual measurements into consistent alerts that reach the right place without unnecessary noise.

Skill for Claude CodeCodex

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

Good fit Use it to define alerts for errors, latency, and other service signals, create reusable measurement rules, and configure alert routing, grouping, inhibition, and silences.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/sawrus/agent-guides/prometheus-alertmanager
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 sawrus/agent-guides --skill prometheus-alertmanager
Clone the repo
git clone --depth 1 https://github.com/sawrus/agent-guides

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 prometheus-alertmanager

README.md
[![agentmods](https://agentmods.dev/badge/skills/sawrus/agent-guides/prometheus-alertmanager/github.svg)](https://agentmods.dev/skills/sawrus/agent-guides/prometheus-alertmanager)
Your own site
<a href="https://agentmods.dev/skills/sawrus/agent-guides/prometheus-alertmanager"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/prometheus-alertmanager/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 prometheus-alertmanager

Your own site · 80×15
<a href="https://agentmods.dev/skills/sawrus/agent-guides/prometheus-alertmanager"><img src="https://agentmods.dev/badge/skills/sawrus/agent-guides/prometheus-alertmanager.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 54 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 736 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. Third-party audits
  • NVIDIA SkillSpector pass 7 Sept 2026
How audits are shown
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.00054 $0.00736
Opus 5.5 $0.00022 $0.00294
Sonnet 5.5 $0.00011 $0.00147
Haiku 4.5 $0.00005 $0.00074

Measured today against content hash 66b35f0b2022, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

prometheus-alertmanager 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 today.

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 -X POST <url>/-/reload`).
areas/devops/observability/skills/prometheus-alertmanager/SKILL.md · 77 lines

How it starts

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

Prometheus alert: add or change

1. Find where rules live

  1. Rule files (*.rules.yml, rules/*.yml) loaded by rule_files: in prometheus.yml, or PrometheusRule objects for the Prometheus Operator, or a Helm chart values block.
  2. The Alertmanager config: alertmanager.yml or an AlertmanagerConfig object.
  3. Existing alerts for the same service: reuse their labels (severity, team, service).

2. Write the query first

  1. Run the expression in the Prometheus UI or with promtool query instant <url> '<expr>' against real data.
  2. Alert on symptoms users see (error ratio, latency, saturation), not on every cause.
  3. Use a ratio for errors: sum(rate(http_requests_total{code=~"5.."}[5m])) / sum(rate(http_requests_total[5m])).
  4. If the query is expensive or reused, add a recording rule named level:metric:operations, for example service:http_requests:rate5m.

3. Write the rule

- alert: CheckoutHighErrorRate
  expr: service:http_errors:ratio_rate5m{service="checkout"} > 0.05
  for: 10m
  labels:
    severity: page
  annotations:
    summary: "checkout 5xx ratio above 5% for 10m"
    runbook_url: "https://wiki.example.com/runbooks/checkout-errors"
  • Set for: so one scrape spike does not page.
  • Use only the severities that the Alertmanager routes know (for example page, ticket).
  • Every paging alert has a runbook_url.

4. Test the rule

promtool check rules rules/checkout.rules.yml
promtool test rules tests/checkout.test.yml

Write a unit test with input_series that fires the alert and one that does not:

rule_files: [../rules/checkout.rules.yml]
tests:
  - interval: 1m
    input_series:
      - series: 'service:http_errors:ratio_rate5m{service="checkout"}'
        values: '0.1x20'
    alert_rule_test:
      - eval_time: 15m
        alertname: CheckoutHighErrorRate
        exp_alerts: [{exp_labels: {severity: page, service: checkout}}]

5. Check the route

amtool check-config alertmanager.yml
amtool config routes test --config.file=alertmanager.yml severity=page service=checkout

Read the full file on GitHub · 77 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. today Changed · -112 lines · +32 tokens per session 66b35f0b2022
  2. 1mo ago First seen · 189 lines · 22 tokens per session scan A 0f52d095f67c

Subscribe to this mod's changes

prometheus-alertmanager is a skill published in the GitHub repository sawrus/agent-guides (19 stars, last pushed today), licensed MIT. It adds 54 tokens to every session and 736 once invoked, about $0.0002 per session on Opus 5.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.