perf-audit
БесплатноБез исполняемых скриптовНе проверенAudit frontend bundle size and Core Web Vitals risks. Use when asked to "audit performance", "analyze bundle", "check bundle size", "check Core Web Vitals"…
от helderberto★ 21 звезда на GitHubОб этом скилле
Performance Audit
Workflow
Detect build tool from
package.json(vite, webpack, next, rollup)Run the production build via the project's task runner (auto-detect from package.json).
Analyze the build output — non-interactive only. Never launch a browser or a long-running server in an audit; those hang an automated run. Prefer, in order:
- Measure the emitted files directly: for each file in the output dir (e.g.
dist/assets/*.js), report raw + gzipped size —gzip -c <file> | wc -c. This always works and needs no extra tooling. - Per-module breakdown, as a static artifact (not a server), written under
$TMPDIR(else/tmp) and never the working tree, where the nextcommitwould sweep it in. Print the path:- Vite/Rollup:
npx source-map-explorer 'dist/assets/*.js', or addrollup-plugin-visualizerconfigured to emit JSON/HTML to a file - webpack/Next.js:
npx webpack-bundle-analyzer -m static -r "${TMPDIR:-/tmp}/report.html" <stats-file>(writes a file; do not use the default server mode)
- Vite/Rollup:
npx vite-bundle-visualizeropens a browser and blocks — only suggest it to the user for manual exploration; do not run it here.
- Measure the emitted files directly: for each file in the output dir (e.g.
Check
package.jsonfor known heavy packagesCheck the source for the Core Web Vitals risks below. Detect the framework first; recommend only its idioms.
Report findings: size impact for the bundle, potential impact for source risks
Compare against standard industry thresholds; report gzipped sizes.
Core Web Vitals risks
Read the source for these; each is a potential impact until measured.
- LCP: hero image or heading not lazy-loaded; LCP image in the initial HTML with
fetchpriority="high"; no<head>scripts withoutdefer/async; critical fonts preloaded - CLS: images, iframes, and embeds reserve space (
width/heightoraspect-ratio); nothing injected above existing content; fonts withfont-displayand matched fallbacks - INP: no long synchronous work in event handlers; long loops yield (
scheduler.yield(),setTimeoutfallback); heavy work in a worker - Rendering: long lists virtualized; animations on
transform/opacity; no read-then-write layout loops; memoization only where it pays - Network: independent requests in parallel, not sequential
awaits; no over-fetching; lists paginated; hashed static assets cached long; heavy third-party widgets behind a facade
Output format
- Bundle summary: total size / gzipped size vs budget
- Large chunks: name + size + % of total
- Heavy deps: package + size + lighter alternative
- Quick wins: sorted by estimated savings
- Core Web Vitals: LCP, INP, CLS — value + source, or
not measured - Source risks:
file:line, the metric at risk, the fix
Rules
- Report gzipped sizes (what the browser downloads)
- Never auto-change dependencies -- report and suggest only
- Never state an LCP, INP, or CLS value without a measurement the user provided (Lighthouse or PageSpeed JSON, CrUX data, a DevTools trace); label it lab or field
- Skip micro-optimizations with no plausible effect on a Core Web Vital or the bundle
Error Handling
- Build fails -- report the error, skip the bundle steps, still run the source checks
- No build output found -- run production build first
- Build tool unrecognized -- scan
package.jsonfor heavy packages, then run the source checks
Установить perf-audit в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл perf-audit?
Audit frontend bundle size and Core Web Vitals risks. Use when asked to "audit performance", "analyze bundle", "check bundle size", "check Core Web Vitals", or find frontend bottlenecks. Don't use for backend performance, database queries, or diagnosing a specific slowdown (/debug).
Как установить скилл perf-audit?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл perf-audit запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic