skills/webperf-media/SKILL.md
Intelligent media optimization with automated workflows for images, videos, and SVGs. Includes decision trees that detect LCP images (triggers format/lazy-loading/priority analysis), identify layout shift risks (missing dimensions), and flag lazy loading issues (above-fold lazy or below-fold eager). Features workflows for complete media audit, LCP image investigation, video performance (poster optimization), and SVG embedded bitmap detection. Cross-skill integration with Core Web Vitals (LCP/CLS impact) and Loading (priority hints, resource preloading). Provides performance budgets and format recommendations based on content type. Use when the user asks about image optimization, LCP is an image/video, layout shifts from media, or media loading strategy. Compatible with Chrome DevTools MCP.
npx skillsauth add nucliweb/webperf-snippets webperf-mediaInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
JavaScript snippets for measuring web performance in Chrome DevTools. Execute with mcp__chrome-devtools__evaluate_script, capture output with mcp__chrome-devtools__get_console_message.
scripts/Image-Element-Audit.js — Image Element Auditscripts/SVG-Embedded-Bitmap-Analysis.js — SVG Embedded Bitmap Analysisscripts/Video-Element-Audit.js — Video Element AuditWhen the user asks for media optimization or "audit images and videos":
When the user asks "optimize images" or "check image performance":
When the user asks "optimize videos" or "check video performance":
When LCP is an image and needs optimization:
When CLS is caused by images without dimensions:
When the user asks about SVG performance or file sizes are large:
Use this decision tree to automatically run follow-up snippets based on results:
If images missing width/height attributes → Layout shift risk, run:
If images using wrong format (JPEG for graphics, PNG for photos) → Recommend:
If images much larger than display size → Recommend:
If above-the-fold images are lazy-loaded → Run:
If LCP image lacks fetchpriority="high" → Run:
If below-the-fold images are NOT lazy-loaded → Run:
If images have both loading="lazy" AND fetchpriority="high" → Run:
If images competing with critical resources → Run:
If images missing alt text → Accessibility issue, recommend adding descriptive alt text
If video is LCP candidate → Run:
If video missing poster → Recommend:
If video uses preload="auto" → Bandwidth concern, evaluate:
If autoplay video without muted → Browser will block, recommend:
If video missing multiple formats → Recommend:
If large video files (>5MB) → Recommend:
If bitmap images found in SVGs → Recommend:
If large embedded bitmaps (>100KB) → Critical inefficiency:
If multiple small bitmaps in SVG → Consider:
Use these thresholds to trigger recommendations:
Image File Sizes:
Image Formats:
Image Dimensions:
Video File Sizes:
Lazy Loading:
Priority Hints:
references/snippets.md — Descriptions and thresholds for each scriptreferences/schema.md — Return value schema for interpreting script outputtools
Web performance measurement and debugging toolkit. Use when the user asks about web performance, wants to audit a page, or says "analyze performance", "debug lcp", "check ttfb", "measure core web vitals", "audit images", or similar.
tools
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.
tools
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.
tools
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 correlation) and Loading (script execution analysis). Use when the user asks about slow interactions, janky scrolling, unresponsive pages, or INP optimization. Compatible with Chrome DevTools MCP.