umami-setup

A setup command for connecting a project to an Umami Analytics instance. It authenticates the account, lets you choose a website, installs the tracking script, and verifies the connection.

In plain words
What is it for?
Use it when starting Umami in a project, connecting an existing site, installing its tracker, or checking whether the connection still works.
Why use it?
It avoids manually handling login requests, website selection, configuration, and connection checks. The project stores the connection details in a .umami.json file.

Command

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 commands/bvdr/claude-plugins/umami-setup
Clone the repo
git clone --depth 1 https://github.com/bvdr/claude-plugins
Per session 29 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,207 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00029 $0.01207
Opus 5 $0.00015 $0.00603
Sonnet 5 $0.00006 $0.00241
Haiku 4.5 $0.00003 $0.00121

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

Security

Grade A, and why

umami-setup 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 2d 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 -X POST "{host}/api/auth/login" \
plugins/bvdr/commands/umami-setup.md · 153 lines

How it starts

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

Umami Setup

Configure a project to use Umami Analytics. Handles authentication, website selection, script tag installation, and connection verification.

Flow

  1. Check if .umami.json exists at project root

    • If exists → offer re-run options (see below)
    • If not → proceed with setup
  2. Collect connection details using AskUserQuestion:

    • Umami host URL (e.g., https://analytics.mysite.com)
    • Username
    • Password
  3. Authenticate against the Umami instance:

curl -s -X POST "{host}/api/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"username": "{username}", "password": "{password}"}'

Response: { "token": "eyT...", "user": { "id": "...", "username": "...", "role": "...", "isAdmin": true } }

If authentication fails, show the error and ask the user to check their credentials.

  1. List available websites:
curl -s "{host}/api/websites" \
  -H "Authorization: Bearer {token}"

Present the list to the user and let them pick one. If they want to create a new website, confirm first then:

curl -s -X POST "{host}/api/websites" \
  -H "Authorization: Bearer {token}" \
  -H "Content-Type: application/json" \
  -d '{"name": "{name}", "domain": "{domain}"}'
  1. Write .umami.json to project root:
{
  "host": "https://analytics.mysite.com",
  "websiteId": "94db1cb1-74f4-4a40-ad6c-962362670409",
  "token": "eyTxxxxx...",
  "domain": "mysite.com"
}
  1. Add .umami.json to .gitignore:

    • If .gitignore doesn't exist → create it with .umami.json
    • If .gitignore exists but doesn't contain .umami.json → append it
    • If already listed → skip
  2. Detect project framework and install the tracker script tag:

    Next.js (app router): Add to app/layout.tsx or app/layout.js:

    import Script from 'next/script'
    
    // Inside the <body> tag:
    <Script
      src="{host}/umami.js"
      data-website-id="{websiteId}"
      strategy="afterInteractive"
    />
    

    Next.js (pages router): Add to pages/_app.tsx or pages/_document.tsx:

    import Script from 'next/script'
    
    <Script
      src="{host}/umami.js"
      data-website-id="{websiteId}"
      strategy="afterInteractive"
    />
    

Read the full file on GitHub · 153 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. 2d ago First seen · 153 lines · 29 tokens per session scan A 6247fac539be

Subscribe to this mod's changes

umami-setup is a command published in the GitHub repository bvdr/claude-plugins (3 stars, last pushed 2mo ago), licensed MIT. It adds 29 tokens to every session and 1,207 once invoked, about $0.0001 per session on Opus 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.