From sf-skills
Routes media search requests to connected sources (Salesforce CMS, Data Cloud). Prompts user to select a source before calling any search tool. Essential for teams with existing media libraries.
How this skill is triggered — by the user, by Claude, or both
Slash command
/sf-skills:searching-mediaThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Universal routing skill for searching and retrieving existing images and media.
Universal routing skill for searching and retrieving existing images and media.
This skill is for SEARCHING FOR existing media, not CREATING new media.
Use this skill when the user wants to:
DO NOT use this skill when the user wants to:
CRITICAL: This is a routing skill, not a direct search skill.
When a user requests to find an image:
Your first action MUST use the ask_followup_question tool to present search sources.
Example of what NOT to do:
search_electronic_media or search_media_cms_channelsExample of what TO do:
Your first response when this skill triggers MUST be a text-only message presenting search sources. No tool calls. No exceptions.
The user MUST choose the search source. You CANNOT skip this step.
Copy this checklist and track your progress:
Media Search Progress:
- [ ] Step 1: Check your own tool list for available search tools (no tool calls — just inspect what's in your context)
- [ ] Step 2: Present only the available options to the user as a numbered list (plain text, no tool calls)
- [ ] Step 3: Wait for the user to reply with their selection
- [ ] Step 4: Execute the selected search method (this is the first tool call)
- [ ] Step 5: Present all results to user for selection
- [ ] Step 6: Apply selected image to code
If you call any tool before step 4, you are not following this skill correctly.
DO NOT call any tool, read any MCP descriptor, or make any external request to determine available tools.
Your tools are already loaded into your context. Look at the tool names you already have access to — this is introspection, not a tool call.
Step 1: Check your own tool list (no tool calls)
Look at the tools already in your context and check for these names:
search_media_cms_channels → If present, include "Search using keywords"search_electronic_media → If present, include "Search using Data 360 hybrid search"Step 2: Build your response
Include ONLY the sources whose tools you actually have. Number them sequentially.
I can help you find that image. Where would you like to search?
[NUMBER]. [SEARCH SOURCE NAME] — [Brief description]
...
[NUMBER]. Other — Provide your own URL or path
Which option would you like to use?
Step 3: Stop and wait
After presenting the list, STOP. Do not call any tool. Do not proceed. Wait for the user to reply with their choice.
Both tools available:
I can help you find that image. Where would you like to search?
1. Search using Data 360 hybrid search — Semantic search across Salesforce CMS and connected DAMs
2. Search using keywords — Search Salesforce CMS by keywords and taxonomies
3. Other — Provide your own URL or path
Which option would you like to use?
Only search_media_cms_channels available:
I can help you find that image. Where would you like to search?
1. Search using keywords — Search Salesforce CMS by keywords and taxonomies
2. Other — Provide your own URL or path
Which option would you like to use?
Only search_electronic_media available:
I can help you find that image. Where would you like to search?
1. Search using Data 360 hybrid search — Semantic search across Salesforce CMS and connected DAMs
2. Other — Provide your own URL or path
Which option would you like to use?
Neither tool available:
No automated media search sources are currently configured. Please provide a direct URL or asset library path.
Wait for the user to select before proceeding.
⚠️ ONLY reach this step if the user has explicitly selected an option from your numbered list.
If you haven't shown options yet, go back to the "Presenting Search Sources" section first.
After the user selects an option, execute the corresponding search method below.
Tool: search_media_cms_channels
Process:
Analyze the query — Understand what the user is searching for (subject, attributes, domain)
Extract keywords — Concrete nouns that would appear in image metadata
Extract taxonomies — Descriptive qualities, styles, moods, categories
Determine locale — Use format en_US, es_MX, fr_FR (default: en_US)
Build the JSON payload — Construct this exact structure:
{
"inputs": [{
"searchKeyword": "keyword1 OR keyword2 OR keyword3",
"taxonomyExpression": "{\"OR\": [\"Taxonomy1\", \"Taxonomy2\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}
Field rules:
searchKeyword: Join keywords with OR (space-OR-space). Use empty string if no keywords.taxonomyExpression: Stringify JSON object {"OR": ["term1", "term2"]}. Use "{}" if no taxonomies.searchLanguage: Locale with underscore (e.g., en_US)channelIds: Always empty stringchannelType: Always "PublicUnauthenticated"contentTypeFqn: Always "sfdc_cms__image"pageOffset: Start at 0, increment by searchLimit for paginationsearchLimit: Default 5, adjust if user requests moreExamples:
Query: "luxury apartment with river view"
{
"inputs": [{
"searchKeyword": "apartment OR villa OR penthouse OR residence",
"taxonomyExpression": "{\"OR\": [\"Luxury\", \"Premium\", \"Waterfront\", \"Riverside\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}
Query: "bright spacious room" (no concrete nouns)
{
"inputs": [{
"searchKeyword": "",
"taxonomyExpression": "{\"OR\": [\"Bright\", \"Spacious\", \"Open\", \"Airy\"]}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}
Query: "car images" (no descriptive terms)
{
"inputs": [{
"searchKeyword": "car OR automobile OR vehicle OR auto",
"taxonomyExpression": "{}",
"searchLanguage": "en_US",
"channelIds": "",
"channelType": "PublicUnauthenticated",
"contentTypeFqn": "sfdc_cms__image",
"pageOffset": 0,
"searchLimit": 5
}]
}
Tool: search_electronic_media
Process:
search_electronic_mediasearchQuery parameterExample:
search_electronic_media(searchQuery="modern luxury apartment with natural lighting")Ask the user to provide:
Your action MUST use the ask_followup_question tool to present search results as options.
ask_followup_question to present ALL results as selectable options. Show the image title only — do not display the URL.I found 4 images. Which one would you like to use?
1. Luxury Apartment Exterior
Source: Salesforce CMS
2. Modern High-Rise Building
Source: Salesforce CMS
3. Waterfront Residence
Source: Salesforce CMS
4. Premium Condominium
Source: Salesforce CMS
Never auto-select an image. Always wait for user choice.
After the user chooses:
https://cms.example.com/media/img.jpg?oid=00D&refid=0EM&v=2 must be used in full.| Error | Response |
|---|---|
| Tool unavailable | "The [source name] tool is unavailable. Would you like to try a different source?" |
| Tool returns error | Show error message, offer retry with different terms or alternative source |
| No results found | "No results found. Try broader keywords, removing descriptive terms, or a different source." |
| Invalid user selection | Re-display options and ask again |
Never silently fail. Always inform the user and offer alternatives.
Search using keywords:
pageOffset for pagination (increment by searchLimit)Search using Data 360 hybrid search:
npx claudepluginhub ccmalcom/sf-skills-plugin --plugin sf-skillsDesigns and plans media pipelines for images, video, and downloadable assets, covering format selection (WebP, AVIF), responsive images, video hosting, and DAM organization.
Searches and fetches high-quality free Unsplash photos for hero sections, backgrounds, product galleries, and UI/UX elements in websites and apps.
Creates, edits, and optimizes marketing images using AI generation (Flux, Midjourney, Gemini) and design tools (Canva, Figma). Supports blog heroes, social graphics, product mockups, and brand assets.