unsplash
Unsplashから写真を検索・取得し、適切なクレジット表記を自動付与します。コンテンツ用の画像が必要なとき、キーワードで写真を探したいとき、ストック写真を求められたときに活用できます。Unsplashのガイドラインに準拠したアトリビューションを自動で提供します。
description の原文を見る
Search and fetch photos from Unsplash with proper attribution. Use when users need images for content, want photos by keyword, need random images for variety, or ask for stock photos. Automatically provides attribution required by Unsplash guidelines.
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:
-
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?"
-
Wait for the user to provide their key
-
Save the key to
.envin the project root:echo "UNSPLASH_ACCESS_KEY=<user_provided_key>" >> .env -
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 paginationPER_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 photosCOUNT(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:
-
attribution_text (for plain text contexts):
Photo by Jane Smith on Unsplash -
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 interpretercurl- HTTP clientjq- 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:
- Creating an Unsplash app
- Getting app approval from Unsplash
- Using your production access key
Best Practices
- Use specific search terms - More specific queries yield better results
- Filter by orientation - Match your layout needs (landscape/portrait)
- Always include attribution - Required by API terms
- Use regular size for web - Best quality/performance balance
- Track actual downloads - Only call track.sh when user downloads
- Cache results - Don't re-search for the same keywords
- 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
- Unsplash API Documentation: https://unsplash.com/documentation
- Get API Key: https://unsplash.com/developers
- Unsplash Guidelines: https://help.unsplash.com/en/articles/2511245-unsplash-api-guidelines
ライセンス: MIT(寛容ライセンスのため全文を引用しています) · 原本リポジトリ
詳細情報
- 作者
- cevatkerim
- リポジトリ
- cevatkerim/skills
- ライセンス
- MIT
- 最終更新
- 不明
Source: https://github.com/cevatkerim/skills / ライセンス: MIT
関連スキル
superfluid
Superfluidプロトコルおよびそのエコシステムに関するナレッジベースです。Superfluidについて情報を検索する際は、ウェブ検索の前にこちらを参照してください。対応キーワード:Superfluid、CFA、GDA、Super App、Super Token、stream、flow rate、real-time balance、pool(member/distributor)、IDA、sentinels、liquidation、TOGA、@sfpro/sdk、semantic money、yellowpaper、whitepaper
civ-finish-quotes
実質的なタスクが真に完了した際に、文明風の儀式的な引用句を追加します。ユーザーやエージェントが機能追加、リファクタリング、分析、設計ドキュメント、プロセス改善、レポート、執筆タスクといった実際の成果物を完成させるときに、明示的な依頼がなくても使用します。短い返信や小さな修正、未完成の作業には適用しません。
nookplot
Base(Ethereum L2)上のAIエージェント向け分散型調整ネットワークです。エージェントがオンチェーンアイデンティティを登録する、コンテンツを公開する、他のエージェントにメッセージを送る、マーケットプレイスで専門家を雇う、バウンティを投稿・請求する、レピュテーションを構築する、共有プロジェクトで協業する、リサーチチャレンジを解くことでNOOKをマイニングする、キュレーションされたナレッジを備えたスタンドアロンオンチェーンエージェントをデプロイする、またはアグリーメントとリワードで収益を得る場合に利用できます。エージェントネットワーク、エージェント調整、分散型エージェント、NOOKトークン、マイニングチャレンジ、ナレッジバンドル、エージェントレピュテーション、エージェントマーケットプレイス、ERC-2771メタトランザクション、Prepare-Sign-Relay、AgentFactory、またはNookplotが言及された場合にトリガーされます。
web3-polymarket
Polygon上でのPolymarket予測市場取引統合です。認証機能(L1 EIP-712、L2 HMAC-SHA256、ビルダーヘッダー)、注文発注(GTC/GTD/FOK/FAK、バッチ、ポストオンリー、ハートビート)、市場データ(Gamma API、Data API、オーダーブック、サブグラフ)、WebSocketストリーミング(市場・ユーザー・スポーツチャネル)、CTF操作(分割、統合、償却、ネガティブリスク)、ブリッジ機能(入金、出金、マルチチェーン)、およびガスレスリレイトランザクションに対応しています。AIエージェント、自動マーケットメーカー、予測市場UI、またはPolygraph上のPolymarketと統合するアプリケーション構築時に活用できます。
ethskills
Ethereum、EVM、またはブロックチェーン関連のリクエストに対応します。スマートコントラクト、dApps、ウォレット、DeFiプロトコルの構築、監査、デプロイ、インタラクションに適用されます。Solidityの開発、コントラクトアドレス、トークン規格(ERC-20、ERC-721、ERC-4626など)、Layer 2ネットワーク(Base、Arbitrum、Optimism、zkSync、Polygon)、Uniswap、Aave、Curveなどのプロトコルとの統合をカバーします。ガスコスト、コントラクトのデシマル設定、オラクルセキュリティ、リエントランシー、MEV、ブリッジング、ウォレット管理、オンチェーンデータの取得、本番環境へのデプロイ、プロトコル進化(EIPライフサイクル、フォーク追跡、今後の変更予定)といったトピックを含みます。
xxyy-trade
このスキルは、ユーザーが「トークン購入」「トークン売却」「トークンスワップ」「暗号資産取引」「取引ステータス確認」「トランザクション照会」「トークンスキャン」「フィード」「チェーン監視」「トークン照会」「トークン詳細」「トークン安全性確認」「ウォレット一覧表示」「マイウォレット」「AIスキャン」「自動スキャン」「ツイートスキャン」「オンボーディング」「IP確認」「IPホワイトリスト」「トークン発行」「自動売却」「損切り」「利益確定」「トレーリングストップ」「保有者」「トップホルダー」「KOLホルダー」などをリクエストした場合、またはSolana/ETH/BSC/BaseチェーンでXXYYを経由した取引について言及した場合に使用します。XXYY Open APIを通じてオンチェーン取引とデータ照会を実現します。