webperf

webperf is a command for Claude Code from vinvcn/addyosmani-agent-skills-zh. It costs 14 tokens per session (520 once invoked), scanned A, original, MIT.

A web performance auditing command for browser-based websites and applications. It can use reports or traces from tools such as Lighthouse, PageSpeed Insights, Chrome DevTools, and CrUX, or inspect source code when those measurements are unavailable.

In plain words
What is it for?
It helps investigate Core Web Vitals, page loading, rendering, network use, and structural performance problems in web applications.
Why use it?
It brings possible loading and rendering problems into one review and distinguishes measured results from code-based warnings. It also prevents the audit from being used on code with no browser output.

Command for Claude Code

Written for Claude Code: installed under .claude/. Also seen: mentions subagents.

Part of the agent-skills plugin — 26 skills, 10 commands, 4 agents, 1 hook shipped together

Good fit It helps investigate Core Web Vitals, page loading, rendering, network use, and structural performance problems in web applications.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/vinvcn/addyosmani-agent-skills-zh/webperf
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/vinvcn/addyosmani-agent-skills-zh

Made for: Claude Code.

Or install agent-skills, the plugin that ships this one along with the rest of its 26 skills, 10 commands, 4 agents, 1 hook.

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 webperf

README.md
[![agentmods](https://agentmods.dev/badge/commands/vinvcn/addyosmani-agent-skills-zh/webperf/github.svg)](https://agentmods.dev/commands/vinvcn/addyosmani-agent-skills-zh/webperf)
Your own site
<a href="https://agentmods.dev/commands/vinvcn/addyosmani-agent-skills-zh/webperf"><img src="https://agentmods.dev/badge/commands/vinvcn/addyosmani-agent-skills-zh/webperf/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 webperf

Your own site · 80×15
<a href="https://agentmods.dev/commands/vinvcn/addyosmani-agent-skills-zh/webperf"><img src="https://agentmods.dev/badge/commands/vinvcn/addyosmani-agent-skills-zh/webperf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 520 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.00014 $0.00520
Opus 5.5 $0.00006 $0.00208
Sonnet 5.5 $0.00003 $0.00104
Haiku 4.5 $0.00001 $0.00052

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

Security

Grade A, and why

webperf 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 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.

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.

.claude/commands/webperf.md · 33 lines

What it actually says

/webperf 专门面向 web 应用。不要把它用于 utility libraries、CLIs,或没有浏览器端产物的 server-only 代码。

确定模式

Deep 模式 — 以下任意一项可用时激活:

  • 一份 Lighthouse JSON 报告文件(例如 npx lighthouse <url> --output json --output-path ./report.json,或来自 Chrome DevTools MCP CLI 的 npx -p chrome-devtools-mcp chrome-devtools lighthouse_audit --output-format=json)
  • 一份 PageSpeed Insights JSON 响应(包含 Lighthouse + CrUX)
  • 一份 CrUX API 响应(需要 CRUX_API_KEY 或 GOOGLE_API_KEY)
  • 一份 DevTools performance trace
  • 一个 live URL,外加 harness 中已配置的 chrome-devtools MCP server(agent 可以直接通过 lighthouse_audit 和 performance_* tools 采集指标)
  • 在本地调用的 Chrome DevTools MCP CLI(通过 npx -p chrome-devtools-mcp chrome-devtools <tool>,或在 npm i -g chrome-devtools-mcp 之后)— 用户运行类似 chrome-devtools lighthouse_audit --output-format=json 的命令,并把 JSON 输出交给 agent

Quick 模式 — 以上都不可用时的默认模式。Agent 在源代码中扫描结构性反模式,并把每个发现标注为 potential impact。

运行审计

启动 web-performance-auditor subagent。显式传给它:

  • 待 review 的文件、组件或 diff
  • 任何产物路径(Lighthouse JSON、PSI JSON、CrUX 响应、trace)或粘贴的 JSON 内容
  • 已知时的目标 URL 或页面名
  • 一条关于你预期使用哪种模式(Quick 或 Deep)的说明,这样若本意是 Deep,agent 会把缺失的输入暴露出来

该 subagent 返回一份 scorecard(只填入有来源的数值)、一份排好序的 findings 列表、正面观察,以及主动给出的建议。

输出

把完整的审计报告返回给用户。不需要综合或合并步骤 — 这是单 persona 命令。

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 · 33 lines · 14 tokens per session scan A fd63ec6045b0

Subscribe to this mod's changes

webperf is a command published in the GitHub repository vinvcn/addyosmani-agent-skills-zh (40 stars, last pushed 1mo ago), licensed MIT. It adds 14 tokens to every session and 520 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-09-16.