query-metrics

query-metrics is a skill for Claude Code, Codex from openclaw/clawhub. It costs 48 tokens per session (2,851 once invoked), scanned B, original, MIT.

A command-line skill for querying Axiom MetricsDB, a service that stores operational measurements such as request counts, errors and response times.

In plain words
What is it for?
Use it to list metrics datasets, inspect metric definitions and tags, find matching metrics, and run time-range queries against OpenTelemetry metric data.
Why use it?
It helps discover available metrics and dimensions before writing a query, reducing invalid or incomplete investigations.

Skill for Claude CodeCodex

About the project

ClawHub is a public registry where OpenClaw users publish, version, search, and install text-based agent skills and OpenClaw packages. It provides web browsing, a CLI-oriented API, moderation, vector search, and artifact hosting for code plugins, bundle plugins, and experimental whole-agent packages. The catalogue skills and agents are entries that can be discovered or used through this registry.

openclaw/clawhub · 9,391 stars · on GitHub

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.

agentmods
npx agentmods add skills/openclaw/clawhub/query-metrics
Any agent
npx skills add openclaw/clawhub --skill query-metrics
Clone the repo
git clone --depth 1 https://github.com/openclaw/clawhub

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 query-metrics

README.md
[![agentmods](https://agentmods.dev/badge/skills/openclaw/clawhub/query-metrics.svg)](https://agentmods.dev/skills/openclaw/clawhub/query-metrics)
Your own site
<a href="https://agentmods.dev/skills/openclaw/clawhub/query-metrics"><img src="https://agentmods.dev/badge/skills/openclaw/clawhub/query-metrics.svg" alt="Measured on agentmods" height="20"></a>
Per session 48 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,851 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. Scan, not verified.
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 $0.00048 $0.02851
Opus 5 $0.00024 $0.01425
Sonnet 5 $0.00010 $0.00570
Haiku 4.5 $0.00005 $0.00285

Measured 5d ago against content hash c131476bdbac, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade B, and why

query-metrics 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 5d 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.

Unrestricted tool accessmediumExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

Run any script without arguments for full usage.

Makes network callslowCapability

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

On 500, re-run with `curl -v` to capture the `traceparent` / `x-axiom-trace-id` header and report it — the trace ID is what the backend team needs to debug.
Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.agents/skills/query-metrics/SKILL.md · 186 lines

How it starts

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

Querying Axiom Metrics

All script paths are relative to this skill's folder; invoke as scripts/<name>. The target dataset must be of kind otel:metrics:v1.

Setup, prerequisites, and ~/.axiom.toml configuration: see README.md. Edge-deployment routing is automatic — the scripts read each dataset's edgeDeployment and route to the right regional endpoint without configuration.

Workflow

  1. scripts/datasets <deploy> --kind otel:metrics:v1 — list metrics datasets.
  2. scripts/metrics-specrequired before composing any query. MPL evolves; the spec is the source of truth. Also use it to answer general MPL/metrics questions.
  3. scripts/metrics-info <deploy> <dataset> metrics — list metrics with {type, temporality, unit} metadata. Read this before writing the query (see Choosing a Query Shape).
  4. scripts/metrics-info <deploy> <dataset> tags [<tag> values] — explore filter dimensions.
  5. scripts/metrics-query <deploy> '<MPL>' <start> <end> — execute. Iterate.

If the user names a specific entity (service, host, …), scripts/metrics-info <deploy> <dataset> find-metrics "<value>" finds the metrics carrying it. find-metrics searches tag values, not metric names — don't use it for general discovery.

Choosing a Query Shape

The metrics-info listing returns each metric's {type, temporality, unit}. Read these before composing — never assume a metric is a simple scalar.

Field Values Drives
type Gauge, CounterMonotonic, CounterNonMonotonic, Histogram Required pre-aggregation operators.
temporality Cumulative, Delta, null Whether counter values are running totals or per-interval deltas. null is normal for Gauges.
unit UCUM string (Cel, kW.h, s, %, [ppm], …) or null Display unit; preserve when reporting results.

Rules per type (consult metrics-spec for exact operator names — they evolve):

  • Gauge — instantaneous value. Align directly with avg/min/max/sum. Don't apply a rate; you'd be averaging meaningless deltas of an instantaneous value.
  • CounterMonotonic + Cumulative — running total (resets aside). The raw values are rarely what you want. Convert to a per-second rate first, then align/aggregate.
  • CounterMonotonic + Delta — already per-interval. Sum/align without a rate step.
  • CounterNonMonotonic — can go up or down (queue depth, balance). Intent is ambiguous: rate, delta, or current value all make sense for different questions. Ask the user before picking one.
  • Histogram — not a scalar. align using avg produces nonsense. Use bucket … using with the histogram functions from metrics-spec; quantiles are float specs to those functions, and temporality selects the variant (Cumulative vs Delta interpolation). Consult metrics-spec for the exact signatures.
  • temporality: null — "not applicable for this instrument type" (the norm for Gauges), not "missing data".

Read the full file on GitHub · 186 lines

Files

What ships with it

8 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. 5d ago First seen · 186 lines · 48 tokens per session scan B c131476bdbac

Subscribe to this mod's changes

query-metrics is a skill published in the GitHub repository openclaw/clawhub (9,391 stars, last pushed today), licensed MIT. It adds 48 tokens to every session and 2,851 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it B with 2 findings (unrestricted tool access, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.