Przejdź do treści
Biblioteka skilli
DevOps i chmura · Analiza

promql-cli

/promql-cli

Wykonuje i bada wyrażenia PromQL na serwerze Prometheus wyłącznie przez zapytania HTTP w trybie tylko do odczytu, bez zmian w źródle ani systemach zdalnych.

Licencja
Apache-2.0
Ostatnia zmiana repozytorium
28.09.2026

Ocena i bezpieczeństwo

90/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść25 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
2
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
1
Przestarzałość

Brak sygnałów. Repozytorium zmienione 28.09.2026, bez odwołań do wycofanych modeli i API.

Licencja

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

Co robi i kiedy

Wykonuje i bada wyrażenia PromQL na serwerze Prometheus wyłącznie przez zapytania HTTP w trybie tylko do odczytu, bez zmian w źródle ani systemach zdalnych.

Oryginalny opis (EN)

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.

Jak działa

  1. Contract
  2. Inputs
  3. Procedure
  4. Failure and recovery
  5. Output
Sekcje z nagłówków SKILL.md, w oryginale · 37 linii, 610 słów
Podgląd SKILL.md
---
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.
Pliki w paczce (2)
  • SKILL.md 4 KB
  • agents/openai.yaml 1 KB

Wersje

W bazie nie ma innych skilli o nazwie promql-cli.

Migawka bazy z 28.10.2026 · wersja paczki 0d2afbe8af35 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 96prometheus
    Pomaga konfigurować monitoring Prometheus, pisać zapytania PromQL, reguły alertów, eksportery i system obserwowalności.
  • 100prometheus-expert
    Wspiera monitoring Prometheus: zbieranie metryk, zapytania PromQL, alerty i operacje produkcyjne, w tym instalację na Kubernetes i ServiceMonitor.
  • 95promql-validator
    Waliduje i optymalizuje zapytania PromQL, reguły alertów i nagrywania oraz panele Grafana: sprawdza składnię, wykrywa antywzorce i planuje zapytania z użytkownikiem.
  • 91prometheus
    Wdraża monitoring i alerting Prometheus: zbieranie metryk, zapytania PromQL, reguły alertów, wykrywanie usług, reguły nagrywające i konfigurację scrape.
  • 100prometheus-analysis
    Pomaga odpytywać i analizować metryki Prometheus, sprawdzać alerty i pisać zapytania PromQL do analizy przyczyn źródłowych.
  • 100prometheus
    Opisuje Prometheus i Grafana Cloud Metrics: język PromQL, Metrics Drilldown, alerty, recording rules i wzorce integracji.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.