AI 驱动的包体积智能优化专家
简介
LXGIC 出品的零配置 CLI 工具,基于 GPT-4o-mini 智能分析前端包体积,精准识别膨胀依赖并提供优化方案,提升应用加载性能。
原始描述
Analyze bundle size and get AI suggestions to reduce it. Use when your builds are getting bloated.
通过你的 Agent 添加
安装目录:bundle-checker/(目录名取自 SKILL.md 的 frontmatter name,不是 URL 里的 slug)。
点「快速安装」复制一段指令贴给你的 Agent:它会先下载到 /tmp、把文件清单和校验值给你看,你确认之后才解压安装。不会一步装完、也不改系统其它位置。
或者手动安装
包是「根级 SKILL.md + 作者附带的文件」,解压到上面的 <slug>/ 目录即可;
目录名不用换,也不要把包直接解压到 skills 根目录。
技能申请的权限由作者决定:装之前先看清单里有没有脚本、它会读写什么。
技能正文
name: bundle-checker
description: Analyze bundle size and get AI suggestions to reduce it. Use when your builds are getting bloated.
Bundle Checker
Your bundle is 2MB and you don't know why. This tool analyzes your build output and tells you exactly what's eating up space and how to fix it.
One command. Zero config. Just works.
Quick Start
npx ai-bundle-check
What It Does
- Analyzes your bundle composition
- Identifies the largest dependencies
- Suggests tree-shaking opportunities
- Recommends lighter alternatives
Usage Examples
# Analyze current project
npx ai-bundle-check
# Analyze specific directory
npx ai-bundle-check ./my-project/
# Get detailed breakdown
npx ai-bundle-check --verbose
Best Practices
- Check before shipping - catch size regressions early
- Consider alternatives - moment.js vs date-fns makes a huge difference
- Dynamic imports - split code that isn't needed immediately
- Monitor trends - track bundle size in CI
When to Use This
- Your app loads slowly and you suspect the bundle
- Adding a new dependency and want to check the impact
- Performance audit flagged JavaScript size
- CI bundle size check is failing
Part of the LXGIC Dev Toolkit
npx ai-bundle-check
- Analyzes your bundle composition
- Identifies the largest dependencies
- Suggests tree-shaking opportunities
- Recommends lighter alternatives
Usage Examples
# Analyze current project
npx ai-bundle-check
# Analyze specific directory
npx ai-bundle-check ./my-project/
# Get detailed breakdown
npx ai-bundle-check --verbose
Best Practices
- Check before shipping - catch size regressions early
- Consider alternatives - moment.js vs date-fns makes a huge difference
- Dynamic imports - split code that isn't needed immediately
- Monitor trends - track bundle size in CI
When to Use This
- Your app loads slowly and you suspect the bundle
- Adding a new dependency and want to check the impact
- Performance audit flagged JavaScript size
- CI bundle size check is failing
Part of the LXGIC Dev Toolkit
# Analyze current project
npx ai-bundle-check
# Analyze specific directory
npx ai-bundle-check ./my-project/
# Get detailed breakdown
npx ai-bundle-check --verbose
- Check before shipping - catch size regressions early
- Consider alternatives - moment.js vs date-fns makes a huge difference
- Dynamic imports - split code that isn't needed immediately
- Monitor trends - track bundle size in CI
When to Use This
- Your app loads slowly and you suspect the bundle
- Adding a new dependency and want to check the impact
- Performance audit flagged JavaScript size
- CI bundle size check is failing
Part of the LXGIC Dev Toolkit
This is one of 110+ free developer tools built by LXGIC Studios. No paywalls, no sign-ups, no API keys on free tiers. Just tools that work.
Find more:
- GitHub: https://github.com/LXGIC-Studios
- Twitter: https://x.com/lxgicstudios
- Substack: https://lxgicstudios.substack.com
- Website: https://lxgic.dev
Requirements
No install needed. Just run with npx. Node.js 18+ recommended. Needs OPENAI_API_KEY environment variable.
npx ai-bundle-check --help
How It Works
Scans your package.json and build output, identifies heavy dependencies, and sends the analysis to GPT-4o-mini. The AI knows common bundle bloat patterns and suggests specific optimizations like switching libraries or adding tree-shaking config.
License
MIT. Free forever. Use it however you want.
正文来自原始发布页, 版权归作者所有,许可未标注。 权利人认为有不妥,可申请下架。