- name
SKILL.md
技能檔案保留在發布者的儲存庫中。
在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nucliweb/webperf-snippets --skill webperf-loading -a cursor -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nucliweb/webperf-snippets --skill webperf-loading -a claude-code -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nucliweb/webperf-snippets --skill webperf-loading -a codex -y在終端機中貼上複製的指令。它會將這個 SKILL.md 安裝到對應的代理中。
npx skills add nucliweb/webperf-snippets --skill webperf-loading -a grok -y在 Grok Bot 聊天中傳送複製的訊息。Bot 會從 GitHub 取得這個 SKILL.md,並加入你所有 Bot 共用的技能中。
Install this skill: https://github.com/nucliweb/webperf-snippets/tree/HEAD/.claude/skills/webperf-loading來自發布者
JavaScript snippets for measuring web performance in Chrome DevTools.
mcp__chrome-devtools__evaluate_script, passing the file instead of its code: sourcePath with the absolute path of scripts/<Name>.js in this skill, and format: "script", since a script runs by itself and is not a function. Read the object it returns. The scripts have no console output, so the returned object is the result: script, status and the metric data (value, rating, details, items, issues), as described in references/schema.md.status is "tracking", the script keeps observing the page. After the interactions, call the function named in getDataFn with another mcp__chrome-devtools__evaluate_script call, as an arrow function in function, for example () => getINP(), and read the object it returns.status is "error" or "unsupported", read error: the page may not have loaded yet, or the browser lacks the API.sourcePath and format need Chrome DevTools MCP 1.11.0 or later, and the server only reads files inside its workspace roots: the project, the temp folder and each --workspace=<folder> in its arguments. When it answers Access denied, as it does for a skill installed outside the project, such as in ~/.claude/skills/, read the file and pass its code in function, still with format: "script". A --workspace with the real folder of the skills makes the path work; the server follows symlinks, so a link to the folder is not enough.
Without Chrome DevTools MCP, run the same snippet with the webperf-snippets CLI, which loads the page in headless Chromium and prints the same result objects: npx webperf-snippets <url> --snippet <Name> --json, where <Name> is the script name without .js. It needs Playwright and Chromium (npm install --save-dev webperf-snippets playwright, then npx playwright install chromium), and tracking snippets take --interact-script <file> to drive the interactions.
scripts/Back-Forward-Cache.js — Back Forward Cachescripts/CSS-Complexity.js — CSS complexityscripts/CSS-Media-Queries-Analysis.js — CSS media queries analysisscripts/Cache-Strategy-Analysis.js — Cache Strategy Analysisscripts/Client-Side-Redirect-Detection.js — Client Side Redirect Detectionscripts/Compression-Audit.js — Compression auditscripts/Content-Visibility.js — Content visibilityscripts/Critical-CSS-Detection.js — Critical CSS detectionscripts/Event-Processing-Time.js — Event processing timescripts/FCP.js — First contentful paint (FCP)scripts/Find-Above-The-Fold-Lazy-Loaded-Images.js — Find above the fold lazy loaded imagesscripts/Find-Images-With-Lazy-and-Fetchpriority.js — Find images with loading lazy and fetchpriorityscripts/Find-non-Lazy-Loaded-Images-outside-of-the-viewport.js — Find non lazy loaded images outside of the viewportscripts/Find-render-blocking-resources.js — Find render-blocking resourcesscripts/First-And-Third-Party-Script-Info.js — First And Third Party Script Infoscripts/First-And-Third-Party-Script-Timings.js — First and third party script timingsscripts/Fonts-Preloaded-Loaded-and-used-above-the-fold.js — Fonts preloaded, loaded, and used above the foldscripts/Inline-CSS-Info-and-Size.js — Inline CSS info and sizescripts/Inline-Script-Info-and-Size.js — Inline script info and sizescripts/JS-Execution-Time-Breakdown.js — JavaScript execution time breakdownscripts/Prefetch-Resource-Validation.js — Prefetch resource validationscripts/Priority-Hints-Audit.js — Priority hints auditscripts/Resource-Hints-Validation.js — Resource Hints Validationscripts/Resource-Hints.js — Resource hintsscripts/SSR-Hydration-Data-Analysis.js — SSR framework hydration data analysisscripts/Script-Loading.js — Scripts loadingscripts/Server-Timing-Early-Hints.js — Server-Timing and Early Hints viewerscripts/Service-Worker-Analysis.js — Service worker analysisWhen the user asks for a comprehensive loading analysis or "audit loading performance":
When TTFB is slow or the user asks "why is my server slow":
Server-Timing and check 103 Early HintsWhen the user asks about fonts, FOIT, FOUT, or font performance:
font-displayWhen the user asks about compression, gzip, brotli, or large transfer sizes for text resources:
When scripts are suspected to slow down the page:
When the user wants to optimize resource loading priorities:
When CSS is bloated or blocking rendering:
When analyzing Next.js, Nuxt, Remix, or other SSR frameworks:
Use this decision tree to automatically run follow-up snippets based on results:
Server-Timing metrics found → Recommend adding Server-Timing headers for database, cache and render phasesTiming-Allow-Origin on those responsesTiming-Allow-Origin on resources you controlasync, defer, lazy loading or self-hosting; run Script-Loading.js for the loading strategy@font-face declaration or the preloadfont-display: auto or block → Recommend swap or optional, then check Find-render-blocking-resources.jsunicode-range and WOFF2moderate or conservativeactivationStart > 0) → Subtract activationStart when interpreting TTFB.js, FCP.js and LCP resultsitems for <style> or shadow root sources the page does not have, or measure again in a profile without extensions or with the CLIfont-displaycrossorigin on the <link> with Access-Control-Allow-Origin on stylesheets you controlreferences/snippets.md — Descriptions and thresholds for each scriptreferences/schema.md — Return value schema for interpreting script outputIntelligent loading performance analysis with automated workflows for TTFB investigation (DNS/connection/server breakdown), render-blocking detection, script performance deep dive (first vs third-part
---name: webperf-loadingdescription: Intelligent loading performance analysis with automated workflows for TTFB investigation…---# .claude/skills/webperf-loading/SKILL.md總覽
Intelligent loading performance analysis with automated workflows for TTFB investigation (DNS/connection/server breakdown), render-blocking detection, script performance deep dive (first vs third-party attribution), font optimization, and resource hints validation. Includes decision trees that automatically analyze TTFB sub-parts when slow, detect script loading anti-patterns (async/defer/preload conflicts), identify render-blocking resources, and validate resource hints usage. Features workflows for complete loading audit (6 phases), backend performance investigation, and priority optimization. Cross-skill integration with Core Web Vitals (LCP resource loading), Interaction (script execution blocking), and Media (lazy loading strategy). Use when the user asks about TTFB, FCP, render-blocking, slow loading, font performance, script optimization, or resource hints. Compatible with Chrome DevTools MCP.
常見問題
從發布者下載 .claude/skills/webperf-loading/SKILL.md,或複製路徑後開啟儲存庫。PlugMCP 只收錄這項技能,不代管檔案。
發布者將它存放在 https://github.com/nucliweb/webperf-snippets。
Claude、Cursor、Codex 和 Grok Build 可以讀取你從發布者儲存庫加入的 SKILL.md。在聊天中傳送技能的 GitHub 資料夾連結,Grok Bot 就會安裝它。
scripts/Speculation-Rules-Inspector.js — Speculation rules inspectorscripts/TTFB-Resources.js — Time to first byte: Measure TTFB for all resourcesscripts/TTFB-Sub-Parts.js — Time to first byte: Measure TTFB sub-partsscripts/TTFB.js — Time to first byte: Measure the time to first bytescripts/Third-Party-Impact-by-Domain.js — Third-party impact by domainscripts/Validate-Preload-Async-Defer-Scripts.js — Validate Preload Async Defer Scriptsscripts/Webfont-Usage-Analyzer.js — Webfont usage analyzer