skills/ui-image-rules/SKILL.md
Mandatory image rendering rules: dimensions, object-fit, optimization, alt text. Always applies regardless of design-dna.
npx skillsauth add adilkalam/orca ui-image-rulesInstall 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.
These rules apply to every image element regardless of project design-dna.
<Image> or <img> MUST have explicit width and height props, OR use the fill prop<Image> component with fill for responsive containers, or explicit dimensionssizes prop to specify different image widths for different viewport widths| Image Type | object-fit | When to Use |
|------------|-----------|-------------|
| Hero banners, card thumbnails, backgrounds | cover | Image should fill container, cropping is acceptable |
| Logos, icons, product images on white | contain | Full image must be visible, letterboxing acceptable |
| Avatars, profile photos | cover | Face-centered crop fills circular/square container |
object-fit with object-position for aspect ratio mismatchescover images, set object-position to control which part of the image is visible (e.g., object-position: center top for portraits)priority on above-the-fold hero images (LCP optimization)loading="lazy" (default in Next.js Image) for below-the-fold imagesalt textalt="" with role="presentation" -- but this should be rarecontent-media
Download YouTube video transcripts when user provides a YouTube URL or asks to download/get/fetch a transcript from YouTube. Also use when user wants to transcribe or get captions/subtitles from a YouTube video.
development
Web UI quality rules: interactions, forms, loading, animations, layout, content, performance, accessibility, design. Apply to all web UI work. Adapted from Vercel Design Guidelines.
testing
MANDATORY protocol enforcing knowledge check before EVERY response - prevents explaining systems without reading docs, claiming without verification, and ignoring auto-loaded context
testing
Typography hierarchy and spacing scale fallbacks. Yields to project design-dna when present.