本文へスキップ
Skillpedia
WebサイトとUI(フロントエンド)75k · #2903

js-file-size

できること

このスキルは、JavaScriptバンドルのサイズを確認し、良い性能には重すぎるファイルを指摘します。スマートフォンでページが遅く感じる開発者向けです。

使う場面

  • ✓JavaScriptファイルが圧縮後に約200キロバイトより大きいとき。
  • ✓低スペックのスマートフォンで読み込み中にページの反応が鈍いとき。
  • ✓バンドル分析で、非常に大きな依存関係がいくつか見つかったとき。

スキルのリンク

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/js-file-size/SKILL.md

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/js-file-size/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“私のJavaScriptバンドルが大きすぎないか確認してください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントはバンドルのサイズを確認し、圧縮後に約200KBを超えるファイルを指摘します。コードの分割、tree-shaking、重い依存関係の見直しを提案します。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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

よくある質問

バンドルのサイズがなぜ重要なのですか?

このスキルによると、大きなスクリプトは解析と実行に時間がかかり、特に低スペックの端末で顕著です。

どのくらいの大きさが大きすぎるとされますか?

このスキルは、バンドルごとに圧縮後の約200KBを目安にしています。

コード分割とは何ですか?

コードを小さなかたまりに分け、各ページが必要な分だけを読み込むようにすることです。

詳細

作者による元の説明

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.

repo: thedaviddias/Front-End-Checklist

人気

GitHubのスター
75k
ランキング
#2903
ライセンス
MIT
更新日
2026/10/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル