Skip to content

bestdeejay-design/agent-skills / skills/frontend-performance

frontend-performance

Verified

Audit web performance depth beyond Lighthouse. Use when the user asks for a performance audit, Core Web Vitals (CWV) review, bundle-size analysis, or to optimize loading — including slow LCP/FCP/INP/CLS, a heavy JS/CSS bundle, or missing HTTP/2, text compression, browser caching, HSTS, resource hints, service worker, or speculation rules. Triggers (casual phrasings included): 'performance audit', 'perf audit', 'frontend perf', 'lighthouse', 'core web vitals', 'cwv', 'lcp', 'cls', 'inp', 'page speed', 'bundle size', 'optimize speed', 'why is my site slow', 'make it faster', 'speed up my page', 'check HTTP/2 and compression', 'проверь производительность', 'ускорь сайт'. Two engines: perf_headers.py (pure-Python stdlib, offline — headers, protocol, page weight, duplicate libs, hints, SW, streaming, virtualization) and audit.js (real Chrome + Lighthouse ≥13 — LCP/FCP/INP/CLS, critical chains, render-blocking). Maps Front-End-Checklist Performance (43 rules). Invoked by /frontend and mobile-frontend.

FileKindSize
SKILL.mdskill md12.4 KB
references/canonical-patterns.mdmarkdown1.6 KB
scripts/audit.jsscript10.0 KB
scripts/perf_headers.pyscript24.5 KB
skill.jsonconfig2.2 KB

references/canonical-patterns.md

View on GitHub
# Canonical patterns — frontend-performance

This skill is aligned with the **Front-End-Checklist "Performance"** category
(43 rules) and the Core Web Vitals definitions from web.dev / Google.

## Core Web Vitals thresholds (Google)

| Metric | Good | Needs improvement | Poor |
|---|---|---|---|
| LCP (Largest Contentful Paint) | ≤ 2.5s | 2.5s–4.0s | > 4.0s |
| INP (Interaction to Next Paint) | ≤ 200ms | 200ms–500ms | > 500ms |
| CLS (Cumulative Layout Shift) | ≤ 0.1 | 0.1–0.25 | > 0.25 |

Supporting: FCP ≤ 1.8s, TTFB ≤ 800ms, page load ≤ 3s, page weight < 1500KB
(ideal < 500KB).

## Offline vs measured split

- **Offline (`perf_headers.py`, static):** headers, protocol, caching, HSTS,
  page weight, bundle size, duplicate libs, resource hints, service worker,
  speculation rules, streaming, virtualization, third-party async, GIF→video.
- **Measured (`audit.js`, lighthouse):** LCP, FCP, INP (TBT proxy), CLS,
  critical chains, render-blocking, compression, HTTP/2, legacy JS, redirects,
  DOM size, unused JS.
- **Manual (`perf:webpagetest`, `perf:consent-mode-v2`, `perf:gtm-efficient`,
  `perf:loading-indicators`, `perf:bfcache` confirm):** require WebPageTest or
  human/config review beyond what the two engines capture.

## Why two engines

Lighthouse cannot see raw response headers, CDN signatures, duplicate library
copies, or static build structure without a full render. The offline auditor
covers that layer; Lighthouse covers runtime. Together they close the 43-rule
Performance category without external MCP servers or third-party Python deps.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall