prometheus-cli

prometheus-cli is a skill for Claude Code, Codex from abdullahkhawer/devops-skills. It costs 33 tokens per session (1,288 once invoked), scanned B, original, Apache-2.0.

A command-line helper for Prometheus, a system that stores measurements such as request counts and response times. It uses Prometheus’s HTTP API to inspect metrics, metadata, alerts, and rules.

In plain words
What is it for?
Running immediate or time-based metric queries, looking up metric metadata, and inspecting alerts and recording rules.
Why use it?
It avoids manually building API requests when checking monitoring data or alert configuration.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Running immediate or time-based metric queries, looking up metric metadata, and inspecting alerts and recording rules.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/abdullahkhawer/devops-skills/prometheus-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 abdullahkhawer/devops-skills --skill prometheus-cli
Clone the repo
git clone --depth 1 https://github.com/abdullahkhawer/devops-skills

Made for: Claude Code, Codex.

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 prometheus-cli

README.md
[![agentmods](https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/prometheus-cli/github.svg)](https://agentmods.dev/skills/abdullahkhawer/devops-skills/prometheus-cli)
Your own site
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/prometheus-cli"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/prometheus-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 prometheus-cli

Your own site · 80×15
<a href="https://agentmods.dev/skills/abdullahkhawer/devops-skills/prometheus-cli"><img src="https://agentmods.dev/badge/skills/abdullahkhawer/devops-skills/prometheus-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 33 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,288 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.
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.00033 $0.01288
Opus 5.5 $0.00013 $0.00515
Sonnet 5.5 $0.00007 $0.00258
Haiku 4.5 $0.00003 $0.00129

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

Security

Grade B, and why

prometheus-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 1mo 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.

mkdir -p ~/.prometheus && echo "<your-api-token>" > <TOKEN_FILE> && chmod 600 <TOKEN_FILE>

Makes network callslowCapability

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

description: Query Prometheus metrics using the HTTP API via curl. Use for instant queries, range queries, metadata lookups, and alert/rule inspection.
skills/prometheus-cli/SKILL.md · 111 lines

How it starts

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

Prometheus CLI Skill

Use the instance and rules below when constructing all Prometheus API commands.

Instances

Update the table below with your Prometheus instance URLs before using this skill:

Environment Base URL Token File
Production https://<your-prometheus-prod-url> ~/.prometheus/prod.token
Staging https://<your-prometheus-staging-url> ~/.prometheus/staging.token

If the target instance is unclear, ask the user before running any command.

Prerequisites (one-time setup by user)

Obtain a Prometheus API token for each instance you intend to use and save it to the corresponding token file (see instance table above). Never print or display token values. Do not perform these steps yourself.

For each instance:

  1. Obtain an API token (via your team or the monitoring platform)
  2. Save it:
mkdir -p ~/.prometheus && echo "<your-api-token>" > <TOKEN_FILE> && chmod 600 <TOKEN_FILE>

Command Format

All API calls use curl with the token read from the instance's token file (see instance table above):

curl -s -H "Authorization: Bearer $(cat <TOKEN_FILE>)" \
  "<BASE_URL>/api/v1/<endpoint>" | jq .

Example (production):

curl -s -H "Authorization: Bearer $(cat ~/.prometheus/prod.token)" \
  "https://<your-prometheus-prod-url>/api/v1/query?query=up" | jq .

Available API Endpoints

Read-only (safe, no confirmation needed)

Endpoint Description
/api/v1/query?query=<expr> Instant query — evaluate a PromQL expression at current time
/api/v1/query_range?query=<expr>&start=<ts>&end=<ts>&step=<dur> Range query — evaluate PromQL over a time range
/api/v1/labels List all label names
/api/v1/label/<name>/values List values for a specific label
/api/v1/series?match[]=<selector> Find time series matching a selector
/api/v1/metadata List metric metadata (type, help text)
/api/v1/rules List all recording and alerting rules
/api/v1/alerts List currently firing alerts
/api/v1/targets List scrape targets and their health
/api/v1/targets/metadata List metadata for scraped targets
/api/v1/status/config Show current Prometheus configuration
/api/v1/status/flags Show runtime flags
/api/v1/status/runtimeinfo Show runtime information
/api/v1/status/buildinfo Show build information
/api/v1/status/tsdb Show TSDB stats

Read the full file on GitHub · 111 lines

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. 1mo ago First seen · 111 lines · 33 tokens per session scan B 859d2c25384c

Subscribe to this mod's changes

prometheus-cli is a skill published in the GitHub repository abdullahkhawer/devops-skills (8 stars, last pushed 28d ago), licensed Apache-2.0. It adds 33 tokens to every session and 1,288 once invoked, about $0.0001 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-31.

Related

Other skills, from other repositories

tianji-worker

Use when creating, testing, deploying, invoking, debugging, scheduling, pausing, or rolling back Tianji Workers, or managing their environment variables and shared modules.

msgbyte/tianji · 38 tokens

docs-manage

Manage the Grounded Docs MCP Server documentation index. Covers scraping and indexing documentation from URLs or local files, refreshing existing indexes with changed content, removing library versions from the index, and compacting the SQLite store. Use when you need to add, update, or delete indexed documentation…

arabold/docs-mcp-server · 68 tokens

fetch-url

Fetch a single URL and print its content as Markdown. Use when you need to read a web page, documentation page, or API reference without indexing it. Accepts http(s):// and file:// URLs and writes the result to stdout.

arabold/docs-mcp-server · 51 tokens

workthreads

SpecStory Workthreads - a weekly work-thread rollup across a team's repos from SpecStory coding histories (any agent - Claude Code, Codex, Cursor, Gemini, and more). It groups the window's sessions into threads of work per project and labels each new / open / recently closed, so a lead sees what shipped, what is still…

specstoryai/getspecstory · 126 tokens

dokploy-deploy

This skill should be used when user asks to "deploy with Dokploy", "use Dokploy Cloud", "manage self-hosted Dokploy", "deploy Docker Compose on Dokploy", "manage Dokploy databases", "configure Dokploy domains", or "look up Dokploy CLI commands".

fcakyon/claude-codex-settings · 63 tokens

openship-config

This skill should be used when the user asks to "create openship.json", "configure an OpenShip deployment", "make a repo deployable on OpenShip", or fix "openship config validate" errors.

fcakyon/claude-codex-settings · 47 tokens