<< All versions
Skill v1.0.1
currentAutomated scan100/100monkilabs/opencastle/performance-optimization
+2 new
──Details
PublishedAugust 29, 2026 at 06:38 AM
Content Hashsha256:495dbbdaaee68b25...
Git SHAf297837635b1
Bump Typepatch
──Files
Files (1 file, 1.5 KB)
SKILL.md1.5 KBactive
SKILL.md · 25 lines · 1.5 KB
version: "1.0.1" name: performance-optimization description: "Profiles, reduces frontend/backend costs: split bundles, optimize assets, apply caching, fix Core Web Vitals regressions. Use when profiling Lighthouse/CI regressions, reducing bundle size, or fixing high CLS/LCP/TTI metrics."
Performance Optimization
Measure before changing anything. Add React.memo/useMemo/useCallback only after a profile shows the cost — never speculatively. Set budgets (load time, memory, API latency) and enforce them in CI.
Rules
- Node: async APIs only — never
readFileSyncor other sync I/O on a request path. - Debounce input-driven fetches at 300 ms.
- INP replaced FID as a Core Web Vital in March 2024: budget it at ≤200 ms, and measure every interaction, not just the first.
- Profile Node with
clinic.jsornode --inspect; profile React with<Profiler onRender>or the DevTools Profiler.
Profiling Workflow
- Lighthouse (or the CI perf job) for a baseline; name the failing metric (LCP/CLS/INP/TTI). Lighthouse emulates mobile by default; pass
--preset=desktopwhen the regression is desktop-only. - Profile to locate the hotspot call stacks / long tasks.
- Apply the minimal fix (code-split, memoize, shrink payloads, defer non-critical work); confirm in the profiler that the measured hotspot actually shrank.
- Re-run Lighthouse / the CI perf job. Ship only at ≥10% improvement or once inside budget.
- If the regression persists, iterate and record a rollback plan; note fixes in the changelog.