agentleFS
TheLoneWulf-WATheLoneWulf-WA/claude-skills/contextual-placeholders/SKILL.md

contextual-placeholders

Skill0 starsChanged 10 months agoMITView on GitHub

Automatically use contextual placeholder images from Unsplash, Picsum, and other services instead of solid color boxes when building UI components with images

The file

Show its rules and text

We split this skill into the rules it gives an agent

15 rules. About 0 are common, 9 are distinctive, and 6 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈9

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 6

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When building UI components that display images, always use real placeholder image services instead of solid color boxes or non-existent …

    line 8
  2. Very specific:

    Always use HTTPS: - All placeholder URLs must use https://

    line 15
  3. Very specific:

    Explicit user context: - If the user says "travel blog hero", use ?travel,landscape

    line 34
  4. Distinctive:

    Use appropriate dimensions for the component type:

    line 41
  5. Distinctive:

    Use source images large enough to scale down gracefully.

    line 52
  6. Distinctive:

    When multiple similar images appear on the same page, make each unique:

    line 56
  7. Very specific:

    Picsum: Add ?random=N - https://picsum.photos/400/300?random=1, ?random=2, etc.

    line 58
  8. Very specific:

    Unsplash: Add &sig=N - https://source.unsplash.com/400x300/?nature&sig=1, &sig=2, etc.

    line 59
  9. Very specific:

    Pravatar: Use different numbers - https://i.pravatar.cc/150?img=1, ?img=2, etc.

    line 60
  10. Very specific:

    DiceBear: Use different seeds - ?seed=alice, ?seed=bob, or use actual names if available

    line 61
  11. Distinctive:

    Leave these unchanged—they are not image placeholders:

    line 74
  12. Distinctive:

    Icons: - Use icon libraries (Lucide, Heroicons, etc.), not photos

    line 77
  13. Distinctive:

    Logos: - Add a comment noting "replace with logo" rather than using a random image

    line 78
  14. Distinctive:

    Charts/graphs: - Use charting libraries or placeholder components

    line 79
  15. Distinctive:

    Maps: - Use actual map embeds (Google Maps, Mapbox), not photos of maps

    line 80

≈ “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

Contextual Placeholders

When building UI components that display images, always use real placeholder image services instead of solid color boxes or non-existent local paths.

Core Rules

  1. Never use solid color boxes as image placeholders - No bg-gray-200, bg-slate-300, bg-blue-500, or any solid color div where an image should be
  2. Never use fake local paths - No /images/placeholder.jpg or ./assets/hero.png that don't exist
  3. Never use text-based placeholders - No placeholder.com or placehold.it
  4. Always use HTTPS - All placeholder URLs must use https://

Service Selection

Choose the appropriate service based on what the image represents:

Use CaseServiceURL Pattern
Contextual images (heroes, cards, features)Unsplashhttps://source.unsplash.com/WxH/?keywords
Random photos (no context needed)Lorem Picsumhttps://picsum.photos/W/H
Realistic avatarsPravatarhttps://i.pravatar.cc/SIZE
Realistic avatars (alternative)RandomUserhttps://randomuser.me/api/portraits/men/N.jpg or .../women/N.jpg
Illustrated avatarsDiceBearhttps://api.dicebear.com/7.x/avataaars/svg?seed=NAME
Video placeholdersPexelsUse Pexels embed or video URL

Keyword Selection for Unsplash

Infer keywords from context:

  1. Explicit user context - If the user says "travel blog hero", use ?travel,landscape
  2. Component purpose - A team section implies ?team,office,professional
  3. Project context - A restaurant site implies food-related keywords
  4. Combine 2-3 keywords - ?coffee,cafe,morning is better than just ?coffee

Dimensions Reference

Use appropriate dimensions for the component type:

ComponentDimensionsAspect Ratio
Hero/banner1920x1080 or 1280x72016:9
Card image400x300 or 600x4004:3
Feature image800x6004:3
Thumbnail200x150 or 150x1504:3 or 1:1
Avatar48, 64, 96, or 1501:1
Background1920x108016:9

Use source images large enough to scale down gracefully. A 1280x720 image works at any smaller viewport.

Uniqueness

When multiple similar images appear on the same page, make each unique:

  • Picsum: Add ?random=N - https://picsum.photos/400/300?random=1, ?random=2, etc.
  • Unsplash: Add &sig=N - https://source.unsplash.com/400x300/?nature&sig=1, &sig=2, etc.
  • Pravatar: Use different numbers - https://i.pravatar.cc/150?img=1, ?img=2, etc.
  • DiceBear: Use different seeds - ?seed=alice, ?seed=bob, or use actual names if available

Responsive Display

Placeholder dimensions are fixed in the URL, but CSS handles responsive display. Recommend using:

  • object-fit: cover (or Tailwind's object-cover) to fill containers without distortion
  • width: 100% or max-width: 100% for fluid scaling

The placeholder image dimensions don't need to match every breakpoint—CSS handles the presentation.

What This Skill Does NOT Cover

Leave these unchanged—they are not image placeholders:

  • Skeleton loaders - Animated placeholder boxes for loading states are intentional UI
  • Icons - Use icon libraries (Lucide, Heroicons, etc.), not photos
  • Logos - Add a comment noting "replace with logo" rather than using a random image
  • Charts/graphs - Use charting libraries or placeholder components
  • Maps - Use actual map embeds (Google Maps, Mapbox), not photos of maps
  • Intentional design blocks - Solid color sections that are part of the design, not placeholders

Examples

Hero section for a travel blog:

<img
  src="https://source.unsplash.com/1920x1080/?travel,adventure,landscape"
  alt="Travel destination"
  class="w-full h-96 object-cover"
/>

Team member cards (4 people):

<img src="https://i.pravatar.cc/150?img=1" alt="Team member" class="rounded-full" />
<img src="https://i.pravatar.cc/150?img=2" alt="Team member" class="rounded-full" />
<img src="https://i.pravatar.cc/150?img=3" alt="Team member" class="rounded-full" />
<img src="https://i.pravatar.cc/150?img=4" alt="Team member" class="rounded-full" />

Product cards for an e-commerce site:

<img src="https://source.unsplash.com/400x300/?sneakers,shoes&sig=1" alt="Product" class="object-cover" />
<img src="https://source.unsplash.com/400x300/?sneakers,shoes&sig=2" alt="Product" class="object-cover" />
<img src="https://source.unsplash.com/400x300/?sneakers,shoes&sig=3" alt="Product" class="object-cover" />

Generic card grid (no specific context):

<img src="https://picsum.photos/400/300?random=1" alt="Card image" />
<img src="https://picsum.photos/400/300?random=2" alt="Card image" />
<img src="https://picsum.photos/400/300?random=3" alt="Card image" />

Illustrated avatar for a chat app:

<img src="https://api.dicebear.com/7.x/avataaars/svg?seed=johndoe" alt="User avatar" />

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.