critical-request-chains
它能做什么
这项技能检查是否存在一长串文件,每个文件都必须等待另一个文件加载后才能加载。适合希望页面更快呈现的开发者。
适用场景
- ✓当 Lighthouse 或 WebPageTest 显示页面加载时存在较长的请求链时。
- ✓当一个样式表加载了另一个文件,从而延迟首次绘制时。
- ✓当一个重要资源只隐藏在其他文件的深处时。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/critical-request-chains/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的首页在显示任何内容之前,要依次等待好几个文件。请找出这条链并将其缩短。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会梳理依赖链,在有帮助的地方内联关键资源,并为位于链条深处的关键资源添加预加载提示。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Minimize critical request chains
Long chains of dependent requests delay the initial rendering of the page, as each resource must wait for its parent to be fetched and processed.
Quick Reference
- Reduce the depth of dependent resource requests
- Inline critical CSS to avoid extra network roundtrips
- Use
preloadhints for essential assets found deep in the chain
Check
Identify long chains of dependent requests that block the critical rendering path using Lighthouse or WebPageTest.
Fix
Flatten the request chain by inlining critical resources or using preload hints for essential assets.
Explain
Explain how critical request chains impact the Time to First Paint and how to optimize the rendering path.
Code Review
Review the routes, assets, and loading behavior that affect Minimize critical request chains. 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/critical-request-chains
常见问题
请求链如何拖慢页面?
这项技能说明,每个资源都必须等待其父资源被获取并处理之后,下一个才会开始。
preload 有什么用?
它告诉浏览器提前获取某个关键文件。
如何找到这条链?
这项技能建议使用 Lighthouse 或 WebPageTest。
详情
作者的原始描述
Use when auditing slow page loads, heavy assets, or rendering delays related to Minimize critical request chains. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
热度
- GitHub 星标
- 75k
- 排名
- #2790
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。