agentleFS
phazurlabsphazurlabs/sumi/skills/image-media-patterns/SKILL.md

image-media-patterns

Skill58 starsChanged 23 days agoApache-2.0View on GitHub

Image, video, and media UI patterns: hero and product imagery, galleries, carousels, video and audio players, avatars, thumbnails, aspect ratios, cropping, lazy loading, responsive images, and media accessibility. Use when placing media on a page or building a gallery or player.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈1

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When the pattern applies, and the simpler thing to try first

    line 63

≈ “Common” is an estimate: at least 1 in 5 of the 364,980 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Image & Media Patterns — Complete Visual Media System

Mental model

Media is where performance and craft collide. An unoptimised hero image costs more than every font, script and stylesheet on the page combined, and a correctly-sized one is invisible.

  • Reserve the space. Width and height attributes or aspect-ratio on every image. Layout shift is the single most common Core Web Vitals failure and the easiest to prevent.
  • The hero is never lazy. loading="lazy" on the largest contentful paint element delays the thing the score is measuring. Lazy-load everything below the fold and nothing above it.
  • Aspect ratio is a design decision. 16:9 for video, 4:3 for editorial, 1:1 for avatars and grids, 3:2 for photography. Mixing ratios inside one grid reads as an accident.
  • Autoplay needs muting, a pause control, and a reduced-motion escape. All three, not two.
  • Alt text describes function, not appearance. A decorative image takes alt=""; a linked image describes the destination.

Constants

16:9  video, embeds            4:3  editorial, product photography
1:1   avatars, grid thumbnails 3:2  photography
21:9  cinematic banners        golden 1.618:1  hero art

Index

NeedReference
Masonry, justified, uniform, mosaic gridgallery-carousel-patterns.md
Lightbox, filter animation, infinite scrollgallery-carousel-patterns.md
Scroll-snap or autoplay carousel, filmstripgallery-carousel-patterns.md
Before/after comparison slidergallery-carousel-patterns.md
Custom video player, picture-in-picturemedia-player-patterns.md
Audio player, podcast player, voice messagemedia-player-patterns.md
Avatars, upload UI, upload progressmedia-player-patterns.md
srcset by width or DPR, <picture> art directionresponsive-image-recipes.md
Native and IntersectionObserver lazy loadingresponsive-image-recipes.md
LQIP, BlurHash, ThumbHash, dominant colourresponsive-image-recipes.md
Choosing AVIF vs WebP vs JPEG; Core Web Vitalsmedia-formats-performance.md

Reference architecture

FileCoversLines
references/media-player-patterns.mdplayers, avatars, upload1283
references/gallery-carousel-patterns.md13 gallery and carousel patterns1244
references/responsive-image-recipes.mdsrcset, lazy loading, placeholders655
references/media-formats-performance.mdformat choice, CWV97

What every reference file contains

  1. When the pattern applies, and the simpler thing to try first
  2. Complete HTML/CSS/TSX with the loading strategy included
  3. Accessibility: alt text rules, controls, keyboard, reduced motion
  4. The performance cost and how to measure it
  5. The mobile form of the pattern

Routing

For galleries and carousels — masonry (both CSS-columns and grid), justified, uniform and mosaic grids, lightboxes, scroll-snap and autoplay carousels, filmstrips, infinite scroll and comparison sliders: read references/gallery-carousel-patterns.md.

For players — a complete custom video player spec, scroll-triggered picture-in-picture, full audio player, podcast player, and voice-message UI: read references/media-player-patterns.md.

For shipping images well — width- and DPR-based srcset, art direction with <picture>, native and IntersectionObserver lazy loading, LQIP, BlurHash, ThumbHash and dominant-color placeholders: read references/responsive-image-recipes.md.

For odds and ends — the patterns that had no home in the files above when this skill was converted to a router: read references/media-supplementary.md.

Cross-References

  • layout-block-intelligence — Hero sections, feature blocks containing images
  • component-patterns-code — React/SwiftUI/CSS implementations of image components
  • accessibility-inclusive-design — WCAG media requirements, screen reader patterns
  • performance-states-patterns — Loading skeletons, error states, empty states
  • responsive-block-patterns — Container queries, breakpoint transformations
  • animation-recipe-library — Entrance animations, Ken Burns, parallax recipes
  • form-design-encyclopedia — File upload form patterns
  • platform-visual-standards — iOS/Android/web image handling conventions
  • design-systems-architecture — Token-driven image component APIs

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.