skills/coding/frontend-staged-bundle-review/SKILL.md
Reviews staged git changes from a bundle size perspective. Analyzes change intent and provides optimization recommendations for React/Vue/Taro/Next.js projects. Should be used when the user is concerned about bundle size, code bloat, or package weight — before committing or evaluating new dependencies. Distinguished from frontend-code-review which focuses on code quality, this skill focuses specifically on bundle size impact analysis.
npx skillsauth add ImaginerLabs/skill-manager frontend-staged-bundle-reviewInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Before committing, read staged changes, analyze the change intent in project context, and review from a bundle size perspective — outputting high/medium/low priority optimization recommendations.
| Skill | How | Use case | | ------------------------ | --------------------------------------------------------------------- | ------------------------------ | | staged-code-review | Code quality review first, then bundle review | Comprehensive pre-commit check | | frontend-code-review | Use alongside, covering both quality and size | Combined code review | | tech-stack-detection | Identify tech stack first, then targeted size analysis | New project bundle review | | context-learning | Understand context when size issues involve complex dependency chains | Complex refactoring |
Recommended workflow:
git add . → staged-code-review → frontend-staged-bundle-review → commit
git diff --staged
Understand the business context of this change:
import statements to identify introduced dependenciespackage.json, shared utilities) for duplicate importsEvaluate impact across these dimensions:
React.lazy / dynamic import())?dynamic import for first-screen optimization?@tarojs/components?next/dynamic for component lazy loading?ssr: false for components that don't need SSR?next/image for image optimization?| Level | Criteria | Typical scenario | | ------------- | ------------------------------------------------------------------------- | ------------------------------------------------------------------- | | 🔴 High | Significant size impact (est. > 10KB gzip), or avoidable large dependency | Full lodash/moment.js import; inline large images | | 🟡 Medium | Moderate impact (est. 2–10KB gzip), or clear optimization path | UI library not imported on-demand; new page not lazy-loaded | | 🟢 Low | Small impact (est. < 2KB gzip), best practice improvement | Small function replaceable by native; extractable duplicate utility |
## 📦 Staged Code Bundle Size Review Report
### Change Overview
| Dimension | Info |
| ------------- | -------------------------------------------------------- |
| File count | X |
| Tech stack | [detected] |
| Change type | New feature / Bug fix / Refactoring / Dependency upgrade |
| Change intent | [Inferred from diff] |
---
### 🔴 High Priority (significant size impact, fix before commit)
| # | File | Issue | Suggestion | Est. savings | Scope |
| --- | ------------- | ------- | ------------ | ------------ | ----------------------- |
| 1 | `src/xxx.tsx` | [issue] | [suggestion] | ~XX KB | First-screen/subpackage |
**Details:**
- [Detailed analysis and optimization plan]
---
### 🟡 Medium Priority (clear optimization path, fix this or next iteration)
| # | File | Issue | Suggestion | Est. savings | Scope |
| --- | ------------- | ------- | ------------ | ------------ | ---------------- |
| 1 | `src/xxx.tsx` | [issue] | [suggestion] | ~XX KB | Non-first-screen |
**Details:**
- [Detailed analysis and optimization plan]
---
### 🟢 Low Priority (best practice, fix as needed)
| # | File | Issue | Suggestion | Est. savings |
| --- | ------------- | ------- | ------------ | ------------ |
| 1 | `src/xxx.tsx` | [issue] | [suggestion] | ~XX KB |
---
### 📊 Size Impact Estimate
| Category | Current | After optimization | Savings |
| --------------- | --------- | ------------------ | --------- |
| High priority | XX KB | XX KB | XX KB |
| Medium priority | XX KB | XX KB | XX KB |
| Low priority | XX KB | XX KB | XX KB |
| **Total** | **XX KB** | **XX KB** | **XX KB** |
---
### 📝 Summary
- High priority: X items (fix before commit)
- Medium priority: X items (fix in next iteration)
- Low priority: X items (best practice improvements)
- **Overall assessment**: 🟢 Size-friendly / 🟡 Room for optimization / 🔴 Fix before committing
---
### 🔄 Next Steps
- [ ] Fix high priority issues immediately
- [ ] Address medium priority in next iteration
- [ ] Monitor bundle size changes ongoing
- [ ] Consider configuring bundle size monitoring (e.g., bundlesize, webpack-bundle-analyzer)
development
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.
devops
Create a new implementation plan file for new features, refactoring existing code or upgrading packages, design, architecture or infrastructure.
tools
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node/TypeScript (MCP SDK).
documentation
Generates standardized porting documentation from completed feature changes. Analyzes commit diffs or file contents, extracts change intent, and outputs Markdown documentation for cross-team understanding. Should be used when the user needs to document a change for cross-team or cross-project consumption. Distinguished from cross-branch-fix-porter which actively re-implements fixes, this skill documents changes.