web-visuals
Skill213 starsChanged 37 days agoMITView on GitHub
Make images, textures, illustrations and background video for a website or app you are building, with Glif, and wire them into the code. Use when: "add a hero image", "this page needs visuals", "replace these stock photos", "placeholder images", "background texture", "seamless pattern", "paper grain", "section backgrounds", "feature illustrations", "SVG illustration", "empty state art", "404 illustration", "infographic", "blog cover", "OG image", "social share image", "product cutouts for the shop", "looping background video", "scroll animation video", or when a page you're building has empty image slots. NOT for: editing an existing image (use edit-images), images not tied to a site (use make-images), logos or icons (use app-icons-and-logos), store or launch graphics (use app-promo-materials), demo videos (use app-demo-videos), game art (use game-assets).
In this repository11 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .claude/CLAUDE.mdCLAUDE.md
- app-demo-videosSkill
- app-icons-and-logosSkill
- app-promo-materialsSkill
- audio-and-videoSkill
- continue-projectSkill
- edit-imagesSkill
- game-assetsSkill
- get-startedSkill
- make-imagesSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
18 rules. About 0 are common, 13 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 12
Read the page or component.
- Distinctive: line 16
Textures and patterns: must tile seamlessly.
- Distinctive: line 19
Infographics and stat cards: keep the numbers and labels in HTML.
- Distinctive: line 24
Use what the user already has first.
- Distinctive: line 30
If the site supports dark mode, ask for matched light and dark versions with the same size and crop.
- Distinctive: line 36
If the user asked for these visuals, go ahead.
- Distinctive: line 37
If adding visuals was your idea, show the slot list in one line each and wait for a yes.
- Distinctive: line 39
When the look is still open, ask for 2 or 3 directions for the hero first, then make the rest in the chosen style.
- Distinctive: line 48
Add these rules to every brief:
- Distinctive: line 50
No text, letters, logos or watermarks in images, except an OG card that should carry the page title.
- Very specific: line 54
Keep coding with placeholders while it runs.
- Very specific: line 58
Never hotlink Glif URLs in shipped code.
- Very specific: line 65
Use the media's MIME type for the extension.
- Distinctive: line 67
Check each texture by tiling it 2×2.
- Distinctive: line 68
Check real pixel sizes. Resize locally or ask Glif to redo a wrong one.
- Distinctive: line 69
Check any text in an OG card letter by letter.
- Very specific: line 75
Add srcset widths such as 640, 1280 and 1920 when the framework doesn't.
- Very specific: line 76
Write real alt text. Use alt="" for decorative textures.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 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.
Files
Make the visuals a web page needs and put them in the project. The user's explicit instructions come first, within host safety rules.
1. Take inventory
Read the page or component. List each visual slot:
- Hero: full-bleed or split, and which side the headline sits on.
- Section backgrounds: soft gradients, paper grain, material close-ups.
- Textures and patterns: must tile seamlessly.
- Illustrations: feature cards, empty states, 404, onboarding. Ask for SVG when the style is flat.
- Cutouts: product or people photos on a transparent background, to sit on page colors.
- Infographics and stat cards: keep the numbers and labels in HTML; let Glif make the art around them.
- Device or hardware surface: a photoreal laptop, phone or panel with a pure
#00FF00screen area that your code draws live UI into. - OG image: 1200×630, one per major route.
- Motion (optional): a looping background, or a scroll-scrubbed hero video.
Use what the user already has first. Never replace a supplied logo, product photo or screenshot. Glif fills the gaps.
2. Match the site's style
Pull the palette (CSS variables or Tailwind theme), fonts, mood and any existing images. Put hex colors and a one-line mood in the brief. If a logo or screenshot sets the style, upload it with upload_file and attach the returned fileUrl.
If the site supports dark mode, ask for matched light and dark versions with the same size and crop.
3. Check cost, then batch
Generation spends the user's Glif credits.
- If the user asked for these visuals, go ahead.
- If adding visuals was your idea, show the slot list in one line each and wait for a yes.
- Video uses more credits than images. Offer it; never make it unasked.
- When the look is still open, ask for 2 or 3 directions for the hero first, then make the rest in the chosen style.
Send one compose_project call for the whole page. For each asset, give:
- filename, such as
hero.pngortexture-paper.png - exact pixel size and aspect ratio
- where it goes and what it must show
- where to leave empty space for headline text
Add these rules to every brief:
- No text, letters, logos or watermarks in images, except an OG card that should carry the page title. Real text stays in HTML.
- Textures: seamless on all four edges, 1:1, low contrast so text on top stays readable.
- Report each output's actual pixel size.
Keep coding with placeholders while it runs. Call get_job_status with the jobId as job_id when you need the results. A pending status or a timeout is not a reason to start another run. Share the projectUrl.
4. Bring the files home
Never hotlink Glif URLs in shipped code. Download each result into the static folder, such as public/images/ (Next.js, Vite, Astro) or static/ (SvelteKit):
curl -fsSL "<media url>" -o public/images/hero.png
file public/images/hero.png- Use the media's MIME type for the extension. Don't overwrite an existing file; save
hero-v2.pnginstead. - Convert photos to WebP or AVIF if a tool is available, such as
sharp,cwebp,magickorsips. Aim for about 300 KB for a hero, much less for other images. - Check each texture by tiling it 2×2. If a seam shows, ask Glif to fix that one in the same project.
- Check real pixel sizes. Resize locally or ask Glif to redo a wrong one. Never upscale.
- Check any text in an OG card letter by letter.
5. Wire it in
- Set
widthandheight(or use the framework's image component) to prevent layout shift. - Hero:
fetchpriority="high", no lazy loading. Everything else:loading="lazy". - Add
srcsetwidths such as 640, 1280 and 1920 when the framework doesn't. - Write real
alttext. Usealt=""for decorative textures. - Textures:
background-repeat: repeatwith a sensiblebackground-size. Grain overlays work well at 4–10% opacity. - Background video:
<video autoplay muted loop playsinline poster="...">, MP4 (H.264), no audio track. - OG image: absolute URL in
og:imageandtwitter:cardset tosummary_large_image.
Scroll-scrubbed hero video. Ask Glif for 3 to 5 keyframe stills first. After the user approves them, ask for smooth transitions between them, stitched into one MP4 encoded so every frame is a keyframe, for smooth seeking. In code, pause the video and set video.currentTime = progress * video.duration on scroll, inside requestAnimationFrame. Show the poster image when the user prefers reduced motion.
Then render the page, if you can, at narrow and wide widths, in light and dark mode. Report what you added and where. Report anything you couldn't check.
When not to use Glif
Simple shapes, gradients, dividers and standard UI icons are better as CSS, hand-written SVG or the project's icon library. Don't spend credits on them.
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
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.

