Profiles and reduces frontend/backend costs: split bundles, optimize assets, apply caching, and fix Core Web Vitals regressions. Use when profiling Lighthouse/CI regressions, reducing bundle size, or fixing high CLS/LCP/TTI metrics.
100
100%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
Rule: Measure first (Chrome DevTools, Lighthouse, Datadog), optimize second. Set budgets (load time, memory, API latency). Automate in CI/CD.
Domain-specific patterns (rendering, JS, Node optimizations) are referenced in REFERENCE.md to keep this skill concise.
| Domain | Key patterns |
|---|---|
| Rendering | React.memo/useMemo/useCallback only after profiling; stable key props; CSS classes over inline styles; CSS animations (GPU); requestIdleCallback for non-critical work |
| Assets | WebP/AVIF images; SVG icons; bundle+minify+tree-shake (esbuild/Rollup); loading="lazy"; dynamic imports; long-lived cache headers + cache-busting; font subsetting + font-display: swap |
| JS | Web Workers for heavy computation; debounce/throttle events; clean up listeners/intervals; Map/Set for lookups; TypedArray for numeric data |
| Node.js | Async APIs only (never readFileSync in prod); clustering/worker threads for CPU; streams for large I/O; profile with clinic.js / node --inspect |
// BAD: fetch on every keystroke
input.addEventListener('input', (e) => fetch(`/search?q=${e.target.value}`));
// GOOD: debounced 300 ms
let t; input.addEventListener('input', (e) => { clearTimeout(t); t = setTimeout(() => fetch(`/search?q=${e.target.value}`), 300); });// Lazy-load a heavy chart only on client
import dynamic from 'next/dynamic';
const Chart = dynamic(() => import('../components/Chart'), { ssr: false, loading: () => <div>Loading chart…</div> });
export default function Page(){ return <Chart />; }import React, { Profiler } from 'react';
const Item = React.memo(function Item({data}){ return <div>{data.title}</div>; });
function onRender(id, phase, actualDuration){ console.log(id, phase, actualDuration); }
export default function List({items}){
return (
<Profiler id="List" onRender={onRender}>
{items.map(i=> <Item key={i.id} data={i} />)}
</Profiler>
);
}--emulated-form-factor=mobile.clinic for backend.
f5c8508
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.