stock-images
Skill4 starsChanged 30 days agoMITView on GitHub
Search and download stock photos from Pexels, Unsplash, and Pixabay for projects, landing pages, UI mockups, and content. Use when users explicitly ask to find stock photos, need a hero/profile/content image, or want to download a selected stock image.
1 other project uses a version of this.
Adopted by
Most recently taken up by
- dongnguyenvie/bashcut-agent-kittheir own version, first seen Oct 13, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- dongnguyenvie/bashcut-agent-kit★ 6same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
The file
Show its rules and text
We split this skill into the rules it gives an agent
25 rules. About 0 are common, 21 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈21
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 8
NEVER display API keys in your output
- Distinctive: line 9
NEVER echo full curl commands that contain API keys
- Distinctive: line 11
Only download from allowed domains:
- Distinctive: line 15
All URLs MUST use HTTPS
- Distinctive: line 16
After downloading, check file size — alert if > 10MB
- Distinctive: line 21
Do NOT activate this skill when:
- Distinctive: line 28
Before searching, check if API keys are configured:
- Distinctive: line 34
If the file does not exist: guide the user interactively through setup:
- Distinctive: line 35
Ask which providers they want to use (Pexels, Unsplash, Pixabay — all free)
- Distinctive: line 41
NEVER display the keys back after saving
- Very specific: line 42
If permissions are not 600: warn the user and offer to fix with chmod 600 ~/.config/stock-images/keys.json.
- Distinctive: line 43
If the file exists with correct permissions: use the keys silently.
- Distinctive: line 72
Keep the parsed search results and metadata available for follow-up requests in the same conversation.
- Distinctive: line 74
Run curl commands for each configured provider.
- Distinctive: line 153
After presenting, ask if the user wants to download any of them.
- Distinctive: line 157
When the user selects an image to download:
- Very specific: line 159
Validate the URL: must start with https:// and match an allowed domain
- Very specific: line 160
Unsplash special case: use the links.download URL from search results instead of urls.raw to comply with Unsplash API TOS (this triggers …
- Very specific: line 161
Determine destination: default ./images/ in current project directory.
- Distinctive: line 169
Verify: check file size and confirm to user
- Distinctive: line 175
Attribution reminder: after download, remind the user:
- Distinctive: line 185
When the user is working on a UI component and mentions needing an image, proactively offer to search stock images
- Distinctive: line 186
Always present author attribution — Unsplash and Pixabay TOS require it
- Distinctive: line 188
If no results found, suggest alternative search terms
- Distinctive: line 189
If only one provider is configured, skip the provider selection and use it directly
≈ “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
Security Rules
- NEVER display API keys in your output
- NEVER echo full curl commands that contain API keys
- Pixabay limitation: Pixabay requires the API key as a URL query parameter, which is visible in process lists (
ps aux). Be aware of this inherent API limitation. Never display the full Pixabay curl command in output. - Only download from allowed domains:
images.pexels.comimages.unsplash.com,plus.unsplash.compixabay.com,cdn.pixabay.com
- All URLs MUST use HTTPS
- After downloading, check file size — alert if > 10MB
- For Unsplash downloads, use the
links.downloadURL (noturls.raw) to comply with Unsplash API TOS (triggers download count)
Non-Activation
Do NOT activate this skill when:
- Discussing image components (
<img>,next/image, etc.) - AI image generation is requested (that is a different skill)
- Referencing existing images already in the project
Setup Detection
Before searching, check if API keys are configured:
test -f ~/.config/stock-images/keys.json && stat -f "%Lp" ~/.config/stock-images/keys.json 2>/dev/null || stat -c "%a" ~/.config/stock-images/keys.json 2>/dev/null- If the file does not exist: guide the user interactively through setup:
- Ask which providers they want to use (Pexels, Unsplash, Pixabay — all free)
- Provide the relevant signup links:
- Pexels: https://www.pexels.com/api/
- Unsplash: https://unsplash.com/developers
- Pixabay: https://pixabay.com/api/docs/
- Once the user provides their keys, create the config file via Bash with
chmod 600 - NEVER display the keys back after saving
- If permissions are not
600: warn the user and offer to fix withchmod 600 ~/.config/stock-images/keys.json. - If the file exists with correct permissions: use the keys silently. Do NOT display the file contents, the keys, or commands containing key values.
Determine configured providers without printing secret values:
python3 - <<'PY'
import json
from pathlib import Path
config = Path.home() / ".config" / "stock-images" / "keys.json"
data = json.loads(config.read_text())
providers = [
name for name in ("pexels", "unsplash", "pixabay")
if data.get(name) and not str(data[name]).startswith("YOUR_")
]
print("\n".join(providers))
PYParse the JSON to determine which providers are configured (have non-empty, non-placeholder values). At least one provider is required.
Search Implementation
Extract from the user's request:
- query: what to search for (required)
- count: how many images (default: 5, max: 20)
- orientation: landscape, portrait, or square — infer from context (e.g., "hero banner" → landscape, "profile photo" → portrait)
- provider: specific provider or "all" (default: all configured)
Keep the parsed search results and metadata available for follow-up requests in the same conversation. If the user later says "download image #3", map that number back to the exact provider, image URL, download URL, author, author profile, and attribution data from the presented results.
Run curl commands for each configured provider. When multiple providers are configured, run them in parallel (separate Bash tool calls).
Pexels
curl -sS -G --max-time 15 --fail "https://api.pexels.com/v1/search" \
--data-urlencode "query=SEARCH_QUERY" \
-d "per_page=COUNT" \
-d "orientation=ORIENTATION" \
-H "Authorization: PEXELS_KEY"Response fields:
photos[].src.original— full image URLphotos[].src.medium— thumbnailphotos[].photographer— author namephotos[].photographer_url— author profilephotos[].width,photos[].height— dimensions
Unsplash
curl -sS -G --max-time 15 --fail "https://api.unsplash.com/search/photos" \
--data-urlencode "query=SEARCH_QUERY" \
-d "per_page=COUNT" \
-d "orientation=ORIENTATION" \
-H "Authorization: Client-ID UNSPLASH_KEY"Response fields:
results[].urls.raw— full image URLresults[].urls.small— thumbnailresults[].user.name— author nameresults[].user.links.html— author profileresults[].links.download— download URL (use this for downloads, not urls.raw)results[].width,results[].height— dimensions
Pixabay
curl -sS -G --max-time 15 --fail "https://pixabay.com/api/" \
-d "key=PIXABAY_KEY" \
--data-urlencode "q=SEARCH_QUERY" \
-d "per_page=COUNT" \
-d "orientation=ORIENTATION" \
-d "image_type=photo"Pixabay-specific: map "landscape" → "horizontal", "portrait" → "vertical". Minimum per_page is 3.
Response fields:
hits[].largeImageURL— full image URLhits[].previewURL— thumbnailhits[].user— author namehits[].user_id— for building profile URL:https://pixabay.com/users/USER-USER_ID/hits[].imageWidth,hits[].imageHeight— dimensionshits[].tags— description
Error Handling
- curl exits non-zero / timeout: skip that provider, continue with others, inform user
- HTTP 401: API key invalid or revoked — inform user, suggest re-running setup
- HTTP 429: rate limit — inform user, suggest waiting or trying another provider
- Empty / malformed JSON: skip provider, continue with others
- Malformed keys.json: inform user config is corrupted, offer to recreate
Presenting Results
Present results in the user's language. Format:
## Results for "query" (N images)
### Provider Name
1. "Image Title/Description" — by [Author Name](author_profile_url)
URL: https://...
Resolution: WxHAfter presenting, ask if the user wants to download any of them.
Download Implementation
When the user selects an image to download:
- Validate the URL: must start with
https://and match an allowed domain - Unsplash special case: use the
links.downloadURL from search results instead ofurls.rawto comply with Unsplash API TOS (this triggers their download counter) - Determine destination: default
./images/in current project directory. Ask for confirmation if the directory doesn't exist before creating it. - Generate filename:
<query-slug>-<provider>.<ext>(e.g.,mountain-landscape-pexels.jpg). Default extension is.jpgunless the URL clearly indicates otherwise (.png,.webp). - Download:
curl -sL --max-time 30 --fail -o "./images/FILENAME" "IMAGE_URL"- Verify: check file size and confirm to user
ls -lh "./images/FILENAME"- Attribution reminder: after download, remind the user:
Attribution required:
Photo by [Author](author_url) on [Provider]
Alert if file size > 10MB — the user may want a smaller resolution.
Attribution and license requirements vary by provider and project use. Always preserve and present author attribution metadata so the user can comply with the relevant provider terms.
Behavior Guidelines
- Infer orientation from context: "hero", "banner", "header" → landscape; "avatar", "profile" → portrait; "thumbnail", "icon" → square
- When the user is working on a UI component and mentions needing an image, proactively offer to search stock images
- Always present author attribution — Unsplash and Pixabay TOS require it
- Respond in the user's language
- If no results found, suggest alternative search terms
- If only one provider is configured, skip the provider selection and use it directly
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.

