moonlight-lupin/agent-skills

pexels-stock-photos

Search and download free real-world stock photos from the Pexels API.

View source
Original skill document

Rendered from the source repository. Headings, examples, code, tables, links, and referenced images are preserved.

Pexels Stock Photos

Search and download free stock photos from the Pexels API (200 req/hr, 20k/month free). All content is free for commercial and non-commercial use; just credit the photographer and link to Pexels.

Routing: Pexels vs AI Generation

User says...Tool
"find a photo of Singapore" / "search for office pictures" / "stock image of a desk"Pexels (this skill)
"I need a real photo for this slide" / "find pictures for my article"Pexels (this skill)
"generate an image of a cat" / "create a picture of..." / "make me an illustration"Host's image generation tool
"upscale this" / "remove background" / "edit: make warmer"Host's AI image editing skill
"production-ready hero image" / "let's do this properly"Host's multi-stage image generation skill

The key word test: if the user says photo, picture, stock image, or find/search → Pexels. If the user says generate, create, make, draw, or illustration → AI generation.

When to Use

  • User asks for a "photo of X" or "stock image of Y"
  • Building presentations (PPTX) that need real imagery
  • Article/blog illustrations needing authentic photos
  • Social media posts requiring professional photography
  • Any request for "real" images vs AI-generated

Don't use for:

  • AI art / creative generation → host's image generation tool
  • Editing existing images → host's image editing skill
  • Screenshots or diagrams → use appropriate tools

API Reference

Base URL: https://api.pexels.com/v1/ Auth: Authorization: <PEXELS_API_KEY> header

Endpoints

EndpointMethodPurpose
/searchGETSearch photos by query
/curatedGETCurated trending photos
/photos/:idGETGet a specific photo by ID

Search Parameters

ParamTypeDefaultNotes
querystringrequirede.g. "singapore skyline"
orientationstringlandscape, portrait, square
sizestringlarge (24MP), medium (12MP), small (4MP)
colorstringred, orange, blue, ... or hex #ffffff
localestringen-USzh-CN, ja-JP, etc.
per_pageint15Max 80
pageint1Pagination

Photo Resource src Sizes

SizeDimensionsUse case
originalFull resPrint, high-quality
large2x940×650 @2xRetina displays
large940×650Web, presentations
medium~350px heightThumbnails, previews
small~130px heightSmall thumbnails
portrait800×1200Vertical/mobile
landscape1200×627Slides, social
tiny280×200Placeholders

Workflow

1. Search for photos

bash
curl -s -H "Authorization: $PEXELS_API_KEY" \
  "https://api.pexels.com/v1/search?query=singapore+skyline&per_page=5&orientation=landscape"

Parse the JSON response to present results to the user: photo ID, photographer, alt text, dimensions, and Pexels URL.

2. Download a photo

Use the `src` URLs from the search response — don't hand-construct images.pexels.com URLs (the slug/extension isn't guaranteed; Pexels' docs say to use src). Each photo object carries ready-made size variants (see the src table above).

bash
# Download the size you need, straight from the photo's src field
# (e.g. the value of photos[0].src.large from the search JSON)
curl -sL -o /tmp/pexels_<id>.jpeg "<photo.src.large>"

Deliver the file to the user via the host's file delivery mechanism.

3. Present results

When showing search results, format as a table:

| # | ID | Photographer | Alt | Dimensions |
|---|-----|-------------|-----|------|
| 1 | 5097071 | Dylan Chan | Singapore skyline at dusk | 6016×3384 |

Include the Pexels URL so the user can preview before downloading.

Attribution

Per Pexels guidelines:

  • Credit the photographer: "Photo by [Name] on Pexels"
  • Link back to the photo page URL
  • Include "Photos provided by Pexels" when displaying multiple

Example attribution block:

Photo by Dylan Chan on Pexels
https://www.pexels.com/photo/high-rise-buildings-in-singapore-5097071/

Common Pitfalls

  1. API key not in environment. PEXELS_API_KEY must be set before making

requests. Load it from your environment or .env file before calling curl.

  1. Using spaces in query. URL-encode spaces as + or %20.

singapore skylinesingapore+skyline.

  1. Downloading original for previews. Original files can be 10MB+. Use

large or medium for previews, original only when the user needs full resolution.

  1. Rate limit awareness. 200 req/hr, 20k/month — but only API calls

(search, curated, photo lookup) count. CDN downloads from the src URLs on images.pexels.com (no API key needed) do not count. Batch searches with per_page=15-80 to minimize API calls.

  1. Not including attribution. Pexels requires visible credit to the

photographer and a link to Pexels. Always include attribution text when delivering photos.

  1. Hand-built photo URLs. Don't construct images.pexels.com/photos/...

URLs yourself — the slug and extension aren't guaranteed across photos. Always download via the src.* URLs from the API response.

Verification Checklist

  • [ ] PEXELS_API_KEY is set in the environment
  • [ ] Search query returns results (check total_results > 0)
  • [ ] Downloaded file exists and is non-empty
  • [ ] Attribution text included with delivered photo
  • [ ] Rate limit headers checked if making many requests (X-Ratelimit-Remaining)
from this repository

More skills

All skills
moonlight-lupin
Community

claude-plugin-converter

Convert Claude Code plugins into self-contained Hermes plugins — discovery analysis then full conversion

installs
1
GitHub stars
62
Updated
Sep 7
moonlight-lupin
Community

clips-studio

Use when the user wants to "make a video/clip", "generate a video from text", "animate this image/photo", "create a marketing reel / social video / teaser", "do a 3D / parallax move", "pan/zoom/orbit a shot", or mentions fal.ai, Kling, Veo or Seedance for video. Staged fal.ai workflow — brainstorm, draft cheaply, produce the final at quality. Three modes: text-to-video, animate (still to motion), camera-move (push-in/pan/orbit). Not for still images (image-studio), slide decks, or charts. Honesty discipline: never depict real identifiable subjects via text-to-video.

installs
1
GitHub stars
62
Updated
Sep 7
moonlight-lupin
Community

decision-log

ADR-style decision journal for agents and teams. Create numbered decision records, track superseding chains, schedule periodic reviews, and search past decisions to avoid re-litigating settled questions.

installs
1
GitHub stars
62
Updated
Sep 7
moonlight-lupin
Community

deep-research

Autonomous multi-step deep research engine implementing an iterative Think → Search → Extract → Synthesize → Stop loop. The LLM drives every decision: what to search, what's relevant, what's missing, and when to stop. Produces a cited, magazine-quality report with inline citations, category- specific formatting, and research stats. Trigger when the user asks for "deep research", "research report on", "comprehensive analysis of", "look into X in depth", "write a report on X", or any question needing multi-source synthesis beyond a single search. For entity vetting/dossiers use entity-research; for news digests use news-monitoring; for source-grounded Q&A use notebooklm-mode.

installs
1
GitHub stars
62
Updated
Sep 7