跳到正文
Skillpedia
网站与界面(前端)75k · #2967

page-weight

它能做什么

这个技能测量页面的总体积,包括它所有的文件,并提出让页面更轻的方法。它面向希望在较慢的手机网络上获得更快页面的网站构建者。

适用场景

  • ✓你请智能体检查页面总体积有多大的时候。
  • ✓页面下载了大量数据,而手机网络用户反映加载缓慢的时候。
  • ✓你希望设定性能预算,防止页面体积随时间增长的时候。

技能链接

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/page-weight/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/page-weight/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“我的页面下载起来非常大。请帮我检查总体积,并告诉我该精简哪些内容吗?”

每周 5 个新技能,1 分钟读完。

工作原理

智能体会累加页面上所有资源的大小,并与目标进行对比。然后它会指出占比最大的部分,通常是图片和 JavaScript 包,并建议优化步骤。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

Keep page weight under 1500KB

Page weight directly correlates with load time—a 1.5MB page takes 3-5 seconds on 4G mobile. Every 100KB reduction improves user experience, especially on slower networks.

Quick Reference

  • Target under 500KB for optimal performance, max 1500KB
  • Images typically account for 50-70% of page weight
  • JavaScript bundles are often the second largest contributor
  • Monitor with performance budgets in CI/CD

Check

Analyze the total page weight including all resources. Check if it's under 1500KB (ideally under 500KB).

Fix

Optimize this page to reduce its total weight through image optimization, code minification, and removing unnecessary resources.

Explain

Explain how page weight impacts loading time, especially on mobile networks, and affects user experience.

Code Review

Review the routes, assets, and loading behavior that affect Keep page weight under 1500KB. 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/page-weight

常见问题

页面体积的理想目标是多少?

这个技能建议在 500 KB 以下可获得最佳性能,1500 KB 为最大上限。

页面中什么占的空间最多?

这个技能说,图片通常占页面体积的 50% 到 70%,其次通常是 JavaScript 包。

如何防止页面再次变得臃肿?

可以。这个技能建议在构建或部署检查中使用性能预算进行监控。

详情

作者的原始描述

Use when auditing slow page loads, heavy assets, or rendering delays related to Keep page weight under 1500KB. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.

repo: thedaviddias/Front-End-Checklist

热度

GitHub 星标
75k
排名
#2967
许可证
MIT
更新时间
2026/10/31

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能