A fork of Joan Leon's webperf-snippets that runs Chrome DevTools audits for images, videos, and SVGs. You get three core scripts: image element audit (format, lazy loading, sizing), video element audit (poster, preload, formats), and SVG bitmap detection. The real value is in the decision trees. It detects LCP images and triggers format analysis, spots layout shift risks from missing dimensions, and flags lazy loading mistakes like above-the-fold lazy or below-the-fold eager. Integrates with the webperf-core-web-vitals and webperf-loading skills to cross-reference LCP impact and resource priority. Use this when you need to audit media systematically rather than manually checking DevTools. The workflows are opinionated but sensible.

skills.sh installs
266
GitHub stars
1.5K
last updated
Aug 21, 2026

Install

$ npx -y skills add nucliweb/webperf-snippets --skill webperf-media --agent claude-code

Installs into .claude/skills of the current project.

Files

WebPerf: Media Performance

JavaScript snippets for measuring web performance in Chrome DevTools.

Running a script

  1. Run the script with 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.
  2. When 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.
  3. When status is "error" or "unsupported", read error: the page may not have loaded yet, or the browser lacks the API.

Sponsors

Details

Repository
github.com/nucliweb/webperf-snippets
Categories
Frontend Development, Code Review & Quality, AI & Agent Building, Debugging, Productivity & Planning, Automation & Workflows
First seen
Jun 3, 2026

More from nucliweb/webperf-snippets

All 6
1yonatangross avatarvite-advancedyonatangross/orchestkitAdvanced Vite 8 patterns including Rolldown-powered builds, advancedChunks, Environment API, plugin development, SSR configuration, library mode, and build opti265skills.sh installs
2drawcall-ai avatarvitexecdrawcall-ai/vitexecUse this skill when an AI agent needs to inspect, verify, debug, or profile a live Vite app by running temporary snippets inside the browser page and reading br263skills.sh installs
3jezweb avatarelectron-basejezweb/claude-skillsBuild secure desktop applications with Electron 33, Vite, React, and TypeScript. Covers type-safe IPC via contextBridge, OAuth with custom protocol handlers, na263skills.sh installs
4ai-dashboad avatare2e-testingai-dashboad/flutter-skillAI-powered E2E testing for any app — Flutter, React Native, iOS, Android, Electron, Tauri, KMP, .NET MAUI. Connects via MCP to running apps so the agent can tak262skills.sh installs
5microsoft avatarwinui-designmicrosoft/win-dev-skillsWinUI 3 UI design and XAML correctness — layout planning, control selection, Fluent Design, theming (Light/Dark/HighContrast), typography styles, spacing, brush261skills.sh installs
6nexu-io avatarmagazine-posternexu-io/open-designAn editorial-style poster — newsprint paper, dateline, oversized serif headline with a struck-through word and italic accent, a 2-column body block, and 6 numbe259skills.sh installs