video-optimization
What it does
This skill reviews video files on a website and suggests how to make them smaller. It is for site owners and developers whose pages load slowly because of video.
When to use it
- ✓When a page loads a large video that slows down its first view.
- ✓When a website serves a 4K video to small phone screens.
- ✓When a silent background video includes an audio track it does not need.
Skill link
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/video-optimization/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“My homepage has a background video and it's really heavy. How can I make it load faster?”
5 new skills a week. 1 minute to read.
How it works
The agent checks each video's resolution, codec, audio and file size against where it appears. It then suggests re-encoding and serving smaller versions for smaller screens.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Optimize and compress web videos
Unoptimized video is frequently the single heaviest asset on a page—an uncompressed or oversized video can dwarf every image and script combined, delaying Largest Contentful Paint and burning mobile data budgets.
Quick Reference
- Re-encode source video instead of shipping raw camera/screen-recorder output
- Serve multiple resolutions so mobile doesn't download a 4K file
- Prefer modern codecs: AV1/VP9/HEVC over baseline H.264 where supported
- Strip audio tracks from silent background/looping videos
Check
Scan this codebase for <video> elements and video asset references. For each one, verify: 1) The served resolution is appropriate for the rendered player size and device (no 4K video in a 400px player). 2) The codec/container is efficient (H.264 baseline is acceptable but VP9/AV1/HEVC is preferred when available). 3) Audio is stripped from silent background/looping videos. 4) A poster attribute or lightweight thumbnail is present. 5) File size is reasonable for its duration and placement (hero/background videos under a few MB). Report issues grouped by severity with file paths.
Fix
For each video optimization issue found: 1) Re-encode to multiple resolutions (e.g. 480p/720p/1080p) and serve the smallest one that fits the player via <source> or JS-based selection. 2) Convert to an efficient codec (VP9 or AV1 in WebM, or HEVC/H.264 in MP4) with a reasonable CRF/ quality setting rather than default encoder settings. 3) Remove the audio track from muted background/looping videos. 4) Add a poster attribute pointing to a compressed thumbnail. 5) Add preload="metadata" (or "none") instead of "auto" for below-the-fold videos. Show the corrected <video> markup and encoding command.
Explain
Explain why video is often the largest asset on a page and how it affects Largest Contentful Paint and mobile data usage. Cover the tradeoffs between H.264, HEVC, VP9, and AV1 (compression efficiency vs browser/ device support and encode time), how resolution and bitrate should scale to the rendered player size and viewport, and why muted background video should have its audio track stripped entirely rather than just muted in markup.
Code Review
Review video assets, <video>/<source> markup, and any encoding or CDN transform pipeline related to Optimize and compress web videos. Flag exact files or components where resolution, codec, bitrate, or loading behavior violates the rule, and describe how to confirm the fix in DevTools' Network and Media panels.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/performance/video-optimization
FAQ
Which video formats are better?
The skill prefers modern codecs such as VP9, AV1 or HEVC where supported, over baseline H.264 when possible.
Why offer several resolutions?
So phones do not download a large file meant for big screens. The page serves the smallest version that fits the player.
Should a silent video keep its audio?
No. The skill says to strip audio from silent background or looping videos.
Details
Original description by the author
Use when reviewing <video> elements, background/hero video, or embedded media assets. Check encoded bitrate, resolution relative to the rendered player size, codec/container choice, and whether a poster/thumbnail avoids blocking on the first frame.
Popularity
- GitHub stars
- 75k
- Ranking position
- #3074
- License
- MIT
- Updated
- 10/31/2026
Comments
- …
More skills from this repository
frontendchecklist
75kChecks frontend code and live pages against 380+ rules for accessibility, speed, SEO and security, using a command-line tool.
frontend-checklist-global
75kAudits a frontend project against all 386 Front-End Checklist rules, and gives a specific fix for each issue found.
404-page
75kChecks that your missing-page screen offers helpful links and returns a real 404 status, to help lost visitors find their way.
about-page
75kReviews whether your site has a clear About page that explains who runs it, to build trust with visitors and search engines.
Similar skills
taste-application
280kHelps your agent create videos in a specific style. It can copy the editing rhythm from a reference video, generate new scenes, adjust colors, and edit everything together with other footage.
taste-distillation
280kLets your agent analyze videos to create a style pack. This includes colors, cutting rhythm, and visual elements that can be reused to create new videos with the same look.
ui-demo
280kHas your agent record polished UI demo videos. Useful for creating tutorials or showing how a web app works.