authoring-promql-and-analyzing-metrics

authoring-promql-and-analyzing-metrics is a skill for Claude Code, Codex from talkops-ai/talkops-mcp. It costs 213 tokens per session (2,010 once invoked), scanned A, original, Apache-2.0.

A guide for finding Prometheus metrics and writing, checking, running, and interpreting PromQL queries. Prometheus is a monitoring system that stores time-series measurements such as request counts and response times.

In plain words
What is it for?
Use it to discover available metrics, write queries for current or historical data, compare time periods, and analyze rates, ratios, joins, and histogram measurements.
Why use it?
It avoids guessing metric or label names and helps catch invalid queries before they are used. It also turns raw time-series data into concise comparisons and statistics.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one. Also seen: positional $N argument.

Good fit Use it to discover available metrics, write queries for current or historical data, compare time periods, and analyze rates, ratios, joins, and histogram measurements.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/talkops-ai/talkops-mcp/authoring-promql-and-analyzing-metrics
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 talkops-ai/talkops-mcp --skill authoring-promql-and-analyzing-metrics
Clone the repo
git clone --depth 1 https://github.com/talkops-ai/talkops-mcp

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 authoring-promql-and-analyzing-metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/authoring-promql-and-analyzing-metrics/github.svg)](https://agentmods.dev/skills/talkops-ai/talkops-mcp/authoring-promql-and-analyzing-metrics)
Your own site
<a href="https://agentmods.dev/skills/talkops-ai/talkops-mcp/authoring-promql-and-analyzing-metrics"><img src="https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/authoring-promql-and-analyzing-metrics/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 authoring-promql-and-analyzing-metrics

Your own site · 80×15
<a href="https://agentmods.dev/skills/talkops-ai/talkops-mcp/authoring-promql-and-analyzing-metrics"><img src="https://agentmods.dev/badge/skills/talkops-ai/talkops-mcp/authoring-promql-and-analyzing-metrics.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 213 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,010 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.00213 $0.02010
Opus 5.5 $0.00085 $0.00804
Sonnet 5.5 $0.00043 $0.00402
Haiku 4.5 $0.00021 $0.00201

Measured 11d ago against content hash 5790e64d708d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

authoring-promql-and-analyzing-metrics 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 11d ago.

The scan reads SKILL.md. This mod also ships 1 executable file (scripts/lint_promql.py), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

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.

Guides schema-first PromQL 3.0 query construction, offline linting, preflight validation, and condensed statistical analysis. Never guess metric or label names, and never shell out to raw `curl` or `promtool` when Promet
src/prometheus-mcp-server/skills/authoring-promql-and-analyzing-metrics/SKILL.md · 64 lines

How it starts

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

Authoring PromQL and Analyzing Metrics

Guides schema-first PromQL 3.0 query construction, offline linting, preflight validation, and condensed statistical analysis. Never guess metric or label names, and never shell out to raw curl or promtool when Prometheus MCP resources and tools are available.

MCP Execution Primitives Used

  • Resources:
    • prom://system/backends and prom://system/backends/{backend_id} — verify active backend ID (default unless specified) and Prometheus version/health.
    • prom://metadata/catalog — live catalog of metric names, types (counter, gauge, histogram, summary), and HELP descriptions.
    • prom://config/runtime — inspect scrape_interval and evaluation_interval to size rate() windows properly ($\ge 4\times$ scrape_interval).
  • Tools (query toolset):
    • prom_explore_metrics — search metrics by metric_pattern, inspect per-job metrics (job), inspect label value topology (label_name), or paginate series label sets (match_selector, cursor).
    • prom_query_instant — run preflight validation (validate_only=True) or point-in-time queries with detail="summary" (5-field condensed items) or detail="full".
    • prom_query_range — execute range queries over [start, end] with server-side stats (min, max, avg, p95, latest, delta_pct) and optional A2UI chart output (include_chart=True).
    • prom_compare_periods — compare a PromQL expression between [current_start, current_end] and a shifted historical window (baseline_offset such as "1h", "1d", "7d"), returning pct_change, z_score, and SIGNIFICANT_SPIKE / SIGNIFICANT_DROP observations.

Step-by-Step Workflow

1. Discover Metric Schema & Scrape Interval [HIGH FREEDOM]

  1. Unbounded Selector Refusal: Strictly refuse to execute unbounded full-TSDB regex scans such as {__name__=~".*"}, {__name__=~".+"}, or {__name__=~"..*"} in prom_query_instant or prom_query_range because they scan every series in TSDB and risk querier OOM. Instead, read prom://metadata/catalog or call prom_explore_metrics(backend_id="default", metric_pattern=..., limit=50) (using cursor pagination when browsing).
  2. Read prom://metadata/catalog or call prom_explore_metrics(backend_id="default", metric_pattern="<keyword>") and prom_explore_metrics(backend_id="default", label_name="<metric_name>") to verify exact metric and label names before writing PromQL.
  3. Read prom://config/runtime when sizing rate() windows; always set rate() range windows to at least $4\times \text{scrape_interval}$ (typically 2m or 5m).

Read the full file on GitHub · 64 lines

Files

What ships with it

3 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

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. 11d ago First seen · 64 lines · 213 tokens per session scan A 5790e64d708d

Subscribe to this mod's changes

authoring-promql-and-analyzing-metrics is a skill published in the GitHub repository talkops-ai/talkops-mcp (4 stars, last pushed 12d ago), licensed Apache-2.0. It adds 213 tokens to every session and 2,010 once invoked, about $0.0009 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-11-18.

Related

authoring-promql-and-analyzing-metrics compared with skills from other repositories

authoring-promql-and-analyzing-metrics next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
authoring-promql-and-analyzing-metricstalkops-ai/talkops-mcpSkill412d agoApache-2.0A213Claude Code, Codex
argocdalivirgo/Major-AI-SkillsSkill6yesterdayMITA42Claude Code
airdrop-hunting-guidenirholas/three.wsSkill287yesterdayApache-2.0A54Claude Code, Codex
opik-diagnosecomet-ml/opik-mcpSkill2274d agoApache-2.0A187Claude Code
ue-mcp-epic-routingdb-lyon/ue-mcpSkill526todayMITA81Claude Code, Codex
qa-knowledgegriddynamics/rosettaSkill3825d agoApache-2.0A32Claude Code, Codex
x-use-reviewihuzaifashoukat/x-useSkill1877d agoMITA56Claude Code