bundle-analysis Skill
Bundle 分析。在测量当前 bundle 大小、对比 stable 或选定 fixtures、检查组成,或清理保留的对比状态时使用。
安装方式:把技能目录放入 ~/.claude/skills/(Claude Code)或在 claude.ai 设置中启用;也可复制右侧安装命令一键添加。
技能指令原文(SKILL.md)
Read packages/tools/bundle/README.md, then select one workflow:
- Stable comparison:
pnpm bundle-compare. UseHEAD~1for the
latest commit. Read tmp/bundle-stats.txt and report non-zero differences.
- Selected comparison: `pnpm bundle-compare-selected --base
scratchpad/.ts`. Use only user-named or investigation-local fixtures;
keep temporary fixtures out of the stable corpus.
- Composition:
pnpm bundle-analyze scratchpad/.ts. Read raw data
first and report the largest modules, dependency groups, and surprising
inclusions. Its readable-name output is not an exact size measurement.
- Current size: Build immediately before the direct bundle report so Effect
packages resolve from current dist output.
- Cleanup: Stable comparisons retain
tmp/bundle-basefor reuse unless
cleanup is requested. Remove selected-comparison state retained with
--keep-base after its final use. Verify cleanup without disturbing unrelated
worktrees.
The task is complete when the selected artifact is inspected, requested size or
composition findings are reported, generated paths are named, and comparison
state follows the selected workflow's retention policy.