bundle-size-optimization

aj-geddes/useful-ai-prompts · updated Apr 8, 2026

$npx skills add https://github.com/aj-geddes/useful-ai-prompts --skill bundle-size-optimization
0 commentsdiscussion
summary

Smaller bundles download faster, parse faster, and execute faster, dramatically improving perceived performance especially on slower networks.

skill.md

Bundle Size Optimization

Table of Contents

Overview

Smaller bundles download faster, parse faster, and execute faster, dramatically improving perceived performance especially on slower networks.

When to Use

  • Build process optimization
  • Bundle analysis before deployment
  • Performance baseline improvement
  • Mobile performance focus
  • After adding new dependencies

Quick Start

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)

Reference Guides

Detailed implementations in the references/ directory:

Guide Contents
Bundle Analysis Bundle Analysis
Optimization Techniques Optimization Techniques
Implementation Strategy Implementation Strategy
Best Practices Best Practices

Best Practices

✅ DO

  • Follow established patterns and conventions
  • Write clean, maintainable code
  • Add appropriate documentation
  • Test thoroughly before deploying

❌ DON'T

  • Skip testing or validation
  • Ignore error handling
  • Hard-code configuration values

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.
general reviews

Ratings

4.443 reviews
  • Chaitanya Patil· Dec 16, 2024

    Registry listing for bundle-size-optimization matched our evaluation — installs cleanly and behaves as described in the markdown.

  • Liam Rahman· Dec 16, 2024

    I recommend bundle-size-optimization for anyone iterating fast on agent tooling; clear intent and a small, reviewable surface area.

  • Pratham Ware· Dec 12, 2024

    bundle-size-optimization is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Noor Zhang· Dec 12, 2024

    bundle-size-optimization fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

  • Naina Sanchez· Dec 4, 2024

    Solid pick for teams standardizing on skills: bundle-size-optimization is focused, and the summary matches what you get after install.

  • Dev Yang· Dec 4, 2024

    Useful defaults in bundle-size-optimization — fewer surprises than typical one-off scripts, and it plays nicely with `npx skills` flows.

  • Ama Choi· Nov 23, 2024

    bundle-size-optimization has been reliable in day-to-day use. Documentation quality is above average for community skills.

  • Kabir Patel· Nov 11, 2024

    bundle-size-optimization is among the better-maintained entries we tried; worth keeping pinned for repeat workflows.

  • Piyush G· Nov 7, 2024

    bundle-size-optimization reduced setup friction for our internal harness; good balance of opinion and flexibility.

  • Layla Anderson· Nov 7, 2024

    bundle-size-optimization fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.

showing 1-10 of 43

1 / 5