web-vitals

web-vitals is a command for Claude Code from alifanov/darkflow. It costs 25 tokens per session (2,104 once invoked), scanned A, original, MIT.

A local Lighthouse test for Core Web Vitals, which are measurements of how quickly and steadily a web page loads and responds.

In plain words
What is it for?
Testing a site with mobile emulation, tracking metrics such as loading speed, visual movement, blocking time, and server response, and creating a task when a metric is poor.
Why use it?
It finds poor performance measurements before they become overlooked user-facing problems.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter.

Good fit Testing a site with mobile emulation, tracking metrics such as loading speed, visual movement, blocking time, and server response, and creating a task when a metric is poor.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/alifanov/darkflow/web-vitals
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/alifanov/darkflow

Made for: Claude Code.

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 web-vitals

README.md
[![agentmods](https://agentmods.dev/badge/commands/alifanov/darkflow/web-vitals/github.svg)](https://agentmods.dev/commands/alifanov/darkflow/web-vitals)
Your own site
<a href="https://agentmods.dev/commands/alifanov/darkflow/web-vitals"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/web-vitals/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 web-vitals

Your own site · 80×15
<a href="https://agentmods.dev/commands/alifanov/darkflow/web-vitals"><img src="https://agentmods.dev/badge/commands/alifanov/darkflow/web-vitals.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 25 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,104 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00025 $0.02104
Opus 5.5 $0.00010 $0.00842
Sonnet 5.5 $0.00005 $0.00421
Haiku 4.5 $0.00003 $0.00210

Measured yesterday against content hash 45df39b8614e, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

web-vitals scanned grade A with 0 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 yesterday.

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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

templates/.claude/commands/darkflow/web-vitals.md · 149 lines

How it starts

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

Measure this project's Core Web Vitals by running Lighthouse locally against its URL (mobile emulation), compare the lab metrics against Google's thresholds, and file a task when any metric lands in the 'poor' band. This tracks user-facing performance (LCP, CLS, TBT, FCP, TTFB) over time and turns regressions into actionable work for fix-issues. No API key and no external service — Lighthouse drives a local headless Chrome.

This is an analysis routine: healthy runs only write a snapshot; runs with a "poor" metric file a normal (human-triaged) task — a slow page is not an emergency, so unlike uptime-check these tasks are not auto-approved.

Lab, not field. Local Lighthouse produces lab data (a single synthetic run on this machine), not real-user field data. There is no lab INP — TBT (Total Blocking Time) is used as its proxy. Because it's local Chrome, it can measure localhost/staging/private URLs too, not just public ones.

Step 1 — Read project config

Load the project config (contract in .darkflow.d/claude.md → Project config). Uses: domain, language.

Step 2 — Resolve the URL to measure

If domain is set, use it. Otherwise auto-discover the production URL the same way uptime-check does (first match wins): Coolify FQDN, vercel.json / .vercel/project.json, netlify.toml, CNAME, package.json → homepage, or a production URL stated in README.md / docs/. If found, use it for this run and say in the output that domain should be set in the Web UI.

The URL just has to be reachable from this machine (public, staging, or localhost all work). If no URL can be determined at all, do not create a task — output web-vitals: no site_url — skipping and write a snapshot (Step 5) noting the target is unknown. Done.

Step 3 — Run Lighthouse locally

Lighthouse needs a Chrome/Chromium binary on this machine (chrome-launcher auto-detects it). Run the mobile preset (Lighthouse's default form factor — mobile is what Google ranks on):

Read the full file on GitHub · 149 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. yesterday Changed 45df39b8614e
  2. 1mo ago Changed · -3 lines 226e98e2f860
  3. 3mo ago First seen · 152 lines · 25 tokens per session scan A ceae76f2ffab

Subscribe to this mod's changes

web-vitals is a command published in the GitHub repository alifanov/darkflow (4 stars, last pushed yesterday), licensed MIT. It adds 25 tokens to every session and 2,104 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

web-vitals compared with commands from other repositories

web-vitals next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
web-vitalsalifanov/darkflowCommand4yesterdayMITA25Claude Code
localgetsentry/toolkitCommand977yesterdaynoneA0Claude Code
issuegetsentry/toolkitCommand977yesterdaynoneA0Claude Code
authgetsentry/toolkitCommand977yesterdaynoneA0Claude Code
debug-filesgetsentry/toolkitCommand977yesterdaynoneA0Claude Code
apigetsentry/toolkitCommand977yesterdaynoneA0Claude Code
eventgetsentry/toolkitCommand977yesterdaynoneA0Claude Code