Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed.
数据来源:ClawHub。 在 ClawSkills 查看
选择你使用的 Agent
方法一:命令行安装(推荐)
推荐(无需提前安装 clawhub)
npx clawhub@latest --dir ~/.claude/skills install web-perf或使用 clawhub CLI(需提前安装)
clawhub --dir ~/.claude/skills install web-perf⚠️ 需要 Node.js 18+,没有 Node?请使用下方方法二直接下载 ZIP。 安装 Node.js →
方法二:手动下载安装(无需 Node)
下载 ZIP,解压后将文件夹放到以下路径,重启 Agent 即可:
安装路径
~/.claude/skills/web-perf/💡解压后将文件夹放到上方路径,重启 Agent 即可生效
--- name: web-perf description: Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed. ---
Audit web page performance using Chrome DevTools MCP tools. This skill focuses on Core Web Vitals, network optimization, and high-level accessibility gaps.
Run this before starting. Try calling navigate_page or performance_start_trace. If unavailable, STOP—the chrome-devtools MCP server isn't configured.
Ask the user to add this to their MCP config:
"chrome-devtools": {
"type": "local",
"command": ["npx", "-y", "chrome-devtools-mcp@latest"]
}
| Task | Tool Call | |------|-----------| | Load page | navigate_page(url: "...") | | Start trace | performance_start_trace(autoStop: true, reload: true) | | Analyze insight | performance_analyze_insight(insightSetId: "...", insightName: "...") | | List requests | list_network_requests(resourceTypes: ["Script", "Stylesheet", ...]) | | Request details | get_network_request(reqid: | | A11y snapshot | take_snapshot(verbose: true) |
Copy this checklist to track progress:
Audit Progress:
- [ ] Phase 1: Performance trace (navigate + record)
- [ ] Phase 2: Core Web Vitals analysis (includes CLS culprits)
- [ ] Phase 3: Network analysis
- [ ] Phase 4: Accessibility snapshot
- [ ] Phase 5: Codebase analysis (skip if third-party site)
``` navigate_page(url: "
``` performance_start_trace(autoStop: true, reload: true) ```
Troubleshooting:
navigate_page firstUse performance_analyze_insight to extract key metrics.
Note: Insight names may vary across Chrome DevTools versions. If an insight name doesn't work, check the insightSetId from the trace response to discover available insights.
Common insight names:
| Metric | Insight Name | What to Look For | |--------|--------------|------------------| | LCP | LCPBreakdown | Time to largest contentful paint; breakdown of TTFB, resource load, render delay | | CLS | CLSCulprits | Elements causing layout shifts (images without dimensions, injected content, font swaps) | | Render Blocking | RenderBlocking | CSS/JS blocking first paint | | Document Latency | DocumentLatency | Server response time issues | | Network Dependencies | NetworkRequestsDepGraph | Request chains delaying critical resources |
Example:
performance_analyze_insight(insightSetId: "<id-from-trace>", insightName: "LCPBreakdown")
Key thresholds (good/needs-improvement/poor):
List all network requests to identify optimization opportunities:
list_network_requests(resourceTypes: ["Script", "Stylesheet", "Document", "Font", "Image"])
Look for:
without async/defer/media attributesCache-Control, ETag, or Last-Modified headersFor detailed request info:
get_network_request(reqid: <id>)
Take an accessibility tree snapshot:
take_snapshot(verbose: true)
Flag high-level gaps:
Skip if auditing a third-party site without codebase access.
Analyze the codebase to understand where improvements can be made.
Search for configuration files to identify the stack:
| Tool | Config Files | |------|--------------| | Webpack | webpack.config.js, webpack.*.js | | Vite | vite.config.js, vite.config.ts | | Rollup | rollup.config.js, rollup.config.mjs | | esbuild | esbuild.config.js, build scripts with esbuild | | Parcel | .parcelrc, package.json (parcel field) | | Next.js | next.config.js, next.config.mjs | | Nuxt | nuxt.config.js, nuxt.config.ts | | SvelteKit | svelte.config.js | | Astro | astro.config.mjs |
Also check package.json for framework dependencies and build scripts.
mode: 'production', sideEffects in package.json, usedExports optimizationtreeshake optionsindex.js re-exports), large utility libraries imported wholesale (lodash, moment)content config)@babel/preset-env targets and useBuiltIns settingcore-js imports (often oversized)browserslist config for overly broad targetingterser, esbuild, or swc minificationPresent findings as:
安装 Web Perf 后,可以对 AI 说这些话来触发它
Help me get started with Web Perf
Explains what Web Perf does, walks through the setup, and runs a quick demo based on your current project
Use Web Perf to analyzes web performance using Chrome DevTools MCP
Invokes Web Perf with the right parameters and returns the result directly in the conversation
What can I do with Web Perf in my developer & devops workflow?
Lists the top use cases for Web Perf, with example commands for each scenario
将技能文件夹放到 ~/.claude/skills/web-perf/ 目录(个人级,所有项目可用),或 .claude/skills/web-perf/(项目级)。重启 AI 客户端后,用 /web-perf 主动调用,或让 AI 根据上下文自动发现并使用。
Web Perf 支持 Claude、Cursor、OpenClaw,可与这些 AI 平台无缝集成,扩展其能力。
Web Perf 可免费安装使用。请查阅仓库了解许可证信息。
Analyzes web performance using Chrome DevTools MCP. Measures Core Web Vitals (FCP, LCP, TBT, CLS, Speed Index), identifies render-blocking resources, network dependency chains, layout shifts, caching issues, and accessibility gaps. Use when asked to audit, profile, debug, or optimize page load performance, Lighthouse scores, or site speed.
Web Perf 属于「Developer & DevOps」分类,该分类的技能帮助 AI 智能体在此领域执行专业任务。
Automate my developer & devops tasks using Web Perf
Identifies repetitive steps in your workflow and sets up Web Perf to handle them automatically