Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

web-perf-review

БесплатноЗапускает вложенные скриптыНе проверен

Audit and optimize frontend page, modal, motion, and bundle performance for a PR, branch, or URL with restrained, evidence-backed recommendations and…

nexu-ioот nexu-io★ 4 480 звёзд на GitHub

Об этом скилле

Web Performance Review and Optimization

Audit or optimize the frontend performance of a PR, local branch, page, or interactive modal without over-engineering or degrading product craft. Deliver concise, decision-ready results directly in the current conversation; write external files, PR comments, or Feishu docs only when explicitly requested.

Modes

Choose the mode from the user's request. Default to Audit when ambiguous.

  1. Audit (default, read-only): Inspect the diff, build output, and live runtime behavior. Report a verdict, measured baseline, prioritized findings (P0 / P1 / P2), and whether any proposed fix changes visuals or interaction. Do not edit product code.
  2. Optimize (explicit request or approval): Lock a Before measurement baseline, apply the smallest restrained fixes for P0 and high-ROI P1 issues, verify visual/content/tracking fidelity, re-measure After under identical conditions, and present the Before/After delta table.

Restraint Rules

Follow these six guardrails on every run:

  1. Diff-first scope: Audit only the routes, modals, entry chunks, and assets touched or affected by the target PR or request. Log unrelated legacy debt briefly under "Out-of-scope observations" without blocking the PR or refactoring unrelated files.
  2. Evidence before fixes: Do not propose speculative micro-optimizations (for example, wrapping trivial expressions in useMemo or splitting tiny JSON files). Every finding must cite concrete evidence (file/line, asset size, or measured metric) and an observable user benefit.
  3. Visual and product fidelity lock: Never silently swap artwork provenance, skip business-rule slots, visibly degrade image sharpness, or alter analytics attribution, session deduplication, keyboard focus traps, Escape handling, or prefers-reduced-motion behavior. Mark any suggestion that alters visible appearance or motion cadence as Needs Design/PM sign-off.
  4. Severity discipline:
    • P0 (Fix before merge): Unbounded media/hotlink flood, severe LCP/modal-ready regression, visible CLS, sustained animation jank or idle rAF/CPU leak, large entry-bundle leak, or untriggered modal pre-fetching heavy media.
    • P1 (High-ROI recommended): Missing dimensions/priority hints, oversized images relative to rendered slots, high-frequency state re-rendering large subtrees, or missing visibility/occlusion pause.
    • P2 (Observe only): Marginal gains or broad architectural refactors; note briefly and do not churn code in an unrelated PR.
  5. Honest measurement hygiene: Never benchmark a dev/HMR server as performance evidence. Compare Before and After on the same production build mode, viewport, throttling, and 3-run cold median. Label evidence confidence (L1–L4) and state what was not measured (for example, production CDN or low-end physical devices).
  6. Falsifiable regression guards: When adding a performance regression test in Optimize mode, verify that the test exercises the active code path and fails against the unoptimized behavior rather than passing trivially via an early-return branch.

Detailed thresholds and anti-noise rules live in checklist.md. Measurement rules live in measurement-protocol.md. Visual and test pitfalls live in visual-fidelity-guard.md. Repository-specific commands live in repo-profile.md.

Workflow

1. Establish target and applicable dimensions

Identify the target (PR URL/number, git base..head range, uncommitted diff, or live/local URL) and read the repository's AGENTS.md plus repo-profile.md.

Run the static diff scanner first so you only audit the performance dimensions touched by the change:

node .agents/skills/web-perf-review/scripts/scan-diff-payload.mjs \
  --repo . --base origin/main --head HEAD

If the diff touches only docs, tests, or backend code with zero frontend asset/render/bundle surface, stop early and report No frontend performance impact detected instead of inventing findings.

2. Inspect build artifacts and static payload

When the change affects built JS/CSS chunks or static media, build the production bundle (or inspect an existing production build) and compare entry-chunk and asset deltas:

node .agents/skills/web-perf-review/scripts/scan-diff-payload.mjs \
  --repo . --base origin/main --head HEAD \
  --build-dir studio/build --base-build-dir /path/to/base-build \
  --json /tmp/perf-static.json

Verify both total asset size and initial entry graph size (scripts, modulepreload, and stylesheets referenced by index.html) so lazy-loading wins are visible and accidental static imports into the entry shell stand out immediately.

3. Measure live runtime behavior

Run the zero-dependency Chrome/CDP probe against a production build (never a dev server)

Полный SKILL.md на GitHub

Установить web-perf-review в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

references/checklist.mdreferences/measurement-protocol.mdreferences/repo-profile.mdreferences/visual-fidelity-guard.mdscripts/compare-report.mjsscripts/measure-runtime.mjsscripts/scan-diff-payload.mjs

FAQ

Что делает скилл web-perf-review?

Audit and optimize frontend page, modal, motion, and bundle performance for a PR, branch, or URL with restrained, evidence-backed recommendations and before/after measurements. Use when reviewing or optimizing page load speed, LCP, CLS, TBT, modal or animation jank, idle rAF or CPU usage, media weight, or initial bundle size.

Как установить скилл web-perf-review?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл web-perf-review запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить web-perf-review с