Community程式設計與開發github.com

grafana/promql

撰寫、驗證並最佳化適用於 Prometheus 和 Grafana Cloud Metrics 的 PromQL 查詢。當使用者要求查詢指標、撰寫 PromQL 表達式、計算速率、跨標籤彙總、建立直方圖分位數、建立記錄規則、偵錯查詢效能或了解指標基數時使用。

promql 是什麼?

此技能專為需要與 Prometheus 監控系統互動的開發者與 AI 代理所設計,能協助撰寫、驗證及最佳化 PromQL (Prometheus Query Language) 查詢。它支援 Prometheus 和 Grafana Cloud Metrics 平台,涵蓋從基本指標查詢到進階分析(如 rate、irate、histogram_quantile 以及跨標籤彙總)的廣泛使用案例。此技能不僅能建立記錄規則以提升查詢效率,還能協助偵錯查詢效能並分析指標基數。觸發詞包括「PromQL」、「Prometheus query」、「calculate rate」、「histogram_quantile」等短語,確保代理能正確識別使用者需求。透過這項技能,使用者可以獲得精確的 PromQL 表達式與最佳化建議,從而加速監控工作流程並提升系統可觀測性。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/grafana/skills/tree/main/skills/promql

Installed? Explore more 程式設計與開發 skills: steipete/bluebubbles, steipete/eightctl, steipete/blucli · View all 6 →

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

promql 是做什麼的?

撰寫、驗證並最佳化適用於 Prometheus 和 Grafana Cloud Metrics 的 PromQL 查詢。當使用者要求查詢指標、撰寫 PromQL 表達式、計算速率、跨標籤彙總、建立直方圖分位數、建立記錄規則、偵錯查詢效能或了解指標基數時使用。觸發詞包括「PromQL」、「Prometheus query」、「write a metric query」、「calculate rate」、「histogram_quantile」、「recording rule」、「metric cardinality」、「sum by」、「rate vs irate」、「absent()」或「query is slow」。

Individual skills in this repo

This repo contains 4 individual skills — each has its own dedicated page.

grafana/dashboarding

Create, modify, and organise Grafana dashboards including panels, variables, transformations, and alerting. Use when the user asks to create a Grafana dashboard, add a panel, configure a time series or stat panel, add template variables, set up dashboard linking, use transformations, configure thresholds, build a dashboard for a service, or export dashboard JSON. Triggers on phrases like "create dashboard", "add panel", "time series panel", "Grafana dashboard JSON", "template variables", "dashboard variable", "panel transformation", "threshold", "stat panel", "table panel", "Grafana annotations", or "dashboard folder".

grafana/grafana-oss

Configure Grafana OSS — provisions dashboards from YAML, sets up data sources (Prometheus / Loki / Tempo / Pyroscope), writes dashboard JSON with template variables, builds panel queries, assigns built-in roles (Viewer / Editor / Admin / GrafanaAdmin), mints service-account tokens, edits grafana.ini server config, creates annotations, installs plugins via provisioning, and validates each step with a health-check curl. Use when building dashboards, configuring data sources, setting up provisioning YAML, picking a panel type, writing template variables, managing users and roles, configuring SMTP/OAuth in grafana.ini, creating annotations via API, troubleshooting why a provisioned dashboard isn't showing up, or running Grafana OSS locally — even when the user says "set up a Prometheus data source", "provision dashboards from git", "make a service account", or "configure SSO in OSS" without saying "Grafana OSS".

grafana/opentelemetry

OpenTelemetry with Grafana stack. Covers OTel SDK instrumentation for Go/Java/Python/Node.js/.NET, OTLP protocol and endpoint configuration, sending telemetry to Grafana Cloud via OTLP endpoint, Grafana Alloy as OTel collector, sampling strategies, Kubernetes OTel Operator, and migration from other observability tools. Use when instrumenting apps with OTel, configuring OTLP endpoints, setting up collectors, or migrating to OpenTelemetry.

grafana/prometheus

Prometheus and Grafana Cloud Metrics overview including PromQL query language, Metrics Drilldown, alerting, recording rules, and integration patterns. Use when working with Prometheus, writing PromQL queries, configuring alerting, or discussing metrics architecture and best practices.

相關技能