interaction-to-next-paint
它能做什么
这项技能检查页面对点击和轻触等访客操作的响应速度。适用于希望界面响应灵敏、流畅的开发者。
适用场景
- ✓当点击后按钮或菜单响应缓慢的时候。
- ✓当你的页面在 Interaction to Next Paint 上得分较低的时候。
- ✓当访客操作时,繁重的脚本阻塞了页面的时候。
技能链接
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/interaction-to-next-paint/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“为什么我点击按钮时页面感觉很慢?”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会查找延迟下一次视觉更新的长任务和缓慢的事件处理程序。它会建议拆分长任务、将繁重的计算放到 Web Worker 中,并简化处理程序。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Optimize interaction to next paint
INP replaced FID as a Core Web Vital in 2024—it measures how quickly your page responds to user interactions throughout the session, not just the first interaction.
Quick Reference
- INP measures responsiveness to ALL interactions—target under 200ms
- Break up long tasks into smaller chunks
- Use web workers for heavy computation
- Optimize event handlers and avoid blocking the main thread
Check
Measure INP using Chrome DevTools or PageSpeed Insights. Verify interaction responses occur within 200ms.
Fix
Optimize event handlers, break up long tasks, use web workers for heavy computation, and reduce main thread blocking.
Explain
Explain how INP measures overall page responsiveness by tracking the latency of all user interactions during a page visit.
Code Review
Review the routes, assets, and loading behavior that affect Optimize interaction to next paint. 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/interaction-to-next-paint
常见问题
INP 与 FID 有什么不同?
这项技能指出,INP 于 2024 年取代 FID 成为核心网页指标,衡量整个访问过程中的响应能力。
这项技能建议的目标是什么?
它建议响应时间低于 200 毫秒。
如何测量?
这项技能建议使用 Chrome DevTools 或 PageSpeed Insights。
详情
作者的原始描述
Use when auditing slow page loads, heavy assets, or rendering delays related to Optimize interaction to next paint. Verify the actual bottleneck in DevTools, Lighthouse, or field data before recommending changes.
热度
- GitHub 星标
- 75k
- 排名
- #2896
- 许可证
- MIT
- 更新时间
- 2026/10/31
评论
- …
同一仓库的更多技能
frontendchecklist
75k使用命令行工具,依据 380 多条关于无障碍、速度、SEO 和安全的规则,检查前端代码和线上页面。
frontend-checklist-global
75k依据全部 386 条 Front-End Checklist 规则审查前端项目,并为发现的每个问题给出具体修复方法。
404-page
75k检查你的页面缺失提示是否提供有用的链接,并返回真正的 404 状态,帮助迷路的访客找到方向。
about-page
75k审查你的网站是否有清晰的关于页面,说明由谁运营,以建立访客和搜索引擎的信任。