闲社服务运行正常AI智能体自动化平台
w

Web交互性能分析

技能标识:webperf-interaction

Intelligent interaction performance analysis with automated workflows for INP debugging, scroll jank investigation, and main thread blocking. Includes decision trees that automatically run script attribution when long frames detected, break down input latency phases, and correlate layout shifts with interactions. Features workflows for complete interaction audit, third-party script impact analysis, and animation performance debugging. Cross-skill integration with Core Web Vitals (INP/CLS correla

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 0.1.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

Web交互性能分析

WebPerf: 交互与动画

用于在Chrome DevTools中测量Web性能的JavaScript代码片段。通过mcpchrome-devtoolsevaluatescript执行,使用mcpchrome-devtoolsgetconsole_message捕获输出。

脚本

  • - scripts/Input-Latency-Breakdown.js — 输入延迟分解
  • scripts/Interactions.js — 交互
  • scripts/Layout-Shift-Loading-and-Interaction.js — 布局偏移追踪
  • scripts/Long-Animation-Frames-Helpers.js — LoAF辅助工具
  • scripts/Long-Animation-Frames-Script-Attribution.js — 长动画帧脚本归因
  • scripts/Long-Animation-Frames.js — 长动画帧(LoAF)
  • scripts/LongTask.js — 长任务
  • scripts/Scroll-Performance.js — 滚动性能分析

描述和阈值:references/snippets.md

常见工作流程

完整交互性能审计

当用户请求交互分析或审计响应能力时:

  1. 1. Interactions.js - 列出所有用户交互及其时间
  2. Input-Latency-Breakdown.js - 分解交互阶段
  3. Long-Animation-Frames.js - 检测阻塞动画帧
  4. LongTask.js - 识别阻塞主线程的长任务
  5. Scroll-Performance.js - 测量滚动流畅度

INP深度分析

当INP较慢(>200ms)或用户要求调试INP或交互缓慢时:

  1. 1. Interactions.js - 识别哪些交互较慢
  2. Input-Latency-Breakdown.js - 分解为输入延迟、处理时间、呈现延迟
  3. Long-Animation-Frames.js - 查找阻塞交互的>50ms动画帧
  4. Long-Animation-Frames-Script-Attribution.js - 识别导致阻塞的脚本
  5. Long-Animation-Frames-Helpers.js - 获取详细时间和归因辅助

滚动卡顿调查

当用户报告滚动卡顿、滚动不流畅或滚动性能问题时:

  1. 1. Scroll-Performance.js - 测量滚动流畅度和丢帧情况
  2. Long-Animation-Frames.js - 检测导致卡顿的帧(>50ms)
  3. Layout-Shift-Loading-and-Interaction.js - 检查滚动期间的布局偏移
  4. Long-Animation-Frames-Script-Attribution.js - 查找滚动期间运行的脚本

主线程阻塞分析

当页面感觉无响应或用户询问页面为何冻结时:

  1. 1. LongTask.js - 列出所有阻塞主线程的>50ms任务
  2. Long-Animation-Frames.js - 与动画帧时间关联
  3. Long-Animation-Frames-Script-Attribution.js - 将阻塞归因于特定脚本
  4. 与webperf-loading技能交叉引用:
- JS-Execution-Time-Breakdown.js (脚本解析/执行时间) - First-And-Third-Party-Script-Info.js (识别第三方阻塞器)

交互期间的布局偏移

当用户报告点击时内容移动或交互期间出现CLS问题时:

  1. 1. Layout-Shift-Loading-and-Interaction.js - 区分加载与交互偏移
  2. Interactions.js - 将偏移与特定交互关联
  3. CLS.js (来自Core Web Vitals技能) - 测量总CLS
  4. 与webperf-media技能交叉引用:
- Image-Element-Audit.js (缺少尺寸导致偏移的图片)

动画性能分析

当动画感觉卡顿或用户要求调试动画性能时:

  1. 1. Long-Animation-Frames.js - 识别渲染时间过长的帧
  2. Long-Animation-Frames-Helpers.js - 详细帧时间分析
  3. Long-Animation-Frames-Script-Attribution.js - 查找延迟帧的脚本
  4. Scroll-Performance.js - 如果涉及滚动动画

第三方脚本对交互的影响

当交互缓慢且怀疑第三方脚本时:

  1. 1. Long-Animation-Frames-Script-Attribution.js - 识别长帧中的第三方脚本
  2. LongTask.js - 测量长任务频率
  3. 与webperf-loading技能交叉引用:
- First-And-Third-Party-Script-Info.js (列出所有第三方脚本) - First-And-Third-Party-Script-Timings.js (测量脚本加载影响) - Script-Loading.js (检查阻塞脚本)

决策树

使用此决策树根据结果自动运行后续代码片段:

执行Interactions.js后

  • - 如果有任何交互 > 200ms → 对慢交互运行Input-Latency-Breakdown.js
  • 如果多个交互 > 200ms → 主线程拥塞,运行:
1. Long-Animation-Frames.js (阻塞帧) 2. LongTask.js (长任务) 3. Long-Animation-Frames-Script-Attribution.js (问题脚本)
  • - 如果特定交互类型较慢(如点击 vs 键盘) → 专注于该交互类型
  • 如果交互发生在页面加载期间 → 与webperf-loading:JS-Execution-Time-Breakdown.js交叉检查

执行Input-Latency-Breakdown.js后

  • - 如果输入延迟 > 50ms → 主线程繁忙,运行:
1. Long-Animation-Frames.js (什么在阻塞) 2. LongTask.js (交互前的长任务)
  • - 如果处理时间 > 100ms → 事件处理程序过重,运行:
1. Long-Animation-Frames-Script-Attribution.js (哪些脚本) 2. webperf-loading:First-And-Third-Party-Script-Info.js (第三方参与)
  • - 如果呈现延迟 > 50ms → 渲染瓶颈,运行:
1. Long-Animation-Frames.js (帧渲染时间) 2. Layout-Shift-Loading-and-Interaction.js (检查布局工作)

执行Long-Animation-Frames.js后

  • - 如果多个帧 > 50ms → 运行Long-Animation-Frames-Script-Attribution.js识别原因
  • 如果帧 > 100ms → 严重阻塞,运行:
1. Long-Animation-Frames-Script-Attribution.js (详细归因) 2. LongTask.js (相关长任务) 3. webperf-loading:JS-Execution-Time-Breakdown.js (脚本执行成本)
  • - 如果帧发生在滚动期间 → 运行Scroll-Performance.js测量影响
  • 如果帧发生在页面加载期间 → 与webperf-loading:Event-Processing-Time.js交叉检查

执行Long-Animation-Frames-Script-Attribution.js后

  • - 如果第三方脚本导致长帧 → 运行:
1. webperf-loading:First-And-Third-Party-Script-Info.js (列出所有第三方脚本) 2. webperf-loading:Script-Loading.js (检查加载策略) 3. 建议延迟或移除有问题的脚本
  • - 如果第一方脚本导致长帧 → 建议:
- 代码分割 - 防抖/节流事件处理程序 - 使用Web Workers处理繁重计算
  • - 如果检测到强制回流/布局 → 分析DOM操作模式

执行LongTask.js后

  • - 如果多个长任务(>5) → 主线程拥塞,运行:
1. Long-Animation-Frames-Script-Attribution.js (详细归因) 2. webperf-loading:JS-Execution-Time-Breakdown.js (脚本执行分析) 3. webperf-loading:First-And-Third-Party-Script-Info.js (识别重脚本)
  • - 如果长任务 > 500ms → 严重阻塞,调查:
- 同步第三方脚本 - 未使用Web Workers的繁重计算 - 过度DOM操作
  • - 如果长任务与交互相关 → 运行Interactions.js查看影响

执行Scroll-Performance.js后

  • - 如果滚动FPS < 30 → 严重卡顿,运行:
1. Long-Animation-Frames.js (滚动期间阻塞帧) 2. Long-Animation-Frames-Script-Attribution.js (滚动时运行的脚本) 3. Layout-Shift-Loading-and-Interaction.js (滚动期间的布局工作)
  • - 如果滚动FPS 30-50 → 明显卡顿,调查:
- 滚动事件处理程序 -

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 webperf-interaction-1776129135 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 webperf-interaction-1776129135 技能

通过命令行安装

skillhub install webperf-interaction-1776129135

下载

⬇ 下载 webperf-interaction v0.1.0(免费)

文件大小: 24.07 KB | 发布时间: 2026-4-15 14:56

v0.1.0 最新 2026-4-15 14:56
Initial release of webperf-interaction: an intelligent interaction performance analysis tool with automated workflows.

- Automates INP debugging, scroll jank investigation, and main thread blocking analysis.
- Provides complete interaction audit workflows, with script attribution on long frames and detailed input latency breakdowns.
- Correlates layout shifts with user interactions and integrates results with Core Web Vitals (INP/CLS) and Loading metrics.
- Includes cross-skill integration to analyze first/third-party script impact and script execution details.
- Ready-to-use JavaScript snippets for Chrome DevTools MCP, supporting step-by-step decision trees and performance investigations.
返回顶部