Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

grafana-promql

Skill by oxsecurity

Writes, validates and optimizes PromQL queries for Prometheus, Grafana Mimir and Grafana Cloud Metrics. Aimed at engineers building metric queries, latency and error-rate panels, and recording rules.

  • Score 81
  • 2.7k stars
  • AGPL-3.0
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install grafana-promql

Built from the published package, never by AI.

git clone --depth 1 https://github.com/oxsecurity/megalinter /tmp/megalinter && mkdir -p ~/.claude/skills && cp -r /tmp/megalinter/.claude/skills/grafana-promql ~/.claude/skills/grafana-promql

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install grafana-promql in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

This Grafana Labs skill gives an AI assistant a PromQL pattern library for Prometheus, Grafana Mimir and Grafana Cloud Metrics. It covers rate, irate and increase, label matchers, aggregation with sum, avg, topk, by and without, and classic and native histogram_quantile. It also covers ratios with divide-by-zero guards, staleness checks, time offsets, predict_linear, recording-rule naming, SLO and burn-rate math, and a cardinality-hunting playbook.

The skill guides the assistant to sketch a query, check that it returns results against a Prometheus-compatible endpoint, and sanity-check values in Grafana Explore. It also explains how to turn a slow dashboard query into a recording rule and verify the result. It is intended for engineers who write metric queries, fix wrong p95 values, build error-budget alerts, or track down high-cardinality labels.

Written from the project's SKILL.md and checked against it.

What it can do

  • Write and validate queriesSketches a PromQL expression and checks syntax and metric existence against a Prometheus endpoint.
  • Common query patternsProvides copyable patterns for per-status request rates, p95 latency and error-rate ratios.
  • Recording rule conversionTurns a slow dashboard query into a named recording rule and verifies it matches the original.
  • Histogram quantilesCovers classic and native histogram_quantile, keeping le in the inner aggregation.
  • SLO and burn-rate mathIncludes error-budget and burn-rate query patterns in the referenced pattern library.
  • Cardinality huntingDescribes a playbook for finding the label that blew up series count.

What you need

  • A Prometheus, Mimir or Grafana Cloud metrics endpoint
  • Basic auth credentials for Grafana Cloud metrics, if used
  • curl and jq for the command examples

Try asking

  • Write a PromQL query for 5xx error rate per service using rate over 5m
  • Fix my p95 latency query so histogram_quantile stops returning NaN
  • Turn this slow dashboard query into a recording rule with a good name

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

Checked automatically: .claude/skills/grafana-promql/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • LICENSE11 KB
  • SKILL.md5 KB
  • references/patterns.md4 KB

Alternatives to grafana-promql

All alternatives →
deploy-release-testvercel
94

Runs the full Next.js deployment test suite for an internal vercel/next.js pull request. It validates the commit's preview package, then dispatches the test_e2e_deploy_release.yml workflow. Meant for maintainers who explicitly ask for the entire suite.

AAA Skill 144k
deepeval-tracingconfident-ai
94

Instruments Python AI applications with DeepEval's native tracing so their execution appears span by span in Confident AI's Observatory. It is for developers building LLM apps, agents, RAG pipelines and chatbots.

AAA Skill 20k
azure-container-registry-cligithub
94

Manages Azure Container Registry through the az acr Azure CLI command group. It covers registries, images, cloud builds, ACR Tasks, tokens, geo-replication and networking. Built for developers and operators who work with ACR in Azure.

AAA Skill 42k
crabbox-appsopenclaw
94

Opens, runs, and shows apps on a temporary Crabbox machine, including native desktops and web previews. It is for OpenClaw users who want an app running and visible in their chat side panel.

AAA Skill 395k
gke-batch-hpcgoogle
94

Runs batch and HPC workloads on GKE using job queues and parallel processing. Aimed at teams running batch pipelines, HPC simulations, or ML training jobs on Google Kubernetes Engine.

AAA Skill 25k
gke-cost-analysisgoogle
94

Answers questions about GKE cluster and workload costs using BigQuery billing exports and live cluster metrics. Built for platform engineers and cloud teams who need to analyze and diagnose GKE spend.

AAA Skill 25k

Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli

grafana-promql: common questions

What is the golden rule for rate and increase in PromQL?

The skill says rate() and increase() need a range vector at least 4 times the scrape interval. For a 60 second scrape, use [5m] as a minimum.

Why does my histogram_quantile query return NaN?

The skill says this usually means le was left out of the inner aggregation. Keep by (le) in the inner sum.

Does it work with Grafana Cloud Metrics?

Yes. The source says it targets Prometheus, Grafana Mimir and Grafana Cloud Metrics, and gives a Grafana Cloud metrics endpoint example with basic auth.

How do I install grafana-promql?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is grafana-promql free?

The code is published under the AGPL-3.0 licence. The service it connects to may have its own pricing.

Is grafana-promql safe to use?

It scores 81 of 100. Grades: maintenance A, licence C, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

What are alternatives to grafana-promql?

Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.

grafana-promql Install

Add to stack

Loading.