skills/bundle-size-optimization/SKILL.md
Reduce JavaScript and CSS bundle sizes through code splitting, tree shaking, and optimization techniques. Improve load times and overall application performance.
npx skillsauth add cenjie/skills bundle-size-optimizationInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Smaller bundles download faster, parse faster, and execute faster, dramatically improving perceived performance especially on slower networks.
Minimal working example:
// Analyze bundle composition
class BundleAnalysis {
analyzeBundle() {
return {
tools: [
"webpack-bundle-analyzer",
"Source Map Explorer",
"Bundle Buddy",
"Bundlephobia",
],
metrics: {
total_size: "850KB gzipped",
main_js: "450KB",
main_css: "120KB",
vendor: "250KB",
largest_lib: "moment.js (67KB)",
},
breakdown: {
react: "85KB (10%)",
lodash: "45KB (5%)",
moment: "67KB (8%)",
other: "653KB (77%)",
},
};
// ... (see reference guides for full implementation)
Detailed implementations in the references/ directory:
| Guide | Contents | |---|---| | Bundle Analysis | Bundle Analysis | | Optimization Techniques | Optimization Techniques | | Implementation Strategy | Implementation Strategy | | Best Practices | Best Practices |
development
Provides React Native performance optimization guidelines for FPS, TTI, bundle size, memory leaks, re-renders, and animations. Applies to tasks involving Hermes optimization, JS thread blocking, bridge overhead, FlashList, native modules, or debugging jank and frame drops.
development
Design engineering principles for making interfaces feel polished. Use when building UI components, reviewing frontend code, implementing animations, hover states, shadows, borders, typography, micro-interactions, enter/exit animations, or any visual detail work. Triggers on UI polish, design details, "make it feel better", "feels off", stagger animations, border radius, optical alignment, font smoothing, tabular numbers, image outlines, box shadows.
development
General-purpose Static Application Security Testing (SAST) skill for code vulnerability analysis. Trigger when the user asks to: "analyze code for vulnerabilities", "review code security", "find security bugs", "do a SAST scan", "check for [vulnerability type] in code", "audit source code", or requests a security code review of any language or framework. Covers 34 vulnerability classes across web, API, auth, mobile, and logic layers.
tools
Helps understand and write EAS workflow YAML files for Expo projects. Use this skill when the user asks about CI/CD or workflows in an Expo or EAS context, mentions .eas/workflows/, or wants help with EAS build pipelines or deployment automation.