bundle-checker
Analyze bundle size and get AI suggestions to reduce it. Use when your builds are getting bloated.
Why use this skill?
Analyze your project's bundle size and get AI-powered suggestions to reduce bloat, identify heavy dependencies, and improve performance with ease.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/lxgicstudios/bundle-analyzerWhat This Skill Does
The bundle-checker skill is an intelligent analysis agent designed to optimize your JavaScript project's build output. By scanning your package.json and actual build files, it identifies exactly which dependencies are contributing to "bundle bloat." Leveraging the reasoning capabilities of GPT-4o-mini, the tool does not just list file sizes; it provides actionable, intelligent advice. It suggests specific optimizations such as implementing dynamic imports, replacing heavy libraries with lighter alternatives (e.g., suggesting date-fns over moment.js), and highlighting potential tree-shaking improvements. It effectively turns raw bundle data into a roadmap for performance.
Installation
You can integrate this skill into your environment using the ClawHub CLI. Execute the following command in your terminal:
clawhub install openclaw/skills/skills/lxgicstudios/bundle-analyzer
Ensure that you have Node.js version 18 or higher installed on your machine. Because this tool utilizes AI-driven insights to analyze your code, you must have a valid OPENAI_API_KEY environment variable configured in your shell or .env file before executing the analyzer.
Use Cases
This skill is indispensable in several development scenarios:
- Performance Audits: When your Lighthouse score is penalized due to excessive JavaScript execution time.
- Dependency Vetting: Before finalizing a new library addition, use this to see exactly how much "weight" it adds to your production build.
- CI/CD Integration: Automatically trigger the checker during build pipelines to prevent accidental size regressions from reaching production.
- Legacy Refactoring: Use the tool to identify outdated, heavy dependencies in an aging codebase that can be swapped for modern, modular alternatives.
Example Prompts
- "Analyze my current project bundle and tell me which three dependencies I should replace to reduce the total size by at least 200KB."
- "I've added a new charting library, but my bundle doubled. Run the bundle-checker and give me a report on what went wrong and how to fix it."
- "Scan the ./dist folder and provide a breakdown of the largest chunks. Are there any unnecessary modules being included in my main entry point?"
Tips & Limitations
For best results, always run the analyzer against a production build rather than a development build, as development assets include source maps and HMR code that inflate the size. While the tool is highly effective at identifying heavy dependencies, it does not automatically modify your code; you must apply the suggested changes manually or through specific build configuration updates. Ensure your project is clean and dependencies are updated to avoid false positives. Note that since this requires external API calls to analyze your file structure, stable internet connectivity is required to receive the AI insights.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-lxgicstudios-bundle-analyzer": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: file-read, external-api
Related Skills
script-gen
Generate package.json scripts with AI. Use when setting up npm scripts.
email-template-gen
Generate responsive email templates. Use when building transactional emails.
branch-namer
Generate descriptive git branch names from plain English. Use when you need a branch name that follows conventions.
cloudflare-gen
Generate Cloudflare Workers configuration and code. Use when building on the edge.
adr-writer
Generate Architecture Decision Records with AI. Use when documenting technical decisions.