Video Searching Skill
Use this skill when the user asks to find, compare, or analyze social videos (YouTube, TikTok, Instagram, Twitter/X), or explicitly invokes /video_search.
This skill calls the Memories.ai Video Searching API — a managed, token-authenticated endpoint that searches across platforms and returns structured results via SSE.
Triggering
Run this workflow when either condition is true:
- Message starts with
/video_search.
- The user asks for video sourcing/trend/creator/brand analysis and wants concrete video links.
If /video_search is used with no query body, ask for the missing query.
Execution contract
Resolve query text:
/video_search ... → strip /video_search and use remaining text.
- Free-form → use user message as query.
Build the API request JSON body:
query (required): the user's search query
platforms (optional): array of youtube, tiktok, instagram, twitter — only set if user specifies platforms
max_results (optional, default 10): number of video results
time_frame (optional): past_24h, past_week, past_month, past_year — only set if user specifies recency
max_steps (optional, default 10): max agent iterations
enable_clarification (optional, default false): set to true if user query is vague
Call the runner script:
<skill_dir>/scripts/run_video_query.sh \
--query "<query>" \
[--platforms "youtube,tiktok"] \
[--max-results 10] \
[--time-frame past_week] \
[--enable-clarification]
Start with exec using background: true.
Poll with process using action: "poll" every 2–4 seconds until process exits.
Parse NDJSON output and render only these events:
started → send: 🔍 Starting video search...
progress → send concise progress update from message field (throttle: skip if last update was < 3s ago)
complete → send final formatted response (see below)
clarification → ask the clarification question directly; treat as final response
error → send concise failure reason with one actionable next step
Do not forward raw tool_call or tool_result events to the user.
Final response format
When terminal event is complete:
- One short paragraph conclusion (from
answer field).
- Top video references (up to 5 by default):
title
url
platform badge (e.g. 🎬 YouTube, 🎵 TikTok, 📸 Instagram, 🐦 X)
- one-line
relevance_note
- key metrics: views, likes, engagement rate (if available)
- Footer:
⏱ {execution_time_seconds}s · {steps_taken} steps · {tools_used}
If fewer videos exist, show all available references.
When terminal event is clarification:
- Ask the clarification question directly.
- Present options if provided.
- Treat as final response for the current run.
When terminal event is error:
- Send concise failure reason.
- Include one actionable next step.
Safety and fallback
- If
MEMORIES_API_KEY is not set, tell the user:
⚠️ Missing MEMORIES_API_KEY. Set it in your OpenClaw environment variables to use this skill.
Get your API key at https://api-tools.memories.ai
- If the API returns a non-SSE error (HTTP 4xx/5xx), display the error message.
- Never fabricate video URLs or metrics.
- If the API is unreachable, suggest checking network connectivity and API status.
1---2name: video-searching3description: Search and analyze videos across YouTube, TikTok, Instagram, and X/Twitter via the Memories.ai Video Searching API.4---56# Video Searching Skill78Use this skill when the user asks to find, compare, or analyze social videos (YouTube, TikTok, Instagram, Twitter/X), or explicitly invokes `/video_search`.910This skill calls the Memories.ai Video Searching API — a managed, token-authenticated endpoint that searches across platforms and returns structured results via SSE.1112## Triggering1314Run this workflow when either condition is true:15161. Message starts with `/video_search`.172. The user asks for video sourcing/trend/creator/brand analysis and wants concrete video links.1819If `/video_search` is used with no query body, ask for the missing query.2021## Execution contract22231. Resolve query text:24 - `/video_search ...` → strip `/video_search` and use remaining text.25 - Free-form → use user message as query.26272. Build the API request JSON body:28 - `query` (required): the user's search query29 - `platforms` (optional): array of `youtube`, `tiktok`, `instagram`, `twitter` — only set if user specifies platforms30 - `max_results` (optional, default 10): number of video results31 - `time_frame` (optional): `past_24h`, `past_week`, `past_month`, `past_year` — only set if user specifies recency32 - `max_steps` (optional, default 10): max agent iterations33 - `enable_clarification` (optional, default false): set to true if user query is vague34353. Call the runner script:36 ```37 <skill_dir>/scripts/run_video_query.sh \38 --query "<query>" \39 [--platforms "youtube,tiktok"] \40 [--max-results 10] \41 [--time-frame past_week] \42 [--enable-clarification]43 ```44454. Start with `exec` using `background: true`.465. Poll with `process` using `action: "poll"` every 2–4 seconds until process exits.476. Parse NDJSON output and render only these events:48 - `started` → send: `🔍 Starting video search...`49 - `progress` → send concise progress update from `message` field (throttle: skip if last update was < 3s ago)50 - `complete` → send final formatted response (see below)51 - `clarification` → ask the clarification question directly; treat as final response52 - `error` → send concise failure reason with one actionable next step537. Do not forward raw `tool_call` or `tool_result` events to the user.5455## Final response format5657When terminal event is `complete`:58591. One short paragraph conclusion (from `answer` field).602. Top video references (up to 5 by default):61 - `title`62 - `url`63 - `platform` badge (e.g. 🎬 YouTube, 🎵 TikTok, 📸 Instagram, 🐦 X)64 - one-line `relevance_note`65 - key metrics: views, likes, engagement rate (if available)663. Footer: `⏱ {execution_time_seconds}s · {steps_taken} steps · {tools_used}`6768If fewer videos exist, show all available references.6970When terminal event is `clarification`:71721. Ask the clarification question directly.732. Present options if provided.743. Treat as final response for the current run.7576When terminal event is `error`:77781. Send concise failure reason.792. Include one actionable next step.8081## Safety and fallback82831. If `MEMORIES_API_KEY` is not set, tell the user:84 > ⚠️ Missing `MEMORIES_API_KEY`. Set it in your OpenClaw environment variables to use this skill.85 > Get your API key at https://api-tools.memories.ai862. If the API returns a non-SSE error (HTTP 4xx/5xx), display the error message.873. Never fabricate video URLs or metrics.884. If the API is unreachable, suggest checking network connectivity and API status.