autogen-promql-tests

autogen-promql-tests is a skill for Claude Code, Codex from conallob/o11y-analysis-tools. It costs 0 tokens per session (1,288 once invoked), scanned A, original, BSD-3-Clause.

A local tool that checks Prometheus rule files for alert and recording rules without promtool unit tests, then creates test-file skeletons with placeholders.

In plain words
What is it for?
Use it to audit test coverage and bootstrap true-positive, false-positive, and hysteresis tests for PromQL rules.
Why use it?
It shows which rules lack tests and removes the need to start each promtool test file from scratch. The generated cases are incomplete and still need realistic metrics and expected results.

Skill for Claude CodeCodex

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

Needs its repository: it runs a file that does not travel with it, so clone the repository first. The line is go build -o bin/autogen-promql-tests ./cmd/autogen-promql-tests.

Good fit Use it to audit test coverage and bootstrap true-positive, false-positive, and hysteresis tests for PromQL rules.

Compare 6 skills from other repositories ↓
Install

Getting it into your agent

It runs from inside its repository, so the clone comes first — what it calls does not travel with the file alone.

Clone the repo
git clone --depth 1 https://github.com/conallob/o11y-analysis-tools
agentmods
npx agentmods add skills/conallob/o11y-analysis-tools/autogen-promql-tests

Made for: Claude Code, Codex.

Its marketplace also offers this one on its own, as the plugin autogen-promql-tests/plugin install autogen-promql-tests after adding the marketplace above.

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 autogen-promql-tests

README.md
[![agentmods](https://agentmods.dev/badge/skills/conallob/o11y-analysis-tools/autogen-promql-tests/github.svg)](https://agentmods.dev/skills/conallob/o11y-analysis-tools/autogen-promql-tests)
Your own site
<a href="https://agentmods.dev/skills/conallob/o11y-analysis-tools/autogen-promql-tests"><img src="https://agentmods.dev/badge/skills/conallob/o11y-analysis-tools/autogen-promql-tests/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 autogen-promql-tests

Your own site · 80×15
<a href="https://agentmods.dev/skills/conallob/o11y-analysis-tools/autogen-promql-tests"><img src="https://agentmods.dev/badge/skills/conallob/o11y-analysis-tools/autogen-promql-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,288 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. 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.00000 $0.01288
Opus 5 $0.00000 $0.00644
Sonnet 5 $0.00000 $0.00258
Haiku 4.5 $0.00000 $0.00129

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

Security

Grade A, and why

autogen-promql-tests 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 10d 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.

skills/autogen-promql-tests/SKILL.md · 124 lines

How it starts

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

autogen-promql-tests

Coverage auditor and test-skeleton generator for Prometheus rule files. It does not know your actual metric shapes — it emits a promtool-compatible test file full of TODO placeholders that a human (or an agent that has read the real metrics) must fill in with realistic input series and expected values. Hermetic — no network access.

When to use this skill

  • A rules file has alerts or recording rules with no corresponding promtool test rules coverage, and you want a starting skeleton rather than writing input_series/exp_alerts blocks from scratch.
  • You want a quick coverage report: how many of N rules currently have tests, and which ones don't.
  • This is a bootstrap tool, best run interactively the first time a rule is added — not a CI gate, since its generated output is intentionally incomplete (TODO markers) and would fail promtool test rules until a human fills them in.

Setup

go build -o bin/autogen-promql-tests ./cmd/autogen-promql-tests
# or: go install github.com/conallob/o11y-analysis-tools/cmd/autogen-promql-tests@latest

Usage

autogen-promql-tests [options]
Flag Default Effect
--rules (required) Path to the Prometheus rules YAML file to audit.
--tests "" Path to an existing test file to check coverage against. If omitted, the tool auto-discovers <rules-basename>_test.yml next to the rules file.
--fix false Generate a test file covering the untested alerts/rules.
--verbose false Print discovery/loading detail.

Typical invocations

# Coverage report only (exit 1 if anything is untested)
autogen-promql-tests --rules=./alerts.yml

# Generate a test skeleton for whatever's untested
autogen-promql-tests --rules=./alerts.yml --fix

# Check against an explicit, non-default-named test file
autogen-promql-tests --rules=./rules.yml --tests=./custom_tests.yml

Without --tests, it looks for <rules>_test.yml (rules file's basename with .yml/.yaml stripped, _test.yml appended) in the same directory. With --fix, the same path is the default write target unless --tests is also given, in which case that path is used both to read and write.

Read the full file on GitHub · 124 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. 10d ago First seen · 124 lines · 0 tokens per session scan A 9b6dbacceb1f

Subscribe to this mod's changes

autogen-promql-tests is a skill published in the GitHub repository conallob/o11y-analysis-tools (4 stars, last pushed 1mo ago), licensed BSD-3-Clause. It costs nothing until one of its globs matches a file; then it loads 1,288 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.