- name
SKILL.md
O arquivo da skill permanece no repositório do publicador.
Cole o comando copiado em um terminal. Ele instala este SKILL.md nesse agente.
npx skills add nucliweb/webperf-snippets --skill webperf-resources -a cursor -yCole o comando copiado em um terminal. Ele instala este SKILL.md nesse agente.
npx skills add nucliweb/webperf-snippets --skill webperf-resources -a claude-code -yCole o comando copiado em um terminal. Ele instala este SKILL.md nesse agente.
npx skills add nucliweb/webperf-snippets --skill webperf-resources -a codex -yCole o comando copiado em um terminal. Ele instala este SKILL.md nesse agente.
npx skills add nucliweb/webperf-snippets --skill webperf-resources -a grok -yEnvie a mensagem copiada em um chat do Grok Bot. O Bot busca este SKILL.md no GitHub e o adiciona às skills que todos os seus Bots compartilham.
Install this skill: https://github.com/nucliweb/webperf-snippets/tree/HEAD/dist/antigravity/webperf-resourcesDo publicador
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/Network-Bandwidth-Connection-Quality.js — Network bandwidth & connection qualityWhen the user asks about network performance, connection quality, or adaptive loading:
When implementing adaptive loading or the user asks "how to optimize for slow connections":
When the user asks about save-data or data-saving features:
When the user asks "optimize for mobile" or "slow connection users":
Use this decision tree to automatically run follow-up snippets based on results:
If effectiveType is "slow-2g" or "2g" → Very slow connection, recommend:
If effectiveType is "3g" → Moderate connection, recommend:
If effectiveType is "4g" or better → Good connection, recommend:
If save-data is enabled → User explicitly wants to save data, recommend:
If RTT > 300ms → High latency, recommend:
If downlink < 1 Mbps → Very limited bandwidth, recommend:
Based on Network Information API results, implement these strategies:
For slow-2g / 2g (< 50 Kbps): (effectiveType: "slow-2g" or "2g")
For 3g (50-700 Kbps): (effectiveType: "3g")
For 4g+ (> 700 Kbps): (effectiveType: "4g")
For save-data mode: (navigator.connection.saveData === true)
Adjust performance budgets based on connection quality:
slow-2g / 2g:
3g:
4g+:
Be aware of API limitations and fallbacks:
API not available:
API values are estimates:
Privacy considerations:
references/snippets.md — Descriptions and thresholds for each scriptreferences/schema.md — Return value schema for interpreting script outputIntelligent network quality analysis with adaptive loading strategies. Detects connection type (2g/3g/4g), bandwidth, RTT, and save-data mode, then automatically triggers appropriate optimization work
---name: webperf-resourcesdescription: Intelligent network quality analysis with adaptive loading strategies. Detects connection type (2g/3g/4g)…---# dist/antigravity/webperf-resources/SKILL.mdVisão geral
Intelligent network quality analysis with adaptive loading strategies. Detects connection type (2g/3g/4g), bandwidth, RTT, and save-data mode, then automatically triggers appropriate optimization workflows. Includes decision trees that recommend image compression for slow connections, critical CSS inlining for high RTT, and save-data optimizations (disable autoplay, reduce quality). Features connection-aware performance budgets (500KB for 2g, 1.5MB for 3g, 3MB for 4g+) and adaptive loading implementation guides. Cross-skill integration with Loading (TTFB impact), Media (responsive images), and Core Web Vitals (connection impact on LCP/INP). Use when the user asks about slow connections, mobile optimization, save-data support, or adaptive loading strategies. Compatible with Chrome DevTools MCP.
Perguntas frequentes
Baixe dist/antigravity/webperf-resources/SKILL.md do publicador ou copie o caminho e abra o repositório. O PlugMCP lista a skill e não hospeda o arquivo.
O publicador o mantém em https://github.com/nucliweb/webperf-snippets.
Claude, Cursor, Codex e Grok Build conseguem ler um SKILL.md que você adiciona a partir do repositório do publicador. O Grok Bot o instala quando você envia em um chat o link da pasta da skill no GitHub.
If downlink > 10 Mbps → Good bandwidth, consider: