promql-cli

promql-cli is a skill for Claude Code from samber/cc-skills. It costs 89 tokens per session (1,702 once invoked), scanned B, original, MIT.

A command-line tool for querying Prometheus, a system that stores time-based application and infrastructure measurements. It also works with compatible systems such as Grafana Mimir, Thanos, Cortex, and VictoriaMetrics.

In plain words
What is it for?
Use it to find metrics and labels, run PromQL instant or time-range queries, investigate performance issues, and view results as tables, CSV, JSON, or terminal charts.
Why use it?
It lets developers inspect metrics and investigate problems from the terminal instead of relying only on a graphical dashboard.

Skill for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: names the AskUserQuestion tool; built for openclaw.

Part of the cc-skills plugin — 21 skills shipped together

Good fit Use it to find metrics and labels, run PromQL instant or time-range queries, investigate performance issues, and view results as tables, CSV, JSON, or terminal charts.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/samber/cc-skills/promql-cli
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add samber/cc-skills --skill promql-cli
Clone the repo
git clone --depth 1 https://github.com/samber/cc-skills

Made for: Claude Code.

Or install cc-skills, the plugin that ships this one along with the rest of its 21 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for promql-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/samber/cc-skills/promql-cli/github.svg)](https://agentmods.dev/skills/samber/cc-skills/promql-cli)
Your own site
<a href="https://agentmods.dev/skills/samber/cc-skills/promql-cli"><img src="https://agentmods.dev/badge/skills/samber/cc-skills/promql-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for promql-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/samber/cc-skills/promql-cli"><img src="https://agentmods.dev/badge/skills/samber/cc-skills/promql-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 89 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,702 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • Socket warn 15 Sept 2026
  • Snyk pass 15 Sept 2026
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 3 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Rogue Agent · line 66
    Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
    Fix: Remove any persistence mechanisms (cron jobs, startup scripts, state files). Skills should not maintain state across sessions without explicit user consent.
  • medium Privilege Escalation · line 92
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Output Handling · line 99
    Output size or generation rate is not bounded. Unbounded output enables denial-of-service through resource exhaustion, log flooding, or context-window stuffing.
    Fix: Set explicit limits on output length, generation count, and rate. Use max_tokens and truncation to prevent unbounded output.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00089 $0.01702
Opus 5.5 $0.00036 $0.00681
Sonnet 5.5 $0.00018 $0.00340
Haiku 4.5 $0.00009 $0.00170

Measured 2mo ago against content hash f26c1861b34f, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade B, and why

promql-cli scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

6. **Store credentials in `~/.promql-cli.yaml` and `~/.promql_token`, chmod 600** — passing tokens as CLI args exposes them in shell history and process listings.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

0. **Always use the promql CLI** — never call the Prometheus HTTP API from Python scripts or shell `curl`. The CLI handles auth, formatting, and output consistently; Python API calls bypass all of that and produce raw JS
Origin

Copies of this mod

2 near-identical copies found in the catalogue:

skills/promql-cli/SKILL.md · 109 lines

How it starts

The opening of the file, as written. The whole thing — 109 lines — stays where its author put it; the contents beside it link to each section on GitHub.

promql-cli — Prometheus Query CLI Skill

promql-cli (github.com/nalbury/promql-cli) is a Go CLI for querying, analyzing, and visualizing Prometheus metrics, plus PromQL fundamentals.

Reference Files

Read the relevant reference file(s) before executing tasks:

File When to read
references/installation.md User needs to install promql-cli or set up configuration (hosts, auth, token, password, multi-host)
references/usage.md User wants to discover metrics/exporters/labels, run queries, or choose output formats
references/graphing.md User wants to visualize Prometheus data as an ASCII chart in the terminal
references/debugging.md User is investigating a performance issue, latency, errors, saturation, data gaps, or query cost issues
references/promql-reference.md User needs help writing PromQL, understanding metric types, functions, or aggregations

For most tasks, read references/usage.md. For PromQL help, read references/promql-reference.md. When debugging, read both references/debugging.md and references/promql-reference.md.

Setup Check

Before running any query, verify that a host is configured:

promql 'up'   # succeeds if host is reachable; fails with connection error if not configured
# or
promql --host xxx 'up'

Recognize these errors as a configuration/auth problem and refer to references/installation.md:

Error Cause
dial tcp ... connection refused No host running at the configured address
dial tcp ... no such host Hostname not resolved — wrong host in config
error querying prometheus: ...401... Bearer token missing or invalid
error querying prometheus: ...403... Token valid but insufficient permissions
please specify an authentication type Auth flags partially set — use config file instead

If any of these appear, do not create config files on behalf of the user — config files may contain credentials (tokens, passwords) that must never pass through an LLM. Instead, guide the user to set it up themselves:

Read the full file on GitHub · 109 lines

Files

What ships with it

6 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2mo ago Changed · +12 lines f26c1861b34f
  2. 3mo ago First seen · 97 lines · 89 tokens per session scan B eef61b205199

Subscribe to this mod's changes

promql-cli is a skill published in the GitHub repository samber/cc-skills (356 stars, last pushed 1mo ago), licensed MIT. It adds 89 tokens to every session and 1,702 once invoked, about $0.0004 per session on Opus 5.5. A static security scan graded it B with 2 findings (asks for root, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

promql-cli compared with skills from other repositories

promql-cli next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
promql-clisamber/cc-skillsSkill3561mo agoMITB89Claude Code
golang-testingsamber/cc-skills-golangSkill4.0k23d agoMITA115Claude Code
golang-benchmarksamber/cc-skills-golangSkill4.0k23d agoMITA104Claude Code
golang-continuous-integrationsamber/cc-skills-golangSkill4.0k23d agoMITA181Claude Code
golang-dependency-injectionsamber/cc-skills-golangSkill4.0k23d agoMITA182Claude Code
golang-design-patternssamber/cc-skills-golangSkill4.0k23d agoMITA169Claude Code
golang-documentationsamber/cc-skills-golangSkill4.0k23d agoMITA77Claude Code