promql-cli
Skill by samber
Queries Prometheus and PromQL-compatible engines from the terminal using the promql-cli tool. Covers instant and range queries, metric discovery and several output formats. Aimed at engineers troubleshooting latency, error rates and saturation.
Install promql-cli
Built from the published package, never by AI.
git clone --depth 1 https://github.com/samber/cc-skills /tmp/cc-skills && mkdir -p ~/.claude/skills && cp -r /tmp/cc-skills/skills/promql-cli ~/.claude/skills/promql-cliRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/samber/cc-skills /tmp/cc-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/cc-skills/skills/promql-cli ~/.gemini/antigravity-cli/skills/promql-cliAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
promql-cli is an agent skill that guides an AI assistant to use the promql-cli command line tool, a Go CLI for querying Prometheus and PromQL-compatible engines such as Thanos, Cortex, VictoriaMetrics, Grafana Mimir and Grafana Tempo. It covers instant queries, range queries, metric discovery through the metrics, labels and meta subcommands, and output in table, csv, json or graph form.
The skill checks that a host is configured before running queries and explains common connection and authentication errors. It asks for the time window before range queries, favors aggregation inside PromQL, and points to reference files for installation, usage, graphing, debugging and PromQL. It is aimed at engineers investigating latency, error rates, saturation and data gaps. The user creates any credential files, not the assistant.
Written from the project's SKILL.md and checked against it.
What it can do
- Instant queriesRuns a single PromQL query against the configured Prometheus host.
- Range queriesRuns PromQL over a time window, with an ASCII graph output option.
- Metric discoveryLists metric names, labels and metric type and help via metrics, labels and meta subcommands.
- Output formatsReturns results as table, csv, json or graph output.
- Host setup checkRuns a test query and explains connection and authentication errors.
- Debugging guidancePoints to reference material for latency, errors, saturation and data gaps.
- Query cost rulesSets rules on cardinality checks, time windows and server-side aggregation.
What you need
- promql-cli installed (installed with go)
- jq
- A reachable Prometheus or PromQL-compatible host
- A config file set up by the user at ~/.promql-cli.yaml
Try asking
- Check the error rate of the checkout service over the last hour.
- List the metric names and labels available for the api job.
- Show the latency trend for api pods as an ASCII graph over the past day.
Good to know
- The assistant must not create config files, since they may contain credentials. The user sets up the config.
- A host must be configured before any query runs.
- Queries over 15 seconds should be narrowed in scope, according to the skill's rules.
- The skill states it is not exhaustive and points to the official documentation.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: skills/promql-cli/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
Allowed tools: Read Edit Write Glob Grep Agent Bash(promql:*) mcp__context7__resolve-library-id mcp__context7__query-docs AskUserQuestion
Alternatives to promql-cli
All alternatives →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.
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.
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.
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.
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.
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.
Compare with deploy-release-test, deepeval-tracing or azure-container-registry-cli
promql-cli: common questions
Which monitoring backends does promql-cli work with?
The source says it queries Prometheus and PromQL-compatible engines, naming Thanos, Cortex, VictoriaMetrics, Grafana Mimir and Grafana Tempo.
How are credentials handled?
The source says config files may hold tokens or passwords, so the assistant should not create them. The user creates ~/.promql-cli.yaml and ~/.promql_token themselves, with chmod 600.
How does the skill check that queries will work?
It runs promql 'up' as a simple test. Connection refused, no such host, 401 and 403 errors are treated as configuration or authentication problems.
How do I install promql-cli?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is promql-cli free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is promql-cli safe to use?
It scores 75 of 100. Grades: maintenance A, licence A, quality B. 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 promql-cli?
Similar skills: deploy-release-test, deepeval-tracing, azure-container-registry-cli, crabbox-apps.
