← ClaudeAtlas

orbit-bundle-analysislisted

JavaScript / CSS bundle analysis for a WordPress plugin — total weight, per-chunk breakdown, source-map-explorer visualisation, unused CSS detection (PurgeCSS), tree-shake opportunities, and asset weight regression vs the previous release. Use when the user says "bundle size", "JS weight", "CSS bloat", "source map explorer", "PurgeCSS", "unused CSS", or after Webpack/Rollup refactor.
adityaarsharma/orbit · ★ 1 · Testing & QA · score 55
Install: claude install-skill adityaarsharma/orbit
# 🪐 orbit-bundle-analysis — JS/CSS bundle profiler Your plugin ships JavaScript and CSS to every site. 1MB on the homepage = 30,000 sites × 1MB = 30GB of bandwidth per day if your plugin has any traction. Trim it. --- ## Quick start ```bash # Asset weight summary (per file, totals) bash ~/Claude/orbit/scripts/check-asset-weight.sh ~/plugins/my-plugin # Visual breakdown (JS only — needs source maps) npx source-map-explorer assets/js/main.js # Find unused CSS purgecss --css assets/css/frontend.css --content http://localhost:8881 \ --output reports/purgecss/ ``` Or via gauntlet (Step 4): ```bash bash scripts/gauntlet.sh --plugin . --mode quick ``` --- ## What it reports | Asset | Target | Bad | |---|---|---| | Total JS (all loaded on frontend) | < 100KB | > 300KB | | Total CSS (all loaded) | < 50KB | > 150KB | | Single largest JS file | < 80KB | > 200KB | | Single largest CSS file | < 40KB | > 100KB | | Unused CSS (% of shipped) | < 30% | > 60% | | `console.log` in production JS | 0 | any | | Source maps shipped to prod | No | Yes | --- ## Source-map-explorer (the visual tool) ```bash # Generate sourcemaps in your build # webpack: devtool: 'source-map' # rollup: sourcemap: true # Then run: npx source-map-explorer assets/js/main.js # → opens an interactive treemap in browser # Save the SVG report npx source-map-explorer assets/js/main.js --html reports/bundle-treemap.html ``` What it shows: - Every imported module sized by its contribution to the final bundle -