Skip to content
Skills Library
DevOps & cloud · Analysis

promql-cli

/promql-cli

Use when asked to execute or investigate a PromQL expression against a Prometheus server. Read-only HTTP queries only. No source or remote-system changes.

Licence
Apache-2.0
Last repository change
28.09.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
2
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 28.09.2026, without references to retired models or APIs.

Licence

Apache-2.0, otwarta: można używać i zmieniać, z zachowaniem licencji i informacji o zmianach.

What it does and when to use it

Use when asked to execute or investigate a PromQL expression against a Prometheus server. Read-only HTTP queries only. No source or remote-system changes.

Original author description

Use when asked to execute or investigate a PromQL expression against a Prometheus server. Read-only HTTP queries only. No source or remote-system changes.

How it works

  1. Contract
  2. Inputs
  3. Procedure
  4. Failure and recovery
  5. Output
Original SKILL.md headings · 37 lines, 610 words
SKILL.md preview
---
name: promql-cli
description: 'Use when asked to execute or investigate a PromQL expression against a Prometheus server. Read-only HTTP queries only. No source or remote-system changes.'
disable-model-invocation: true
---

# PromQL CLI

## Contract

| Field | Bound contract |
|---|---|
| Trigger | User asks to execute or investigate PromQL, or to debug latency, error, or saturation signals against a Prometheus server. |
| Authority | Read-only. No file, VCS, credential, paid, published, deployed, or remote mutation. HTTP GET queries to the Prometheus HTTP API only. |
| Side effect | Evaluates PromQL queries through the Prometheus HTTP API. Reads metrics, writes nothing. |
| Done | Query results in the requested format, or a classified failure diagnosis, are returned to the user. |

## Inputs

- PromQL query (required): the PromQL expression to evaluate.
- Prometheus server URL (required): the base endpoint to query against, e.g. `http://prometheus:9090`.
- Time range (optional): start and end timestamps or duration for range queries. Instant queries omit this.
- Output format (optional): table, csv, json, or graph. Defaults to table.
- Step interval (optional): resolution for range queries, e.g. `15s`, `1m`.

## Procedure

1. Validate that the PromQL query is non-empty and the server URL is well-formed (scheme, host, and port present). If either is invalid, return a validation failure naming the missing or malformed field. Done when: the query and URL pass validation.
2. Construct the HTTP API request. For an instant query, use `GET <server_url>/api/v1/query?query=<urlencoded_query>`, appending `&time=<unix_time>` only when a time value is supplied. For a range query, first choose `step` as the supplied step interval or `15s` when one is not supplied; the step interval is required for range queries. Then use `GET <server_url>/api/v1/query_range?query=<urlencoded_query>&start=<unix_start>&end=<unix_end>&step=<step>`. Set the `Accept` header to `application/json`. Do not send credentials unless the user supplies them explicitly. Done when: the HTTP request is constructed with all supplied parameters.
3. Execute the request using the host's HTTP client. Apply a 30-second timeout. If the server requires authentication, use the credentials the user supplied; do not invent or store credentials. Done when: the HTTP response is received or the request fails.
4. Classify the result. If the HTTP status is 200 and the response body has `status: "success"`, extract the `data.result` array and render it in the requested format. If the HTTP status is 200 and `status: "error"`, extract `errorType` and `error` from the response body. If the HTTP status is non-200, classify by status code. If the request timed out or the connection failed, classify accordingly. Done when: the result is classified as success or a named failure class.

## Failure and recovery

On connection failure, the server is unreachable or DNS resolution fails; report the URL and the connection error, and do not retry silently. On a query syntax error, the Prometheus API returns `status: "error"` with `errorType: "bad_data"`; report the `error` field verbatim and do not attempt to rewrite the query. On an empty result set, the query executed successfully but returned no series; report the empty result and suggest checking label selectors or the time range. On timeout, the request exceeded the 30-second client timeout or the server returned a timeout error; report the timeout and suggest narrowing the time range or adding label filters. On authentication failure, the server returned 401 or 403; report that credentials are required or invalid, and do not retry with different credentials. On a server error, the server returned 5xx; report the status code and response body, and suggest retrying after the server recovers.

No partial results are returned on failure. No files are written.

## Output

Query results in the requested format (table, csv, json, or graph). On failure, a diagnosis that names the failure class and includes the server error message or connection error. The output is chat-only; no file or remote state is modified.
Files in this package (2)
  • SKILL.md 4 KB
  • agents/openai.yaml 1 KB

Versions

RepositoryScoreLicence
This page · OutlineDriven/outline-driven-development90Apache-2.0
samber/cc-skills100MIT

Database snapshot: 13.11.2026 · package version 0d2afbe8af35 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100prometheus-expert
    Expert-level Prometheus monitoring, metrics collection, PromQL queries, alerting, and production operations. Use when the user mentions monitoring, metrics, observability, alerting, or PromQL, or when the task involves Prometheus Architecture, Installation on Kubernetes,…
  • 95promql-validator
    Comprehensive toolkit for validating, optimizing, and understanding Prometheus Query Language (PromQL) queries. Use this skill when working with PromQL queries, prometheus queries, metrics queries, alerting rules, recording rules, or grafana dashboards to check syntax, detect…
  • 91prometheus
    Prometheus monitoring and alerting for cloud-native observability. Use when implementing metrics collection, PromQL queries, alerting rules, service discovery, recording rules, and scrape config.
  • 96prometheus
    Prometheus开发专家助手。当用户需要进行Prometheus监控配置、PromQL查询、告警规则、Exporter开发或可观测性体系建设时调用。
  • 100prometheus
    Query and interact with Prometheus HTTP API for monitoring data. Use when Claude needs to query Prometheus metrics, execute PromQL queries, retrieve targets/alerts/rules status, access metadata about series/labels, manage TSDB operations, or troubleshoot monitoring…
  • 100prometheus-analysis
    This skill should be used when the user asks to "query Prometheus", "analyze Prometheus metrics", "check Prometheus alerts", "write PromQL", "interpret Prometheus data", "fetch metrics", or mentions Prometheus querying, alerting, or metrics analysis. Provides guidance for…

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.