Token导航 LogoToken导航TokenDH.com
研究检索敏感数据github未标认证来源可访问clear审计异常

unsplashunsplash 搜索

Agent Skill

unsplash 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

6,071

周安装

248

GitHub Stars

公开资料未说明

下载量

1,944
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:unsplash(unsplash 搜索)
来源仓库:https://github.com/cevatkerim/skills
仓库路径:skills/unsplash
安装命令:
npx skills add https://github.com/cevatkerim/skills --skill unsplash
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/cevatkerim/skills --skill unsplash

简介

用于查找、检索和筛选相关信息。

  • 适合在 Codex、Claude、Cursor、Gemini CLI 中根据关键词、任务场景快速定位候选结果。
  • 通过 npx skills add 命令从指定仓库安装并使用。
  • 安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。
  • unsplash 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

Unsplash Photo Search

Search and fetch high-quality photos from Unsplash with automatic attribution.

Quick Start

# Search for photos
./scripts/search.sh "sunset beach"

# Get random photos
./scripts/random.sh "nature" 3

# Track download (when user downloads)
./scripts/track.sh PHOTO_ID

Setup (Interactive)

IMPORTANT: If the script returns UNSPLASH_ACCESS_KEY not set, handle it interactively:

  1. Ask the user: "I need an Unsplash API key to search for photos. You can get a free key at https://unsplash.com/developers - do you have one?"
  2. Wait for the user to provide their key
  3. Save the key to .env in the project root: echo "UNSPLASH_ACCESS_KEY=<user_provided_key>" >>.env
  4. Re-run the original search/random command

The skill automatically loads .env from the project root on each run.

Operations

1. Search Photos

Find photos by keyword with optional filters.

./scripts/search.sh QUERY [PAGE] [PER_PAGE] [ORDER_BY] [ORIENTATION] [COLOR]

Parameters:

  • QUERY (required): Search keyword(s)
  • PAGE (optional, default: 1): Page number for pagination
  • PER_PAGE (optional, default: 10): Results per page (1-30)
  • ORDER_BY (optional, default: "relevant"): Sort order ("relevant" or "latest")
  • ORIENTATION (optional): Filter by orientation ("landscape", "portrait", "squarish")
  • COLOR (optional): Filter by color ("black_and_white", "black", "white", "yellow", "orange", "red", "purple", "magenta", "green", "teal", "blue")

Examples:

# Basic search
./scripts/search.sh "mountain landscape"

# Search with filters
./scripts/search.sh "sunset" 1 5 latest landscape

# Search by color
./scripts/search.sh "flower" 1 10 relevant portrait red

2. Random Photos

Get random photos with optional filtering.

./scripts/random.sh [QUERY] [COUNT] [ORIENTATION]

Parameters:

  • QUERY (optional): Topic/keyword to filter random photos
  • COUNT (optional, default: 1): Number of photos (1-30)
  • ORIENTATION (optional): Filter by orientation ("landscape", "portrait", "squarish")

Examples:

# Single random photo
./scripts/random.sh

# Random photos by topic
./scripts/random.sh "architecture" 5

# Random landscape photos
./scripts/random.sh "nature" 3 landscape

3. Track Download

Track when a user downloads a photo (required by Unsplash API guidelines).

./scripts/track.sh PHOTO_ID

When to call:

  • When user actually downloads/saves the image file
  • NOT when just viewing or displaying the photo
  • Helps photographers get credit for downloads

Example:

./scripts/track.sh "abc123xyz"

Output Format

All operations return JSON with complete photo information:

{
  "id": "abc123xyz",
  "description": "A beautiful sunset over mountains",
  "alt_description": "orange sunset behind mountain range",
  "urls": {
    "raw": "https://...",
    "full": "https://...",
    "regular": "https://...",
    "small": "https://...",
    "thumb": "https://..."
  },
  "width": 6000,
  "height": 4000,
  "color": "#f3a460",
  "blur_hash": "L8H2#8-;00~q4n",
  "photographer_name": "Jane Smith",
  "photographer_username": "janesmith",
  "photographer_url": "https://unsplash.com/@janesmith?utm_source=claude_skill&utm_medium=referral",
  "photo_url": "https://unsplash.com/photos/abc123xyz?utm_source=claude_skill&utm_medium=referral",
  "attribution_text": "Photo by Jane Smith on Unsplash",
  "attribution_html": "Photo by <a href=\"https://unsplash.com/@janesmith?utm_source=claude_skill&utm_medium=referral\">Jane Smith</a> on <a href=\"https://unsplash.com/?utm_source=claude_skill&utm_medium=referral\">Unsplash</a>"
}

