promql

Write, validate, and optimise PromQL queries for Prometheus and Grafana Cloud Metrics.

Updated Mar 28, 2026
One-click install
npx skills add https://github.com/MisLink/agentry --skill promql-mislink
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: promql
Source: https://github.com/MisLink/agentry/tree/main/agents/.agents/skills/promql
Command: npx skills add https://github.com/MisLink/agentry --skill promql-mislink

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

PromQL queries can be complex and error-prone; this skill helps you write, validate, and optimise PromQL expressions for Prometheus and Grafana Cloud Metrics.

Core Features & Use Cases

  • Write and validate PromQL expressions for rate, increase, aggregation, and histogram_quantile.
  • Filter, group, and label matchers to refine results and build dashboards.
  • Create and use recording rules to pre-compute expensive queries and improve performance.
  • Diagnose and optimize query performance, understand cardinality, and avoid common pitfalls.
  • Use PromQL to implement common SLOs and alerting expressions.

Quick Start

Write a PromQL expression to calculate the 5-minute rate of a counter, for example rate(http_requests_total[5m]).

Frequently Asked Questions about promql

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I write a PromQL query to calculate the rate of a counter?

To calculate the rate of a counter in PromQL, use the rate() function with a time window, such as rate(http_requests_total[5m]). This computes the per-second average rate of increase over the specified range.

What is the correct PromQL syntax for histogram_quantile aggregations?

The histogram_quantile function in PromQL calculates quantiles from histogram buckets. You must ensure correct aggregation order and use proper label matchers to group results accurately across multiple labels.

How do I optimize slow PromQL queries and manage high cardinality?

Optimize slow PromQL queries by creating recording rules to pre-compute expensive expressions. This improves dashboard performance and helps manage high cardinality metrics by reducing the query load on Prometheus.

Can I use PromQL to build SLO and alerting expressions for Grafana Cloud Metrics?

Yes, you can use PromQL to implement common SLOs and alerting expressions for Prometheus and Grafana Cloud Metrics. The skill helps validate these expressions and apply proper label handling for accurate alerting.