frontend-perf

Analyzes and optimizes React 19, Vite, and Ant Design frontend performance across build, runtime, loading, and bundle dimensions.

Updated Aug 9, 2026
One-click install
npx skills add https://github.com/stbui/trade-crawlee --skill frontend-perf-stbui
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: frontend-perf
Source: https://github.com/stbui/trade-crawlee/tree/main/.claude/skills/frontend-perf
Command: npx skills add https://github.com/stbui/trade-crawlee --skill frontend-perf-stbui

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires rollup-plugin-visualizer.

What problem does it solve? Frontend projects built with Vite, React 19, and Ant Design often ship oversized bundles, slow first-screen loads, and unnecessary re-renders because of missing code splitting, full-library imports, and unoptimized rendering patterns. This Skill provides a systematic methodology to measure, diagnose, and fix these performance problems with verifiable before-and-after data. ## Core Features & Use Cases - Build Optimization: Configures Vite manualChunks vendor splitting, CSS code splitting, minification, and rollup-plugin-visualizer bundle analysis to cut first-screen JS by 30-50%. - Runtime Rendering Fixes: Identifies unnecessary re-renders and applies React.memo, useMemo-derived state, and Context splitting for React 19 concurrent rendering. - Resource Loading & Dependency Slimming: Implements route-level lazy loading with React.lazy and Suspense, on-demand ECharts registration, and path-based lodash imports to shrink heavy dependencies like echarts (61M) and handsontable (31M). - Use Case: Your Vite + antd + echarts dashboard takes 8 seconds to load. Run this Skill to generate a baseline bundle report, split vendor chunks, lazy-load non-homepage routes, and deliver a graded optimization report with FCP/LCP comparisons. ## Quick Start Analyze my Vite React project's build output and produce a prioritized frontend performance optimization plan with before-and-after bundle size data.

Frequently Asked Questions about frontend-perf

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Vite bundle size with code splitting?▼

Configure rollupOptions.output.manualChunks in vite.config.ts to split large dependencies into separate vendor chunks, such as vendor-react, vendor-antd, and vendor-echarts. Enable cssCodeSplit and esbuild minification, then verify results with rollup-plugin-visualizer.

How to lazy load routes in React Router with React.lazy?▼

Wrap non-homepage route components with React.lazy and Suspense, providing a fallback spinner. This defers loading of modules like detail pages and modals until navigation, reducing first-screen JS by 40% or more.

Does echarts support on-demand imports to reduce bundle size?▼

Yes, echarts supports on-demand registration via echarts/core. Import only the charts, components, and renderers you use with echarts.use(), which can reduce echarts bundle contribution by over 80% compared to full imports.

Why does my React component re-render unnecessarily?▼

Common causes include missing React.memo on expensive children, deriving state with useEffect instead of useMemo, and large Context providers whose value changes trigger all consumers. Split Contexts by responsibility and memoize stable list or table components.

When should I not apply frontend performance optimizations?▼

Avoid lazy-loading components where delay hurts UX, such as frequently opened modals, and do not add React.memo blindly without verifying prop-reference re-renders. This Skill also excludes backend API tuning, CDN configuration, and database optimization.