umami-query

umami-query is a command for Claude Code from bvdr/claude-plugins. It costs 30 tokens per session (2,464 once invoked), scanned A, original, MIT.

A read-only command set for querying Umami Analytics data. Umami is a website-analytics tool that reports visits, page views, events, sessions, and currently active visitors.

In plain words
What is it for?
Use it to view website statistics, page views over time, event data, session activity, or visitors active in the last five minutes.
Why use it?
It removes the need to construct API requests, convert dates into timestamps, and interpret raw responses yourself. Queries run directly and do not change data.

Command for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the bvdr plugin — 13 commands shipped together

Good fit Use it to view website statistics, page views over time, event data, session activity, or visitors active in the last five minutes.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/bvdr/claude-plugins/umami-query
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.

Clone the repo
git clone --depth 1 https://github.com/bvdr/claude-plugins

Made for: Claude Code.

Or install bvdr, the plugin that ships this one along with the rest of its 13 commands.

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

README.md
[![agentmods](https://agentmods.dev/badge/commands/bvdr/claude-plugins/umami-query/github.svg)](https://agentmods.dev/commands/bvdr/claude-plugins/umami-query)
Your own site
<a href="https://agentmods.dev/commands/bvdr/claude-plugins/umami-query"><img src="https://agentmods.dev/badge/commands/bvdr/claude-plugins/umami-query/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 umami-query

Your own site · 80×15
<a href="https://agentmods.dev/commands/bvdr/claude-plugins/umami-query"><img src="https://agentmods.dev/badge/commands/bvdr/claude-plugins/umami-query.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 30 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,464 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00030 $0.02464
Opus 5.5 $0.00012 $0.00986
Sonnet 5.5 $0.00006 $0.00493
Haiku 4.5 $0.00003 $0.00246

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

Security

Grade A, and why

umami-query scanned grade A with 1 finding 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.

Makes network callslowCapability

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

curl -s "{host}/api/websites/{websiteId}/stats?startAt={startMs}&endAt={endMs}" \
plugins/bvdr/commands/umami-query.md · 265 lines

How it starts

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

Umami Query

Query the Umami API for analytics data. All operations are read-only and execute directly.

Prerequisites

Read .umami.json from project root for host, websiteId, token. If missing, invoke bvdr:umami-setup.

Smart Defaults

  • No date range specified → default to last 7 days
  • User says "today" → calculate startAt/endAt for current day
  • User says "this month" → first day of current month to now
  • All startAt/endAt values are in milliseconds since epoch
  • Calculate with: date +%s000 (bash) or Date.now() (JS)
  • Format results as readable tables
  • After showing results, suggest relevant follow-up queries

Endpoints

Website Stats

Overview metrics for a date range.

curl -s "{host}/api/websites/{websiteId}/stats?startAt={startMs}&endAt={endMs}" \
  -H "Authorization: Bearer {token}"

Response: { "pageviews": N, "visitors": N, "visits": N, "bounces": N, "totaltime": N, "comparison": {...} }

Active Visitors

Unique visitors in last 5 minutes.

curl -s "{host}/api/websites/{websiteId}/active" \
  -H "Authorization: Bearer {token}"

Response: { "visitors": N }

Pageviews Over Time

Time series of pageviews and sessions.

curl -s "{host}/api/websites/{websiteId}/pageviews?startAt={startMs}&endAt={endMs}&unit=day&timezone=Europe/Bucharest" \
  -H "Authorization: Bearer {token}"

unit values and limits:

  • minute — max range: 60 minutes
  • hour — max range: 30 days
  • day — max range: 6 months
  • month, year — no limit

Add &compare=prev for previous period comparison or &compare=yoy for year-over-year.

Response: { "pageviews": [{"x": "2026-03-01", "y": 150}], "sessions": [{"x": "2026-03-01", "y": 80}] }

Metrics Breakdown

Break down data by any dimension.

curl -s "{host}/api/websites/{websiteId}/metrics?startAt={startMs}&endAt={endMs}&type=path&limit=20" \
  -H "Authorization: Bearer {token}"

type values: path, entry, exit, title, query, referrer, channel, domain, country, region, city, browser, os, device, language, screen, event, hostname, tag, distinctId

Read the full file on GitHub · 265 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 · 265 lines · 30 tokens per session scan A 69124a355d1c

Subscribe to this mod's changes

umami-query is a command published in the GitHub repository bvdr/claude-plugins (4 stars, last pushed 4mo ago), licensed MIT. It adds 30 tokens to every session and 2,464 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 1 finding (makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.