技能图谱SKILLSGROVE
技能图谱/视频制作/OpenClaudia/openclaudia-skills/unsplash-image

unsplash-image

安装

$npx skills add https://github.com/OpenClaudia/openclaudia-skills --skill unsplash-image
$git clone --depth 1 https://github.com/OpenClaudia/openclaudia-skills.git /tmp/openclaudia-skills && mkdir -p ~/.claude/skills && cp -r /tmp/openclaudia-skills/skills/stock-images ~/.claude/skills/unsplash-image
请帮我安装这个 Agent Skill:https://github.com/OpenClaudia/openclaudia-skills/tree/03557e315375f709d71eaf59c00094a21292f660/skills/stock-images ,先阅读它的 SKILL.md 和脚本,确认安全后再安装到我的技能目录。

简介

原文描述 · MITSearch for images on Unsplash and download them. Optionally add text overlay (title/subtitle) to the image. Use when the user asks to find a stock photo, search for an image, get an Unsplash image, or download a photo with text.
以下 SKILL.md 内容转载自 OpenClaudia/openclaudia-skills(提交 03557e3),依据 MIT 许可证转载正文(文字未改动;仅省略文件头元数据、将图片显示为链接,超长内容会截断);版权归 2026 OpenClaudia 所有。许可证:LICENSE。仅展示说明文件,附带脚本请在原仓库查看。

Unsplash Image Search & Download

Search Unsplash for images, download them, and optionally add text overlay.

Tool Location

  • Script: ~/.agents/tools/unsplash-search.py
  • Env file: ~/.agents/tools/.env (contains UNSPLASH_CLIENT_ID)

Quick Usage

Search and download a random matching image

python ~/.agents/tools/unsplash-search.py \
  --query "nature landscape" \
  --output ./image.jpg

With orientation filter

python ~/.agents/tools/unsplash-search.py \
  --query "coffee shop" \
  --orientation landscape \
  --output ./coffee.jpg

With text overlay (title and subtitle)

python ~/.agents/tools/unsplash-search.py \
  --query "technology abstract" \
  --output ./cover.png \
  --title "My Blog Post Title" \
  --subtitle "A short description"

List results without downloading

python ~/.agents/tools/unsplash-search.py \
  --query "sunset" \
  --list

Pick the first result instead of random

python ~/.agents/tools/unsplash-search.py \
  --query "mountains" \
  --pick first \
  --output ./mountains.jpg

CLI Options

Option Description
--query, -q (Required) Search query string
--output, -o (Required unless --list) Output file path
--orientation Filter: landscape, portrait, or squarish
--color Color filter (e.g., blue, green, red, black_and_white)
--pick How to select from results: random (default) or first
--title Title text to overlay on the image
--subtitle Subtitle text to overlay (only used with --title)
--list List search results instead of downloading
--count Number of results to fetch, max 30 (default: 30)

Text Overlay

When --title is provided, the script adds a text overlay to the bottom portion of the image with:

  • Semi-transparent dark background behind the text
  • White title text with shadow
  • Gray subtitle text (if provided)
  • Automatic word wrapping and font sizing

Requires Pillow: pip install Pillow

Dependencies

  • requests (for API calls and image download)
  • Pillow (only needed if using text overlay with --title)

Install if needed:

pip install requests Pillow

Output

The script prints:

  • The download URL
  • Photographer attribution (required by Unsplash)
  • The saved file path
  • Confirmation of text overlay if applied

Notes

  • Unsplash API guidelines require attribution. The script prints photographer info.
  • The script triggers Unsplash's download tracking endpoint as required by their API terms.
  • Images are downloaded at "regular" quality (1080px width). For higher resolution, modify the script to use urls.full or urls.raw.
查看许可证全文(MIT)
MIT License

Copyright (c) 2026 OpenClaudia

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.