js-file-size
What it does
This skill reviews JavaScript bundle sizes and flags files that are too heavy for good performance. It is for developers whose pages feel slow on phones.
When to use it
- ✓When a JavaScript file is larger than about 200 kilobytes compressed.
- ✓When a page feels unresponsive while loading on a low-end phone.
- ✓When your bundle analysis shows a few very large dependencies.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/js-file-size/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Can you check whether my JavaScript bundles are too large?”
5 new skills a week. 1 minute to read.
How it works
The agent reviews bundle sizes and flags files over about 200 KB compressed. It suggests code splitting, tree-shaking and a review of heavy dependencies.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Optimize JavaScript bundle size
Excessive JavaScript increases parse and execution time, especially on low-end devices, leading to sluggish user experiences and high data costs.
Quick Reference
- Keep individual JS bundles under 200KB (compressed)
- Large bundles delay Time to Interactive (TTI) and First Input Delay (FID)
- Use code-splitting and tree-shaking to reduce unused code
Check
Review the JavaScript bundle sizes and identify any files exceeding 200KB (Gzip/Brotli).
Fix
Implement code-splitting, tree-shaking, and dependency audits to reduce the size of the JavaScript bundles.
Explain
Explain how large JavaScript files impact the main thread and delay user interactivity (FID/TTI).
Code Review
Review the routes, assets, and loading behavior that affect Optimize JavaScript bundle size. Flag exact files, requests, or rendering steps that add unnecessary network, CPU, or layout cost, and describe the measurement method used to confirm the issue.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/performance/js-file-size
FAQ
Why does bundle size matter?
The skill says large scripts take longer to parse and run, especially on low-end devices.
What size is considered too large?
The skill uses about 200 KB compressed as the guideline for each bundle.
What is code splitting?
It means dividing code into smaller chunks, so each page loads only what it needs.
Details
Original description by the author
Use when auditing slow page loads, heavy assets, or rendering delays related to Optimize JavaScript bundle size. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
Popularity
- GitHub stars
- 75k
- Ranking position
- #2903
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
angular-developer
280kHelps your agent create Angular code and give project structure advice. Useful for starting new projects, creating code parts, or improving performance and accessibility.
frontend-a11y
280kHelps your agent make web interfaces accessible to everyone. It ensures websites and apps work well with screen readers and keyboard navigation.
frontend-patterns
280kHas your agent apply modern patterns in frontend development. It optimizes performance, manages state, and follows best practices in React and Next.js.