diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index fe36343..fb54db8 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -64,6 +64,13 @@ "description": "Manage Gandi domains, DNS records, and web redirects from Claude — driven by the gandi CLI with structured JSON output.", "source": "./plugins/gandi", "category": "development" + }, + { + "name": "unsplash", + "version": "2.0.0", + "description": "Search and fetch freely-licensed photos from Unsplash — keyword search, random photos, full metadata, collections, and editorial topics.", + "source": "./plugins/unsplash", + "category": "productivity" } ] } diff --git a/plugins/unsplash/.claude-plugin/plugin.json b/plugins/unsplash/.claude-plugin/plugin.json new file mode 100644 index 0000000..bdcde2e --- /dev/null +++ b/plugins/unsplash/.claude-plugin/plugin.json @@ -0,0 +1,26 @@ +{ + "name": "unsplash", + "description": "Search and fetch freely-licensed photos from Unsplash — keyword search, random photos, full metadata, collections, and editorial topics.", + "version": "2.0.0", + "author": { + "name": "kud", + "url": "https://github.com/kud" + }, + "homepage": "https://github.com/kud/mcp-unsplash", + "license": "MIT", + "setup": { + "instructions": "Get a free Unsplash Access Key at https://unsplash.com/developers and export it as MCP_UNSPLASH_ACCESS_KEY." + }, + "mcpServers": { + "mcp-unsplash": { + "command": "npx", + "args": [ + "-y", + "@kud/mcp-unsplash@latest" + ], + "env": { + "MCP_UNSPLASH_ACCESS_KEY": "${MCP_UNSPLASH_ACCESS_KEY}" + } + } + } +} diff --git a/plugins/unsplash/skills/photo-search/SKILL.md b/plugins/unsplash/skills/photo-search/SKILL.md new file mode 100644 index 0000000..e88c206 --- /dev/null +++ b/plugins/unsplash/skills/photo-search/SKILL.md @@ -0,0 +1,36 @@ +--- +name: photo-search +description: "Find a freely-licensed Unsplash photo from a plain description. Use when the user wants an image of something — 'find me a photo of a foggy forest', 'a photo for my blog header about coffee'." +--- + +## Step 1 — Search + +Call `search_photos` with the user's description as `query`. If the user hints at a shape (banner, header, wallpaper, avatar), map it to `orientation`: + +- banner / header / hero / wallpaper → `landscape` +- portrait / phone / story → `portrait` +- avatar / icon / tile → `squarish` + +Request `per_page: 8` so there's a spread to choose from. If the user asks for "the most recent" rather than the best match, pass `order_by: latest`. + +If `search_photos` returns nothing, retry once with a broader `query` (drop the most specific adjective), then fall back to `random_photo` with the same query. + +## Step 2 — Present the results + +Show up to 5 candidates as a compact list — never dump the raw payload: + +``` +1. + +2. … +``` + +Lead with the single best match for the user's intent. Keep it to 5 unless they ask for more. + +## Step 3 — On selection + +When the user picks one, call `get_photo` with its `id` to return full metadata (this also fires Unsplash's required download-tracking ping). Then remind them of the attribution rule: + +> Credit the photographer — link to their Unsplash profile (`author.profile`) near where you use the image. + +Never rehost the file; use the returned Unsplash URLs directly.