pexels-stock-photos
Use when the user wants a REAL photo — 'find a photo of X', 'search for pictures of Y', 'stock image of Z', 'I need a photo for this slide/article'. Searches Pexels free stock library and downloads images. DO NOT use for AI-generated art ('generate an image of', 'create a picture of', 'make me an illustration') — those go to the image_generate tool or fal-enhanced skill. Key distinction: 'photo' = real stock photography = Pexels; 'generate/create/make an image' = AI art = image_generate/fal-enhanced.
- License 许可
- MIT
- 最近更新
- 2026-11-13
- Stars
- ★ 123
- Forks
- 22
01 前言 Front Matter
- name
- pexels-stock-photos
- license
- MIT
- metadata
- { "author": "moonlight-lupin", "version": "1.0.0", "platforms": [ "linux", "macos", "windows" ] }
- description
- Use when the user wants a REAL photo — 'find a photo of X', 'search for pictures of Y', 'stock image of Z', 'I need a photo for this slide/article'. Searches Pexels free stock library and downloads images. DO NOT use for AI-generated art ('generate an image of', 'create a picture of', 'make me an illustration') — those go to the image_generate tool or fal-enhanced skill. Key distinction: 'photo' = real stock photography = Pexels; 'generate/create/make an image' = AI art = image_generate/fal-enhanced.
02 资源文件 2
- 参考文档README.md1020 B
- 脚本tests/test_skill.py5.1 KB
03 SKILL.md 正文
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
| Endpoint | Method | Purpose |
|---|---|---|
/search |
GET | Search photos by query |
/curated |
GET | Curated trending photos |
/photos/:id |
GET | Get a specific photo by ID |
Search Parameters
| Param | Type | Default | Notes |
|---|---|---|---|
query |
string | required | e.g. "singapore skyline" |
orientation |
string | — | landscape, portrait, square |
size |
string | — | large (24MP), medium (12MP), small (4MP) |
color |
string | — | red, orange, blue, ... or hex #ffffff |
locale |
string | en-US |
zh-CN, ja-JP, etc. |
per_page |
int | 15 | Max 80 |
page |
int | 1 | Pagination |
Photo Resource src Sizes
| Size | Dimensions | Use case |
|---|---|---|
original |
Full res | Print, high-quality |
large2x |
940×650 @2x | Retina displays |
large |
940×650 | Web, presentations |
medium |
~350px height | Thumbnails, previews |
small |
~130px height | Small thumbnails |
portrait |
800×1200 | Vertical/mobile |
landscape |
1200×627 | Slides, social |
tiny |
280×200 | Placeholders |
Workflow
1. Search for photos
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).
# 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
-
API key not in environment.
PEXELS_API_KEYmust be set before making requests. Load it from your environment or.envfile before calling curl. -
Using spaces in query. URL-encode spaces as
+or%20.singapore skyline→singapore+skyline. -
Downloading original for previews. Original files can be 10MB+. Use
largeormediumfor previews,originalonly when the user needs full resolution. -
Rate limit awareness. 200 req/hr, 20k/month — but only API calls (search, curated, photo lookup) count. CDN downloads from the
srcURLs onimages.pexels.com(no API key needed) do not count. Batch searches withper_page=15-80to minimize API calls. -
Not including attribution. Pexels requires visible credit to the photographer and a link to Pexels. Always include attribution text when delivering photos.
-
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 thesrc.*URLs from the API response.
Verification Checklist
- [ ]
PEXELS_API_KEYis 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)
04 同仓库更多 Skills
website-scraping
Generic playbook for extracting structured data from any website — hotel prices, flight fares, e-commerce listings, real estate, jobs, competitor product catalogues, anything where the goal is to turn one or more URLs into clean records on disk. Use this skill whenever the user mentions scraping, harvesting, extracting, or pulling data from a website; names a specific site or competitor they want data from; asks how to handle JavaScript-rendered pages, Cloudflare blocks, bot detection, Turnstile challenges, or Playwright; wants to monitor prices over time; needs to automate a copy-paste research task; or says things like "just get the data from X" or "I need a script that grabs N from site Y". Covers recon, picking the lightest extraction tool that works, surviving anti-bot defences, and writing clean JSONL output with a run manifest. Scope is scraping only — landing data in a database, scheduling, and downstream pipeline work are explicitly out of scope and live in other tools.
greet
Greets a named person warmly.
skill-quality-review
Use when auditing or reviewing skill quality — batch checks across a library, deep per-skill grep methodology, usage stats, efficacy testing, or fix planning. Single consolidated home for the writing-for-agents review framework and the 3-surface review methodology.
people-enrichment
Use when the user has a list of names or companies and wants their job, employer, work history, LinkedIn URLs or company profiles looked up, or wants to find people or companies matching criteria — trigger on phrases like "enrich these contacts", "find their LinkedIn", "look up these people", "who works at X", "find directors at Y", "enrich these companies", or "get firmographics for". Enrich and search People Data Labs (PDL) Person and Company data, writing results to .xlsx. Five operations: enrich named PEOPLE into a profile, employment history and LinkedIn URL; IDENTIFY an ambiguous person as several scored candidates; SEARCH people by criteria (company, title, location); enrich COMPANIES into firmographics (industry, size, employees, HQ, founded, LinkedIn); and SEARCH companies by criteria. Do not scrape LinkedIn directly — this uses a licensed data aggregator (PDL) instead, for legal and reliability reasons.
notebooklm-mode
Source-grounded research pipeline inspired by NotebookLM. Collect verbatim source extracts into a temporary workspace, then answer questions and create deliverables grounded in those sources. Two grounding modes: strict (vault-only) and augmented (vault + labeled [background] knowledge). Trigger when the user asks to research a topic from sources, wants NotebookLM-style grounded answers, asks to build a resource vault, or says "notebooklm mode".
news-monitoring
Use when a topic or news stream needs recurring monitoring — cover it with web search, multi-language sources, digest formatting, and automated delivery via Hermes cron jobs. Covers search strategy, source selection, Chinese-language platforms, and digest templates.