Image URLs

The urls object contains different sizes:

  • raw: Original unprocessed image
  • full: Full resolution (max width/height: 5472px)
  • regular: Web display size (1080px wide)
  • small: Thumbnail (400px wide)
  • thumb: Small thumbnail (200px wide)

Recommended: Use urls.regular for most web content (best quality/size balance).

Attribution Requirements

CRITICAL: Unsplash requires attribution for all image usage.

Always Include Attribution

When presenting photos to users, you MUST include one of:

  1. attribution_text (for plain text contexts): Photo by Jane Smith on Unsplash
  2. attribution_html (for HTML/web contexts): Photo by <a href="...">Jane Smith</a> on <a href="...">Unsplash</a>

Placement Guidelines

  • Place attribution near the image (below or in caption)
  • Make it visible and readable
  • Don't remove or hide the attribution
  • Attribution is required by Unsplash API terms

Why Attribution Matters

  • Gives credit to photographers
  • Required by Unsplash API terms of service
  • Violating attribution can result in API access suspension

Common Workflows

Blog Post Hero Image

# Search for relevant image
./scripts/search.sh "technology workspace" 1 3 latest landscape

# Present options to user with attribution
# User selects one
# Display image with attribution_html in blog post

Gallery of Random Images

# Get variety of images
./scripts/random.sh "travel" 10

# Display all images with their attributions

Specific Color Palette

# Search for images matching brand colors
./scripts/search.sh "abstract" 1 5 latest "" blue

Error Handling

Missing API Key:

ERROR: UNSPLASH_ACCESS_KEY not set

→ See "Setup (Interactive)" section above. Ask user for key, save to .env, and retry.

Rate Limit Exceeded:

ERROR: Rate limit exceeded (50/hour in demo mode)

Wait an hour or use production credentials with higher limits.

Invalid API Key:

ERROR: Invalid API key

Check that your API key is correct.

No Results:

[]

Empty array returned if no photos match search criteria.

Dependencies

Required tools (standard on macOS/Linux):

  • bash - Shell interpreter
  • curl - HTTP client
  • jq - JSON processor

Install jq if missing:

# macOS
brew install jq

# Ubuntu/Debian
sudo apt-get install jq

Rate Limits

  • Demo mode: 50 requests/hour
  • Production mode: 5,000 requests/hour

Production mode requires:

  1. Creating an Unsplash app
  2. Getting app approval from Unsplash
  3. Using your production access key

Best Practices

  1. Use specific search terms - More specific queries yield better results
  2. Filter by orientation - Match your layout needs (landscape/portrait)
  3. Always include attribution - Required by API terms
  4. Use regular size for web - Best quality/performance balance
  5. Track actual downloads - Only call track.sh when user downloads
  6. Cache results - Don't re-search for the same keywords
  7. Respect rate limits - Monitor usage in demo mode

More Examples

See detailed usage patterns in: examples/usage-examples.md

Troubleshooting

Scripts not executable:

chmod +x scripts/*.sh

jq not found:

brew install jq  # macOS

API errors:

  • Check internet connection
  • Verify API key is set correctly
  • Check rate limit hasn't been exceeded
  • Ensure photo_id is valid (for track.sh)

Links

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

30.29%
按下载量换算589

OpenCode

25.2%
按下载量换算490

Gemini CLI

15.35%
按下载量换算298

Antigravity

11.86%
按下载量换算231

windsurf

7.14%
按下载量换算139

Codex

3.74%
按下载量换算73

安全审计

Gen Agent Trust Hub

未通过

Socket

通过

Snyk

未通过

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills