/agentic-awesome-skills:prometheus-alert-rule-testingfrom agentic-awesome-skills
Unit-tests Prometheus alerting rules offline using promtool test rules with synthetic time series. Validates pending/firing states, for-duration clearing, labels, annotations, and missing series behavior.
Ships in agentic-awesome-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Verify Prometheus alerting rules deterministically offline using the real promtool test rules command against synthetic input_series time series (promtool==3.16.0), without deploying Prometheus, touching live Alertmanager receivers, or implementing a custom PromQL evaluator. Tests pending vs. firing state transitions across for durations, early threshold clearing before firing, exact emitted exp_labels and templated exp_annotations, missing time-series behavior (_ gaps and absent()), evaluation interval boundaries, and non-zero exit codes on failing rule/test fixtures.
Overlap evaluation against prometheus-configuration and related skills:
prometheus-configuration: risk: critical, source: community skill focused on cluster Helm installation, Docker Compose setup, scrape configs, recording rules, sample alert definitions, and static syntax checks (promtool check config / promtool check rules / live promtool query instant); it contains zero promtool test rules fixtures (alert_rule_test, input_series, eval_time, exp_alerts) and carries an external unbundled <support-root> notice. Keeping prometheus-alert-rule-testing separate preserves a strictly risk: safe, self-contained offline unit-testing boundary with clean source: self provenance.prometheus-grafana and observability-monitoring-monitor-setup: describe cluster metric dashboards and static monitoring templates rather than unit-testing for: temporal windows with promtool test rules.expr, for, labels, annotations) before committing them to monitoring repos.eval_time firing boundaries when evaluation_interval / rule interval and for interact.for remain pending and clear without firing, and missing series stop firing or trigger absent() alerts as intended.promtool CLI (promtool --version, tested strictly on 3.16.0) on PATH or pointed to by PROMTOOL_BIN.3.10+ with pytest (tested with Python 3.12.10 and pytest==9.1.1) to execute the isolated temporary-directory harness.interval (for example 1m) and rule for duration (for example 2m) explicitly so step boundaries in input_series map unambiguously to eval_time.input_series step counts cleanly (promtool 1m step intervals: 0 6 6 6 6 evaluates at 0m, 1m, 2m, 3m, 4m). Notice a for: 2m rule first true at t = 1m begins pending at 1m, remains non-firing at 2m, and fires at t = 3m (3m - 1m = 2m)._ rather than 0, accounting for Prometheus's half-open (t - 5m, t] lookback delta (a sample at 0m expires at 5m) and the fact that absent(up{job="payments"}) automatically propagates equality matcher labels (job="payments").promtool test rules with positive and negative assertionsRun the local verification suite in promtool test rules harness:
exp_alerts: [] vs firing): Assert exp_alerts: [] at eval_time: 1m and 2m (demonstrating absence of firing alerts before for: 2m elapses, which together with firing at eval_time: 3m evidences pending-to-firing progression rather than proving internal pending state directly) and exact firing alert at eval_time: 3m.0 6 6 0 0 and assert zero firing alerts at eval_time: 2m, 3m, and 4m.exp_labels (rule labels + metric labels) and rendered exp_annotations ({{ $labels.service }}, {{ $value }})._ gaps exceed the 5m lookback delta and absent(up{job="payments"}) == 1 fires once for elapses both after a series disappears and when no samples exist at all.exit code != 0): Execute intentionally broken mutations (wrong for duration or mismatched expected annotation) via real promtool test rules and confirm non-zero exit status + FAILED: diagnostic diff, distinct from malformed YAML syntax (INVALID_INPUT).Run the self-contained verification suite in promtool test rules harness:
User request: "Verify with promtool that HighErrorRate waits 2m before firing, clears on transient spikes, and handles missing targets."
Inputs: Synthetic Prometheus alert rule group + promtool test YAML executed via promtool 3.16.0.
Expected result: Passing suite exits 0 across pending (2m), firing (3m), early-clear (0 6 6 0 0), exact labels/annotations,
and missing-series cases; broken rule/expectation mutations exit 1 with promtool FAILED diffs.
promtool test rules evaluates rule YAML and synthetic input_series in isolation; it never tests Alertmanager routing, grouping, inhibition, silences, receiver credentials, notification delivery, or production scrape reliability.rule_files in the test YAML.keep_firing_for semantics depend on the pinned promtool binary version (3.16.0).rules_filename and rule_files references strictly inside a temporary directory cleaned up after each test and invokes promtool test rules in-process with a 15s timeout. Do not feed untrusted YAML files without enforcing process/filesystem sandboxing around promtool.PrometheusRule CRDs, Alertmanager configs, or live Prometheus endpoints.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub sickn33/agentic-awesome-skills --plugin agentic-awesome-skills3,104 skills in this plugin
/007Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project./00-andruia-consultantUsar al iniciar o mejorar un proyecto de IA: diagnostica código y restricciones, propone skills existentes y redacta tareas y un plan de implementación en español./10-andruia-skill-smithUsar para crear o mejorar una skill de Andru.ia: define entradas y resultados, redacta SKILL.md con ejemplos y límites, valida la estructura y prepara una PR.2 plugins in one repository ship this exact skill · first indexed Dec 2, 2026
Other plugins' skills for the same job