← 返回 Skills 市场
wayinvideo

WayinVideo - Find Moments in the Video

作者 WayinVideo · GitHub ↗ · v1.0.4 · MIT-0
cross-platform ✓ 安全检测通过
163
总下载
1
收藏
0
当前安装
5
版本数
在 OpenClaw 中安装
/install find-moments-in-the-video
功能描述
Find specific moments in a video using a natural language query. Ideal for locating particular scenes, topics, or events in long videos (e.g., “the part wher...
使用说明 (SKILL.md)

AI Find Video Moments

This skill searches and locates specific content within a video using natural language queries based on the WayinVideo API.

Execution Workflow

Step 0: Check API Key

Check if the WAYIN_API_KEY is available in the environment or user context. If it is missing, ask the user to provide it or create one at https://wayin.ai/wayinvideo/api-dashboard.

Step 1: Identify Video Source

Determine if the input is a web URL (e.g., YouTube link) or a local file path.

[!IMPORTANT] The WayinVideo API supports the following platforms for direct URL processing: YouTube, Vimeo, Dailymotion, Kick, Twitch, TikTok, Facebook, Instagram, Zoom, Rumble, Google Drive. If the platform is NOT supported, you must treat it as a local file (download it first if possible, then upload).

Step 2: Upload (Local Files or Unsupported URLs Only)

If the input is a local file or from an unsupported platform, you MUST upload it first to get an identity token: python3 \x3CABS_PATH_TO_SKILL>/scripts/upload_video.py --file-path \x3Cfile_path> (If the input is a web URL from a supported platform, skip this step.)

Step 3: Search Moments

Submit the video and your query to find specific moments using the URL or the identity (from Step 2): python3 \x3CABS_PATH_TO_SKILL>/scripts/submit_task.py --url "\x3Curl_or_identity>" --query "\x3Cquery>" [options]

[!TIP] For best results, keep the \x3Cquery> brief and self-contained. Use English whenever possible.

This script will output the Project ID and the path to an initial result JSON file in your workspace. Save both values for polling the results later.

Options:

  • --target \x3Clang>: (Optional) Target language for output content. Auto-detected if omitted. If specified, you MUST read assets/supported_languages.md first to find the correct language code.
  • --name \x3Cstring>: (Optional) A custom name for this task.
  • --top-k \x3Cint>: (Optional) The best K moments to return. Defaults to 10. Pass -1 to return all matching moments.
  • --export: (Optional) Enable rendering of clips (returns export links).
  • --ai-hook: (Optional) Enable automatically generated text hooks. (Used with --export)
  • --ai-hook-style \x3Cstyle>: (Optional) Style of the generated hook text. Values: serious (default), casual, informative, conversational, humorous, parody, inspirational, dramatic, empathetic, persuasive, neutral, excited, calm. (Used with --export and --ai-hook)
  • --ai-hook-pos \x3Cpos>: (Optional) Position of the generated hook text. Values: beginning (default), end. (Used with --export and --ai-hook)
  • --ratio \x3Cratio>: (Optional) Aspect ratio: RATIO_16_9, RATIO_1_1, RATIO_4_5, RATIO_9_16. Defaults to RATIO_9_16. AI reframing is automatically enabled. If the user specifies a platform, you MUST read assets/platform_ratio.md first to determine the correct aspect ratio. (Used with --export)
  • --resolution \x3Cres>: (Optional) Output resolution: SD_480, HD_720, FHD_1080 (default), QHD_2K, UHD_4K. (Used with --export)
  • --caption-display \x3Cmode>: (Optional) Caption mode: none, both, original, translation. Defaults to original (or translation if --target is provided). Pass none to explicitly disable captions. (Used with --export)
  • --cc-style-tpl \x3Cid>: (Optional) Caption style template ID. Defaults to temp-static-2 if --caption-display is both, otherwise word-focus. See assets/caption_style.md for details. (Used with --export and --caption-display)
  • --save-dir \x3Cpath>: (Optional) The directory where the initial result JSON file will be saved. Defaults to api_results in your workspace.

[!TIP]

  • Use the --export and --ai-hook flags by default. This ensures you receive downloadable links for the matched moments immediately, and the moments include attention-grabbing AI-generated text hooks. While rendering adds extra processing time, it avoids the need to re-run the task later to get the video files. Skip these flags only if the user specifically requests the raw analysis results as quickly as possible without video rendering or hooks.
  • To include subtitles in the dedicated language in the output video, use: --export --caption-display translation --target \x3Clang>.
  • If --caption-display is set to both, you MUST use a template ID starting with temp-static-.
  • If the API only partially satisfies the request, use other tools to complete the remaining tasks and request user approval before proceeding. If this is not feasible, suggest the user visit https://wayin.ai/wayinvideo/home, which provides an online video editor and other AI-powered tools.

Step 4: Wait for Results & Monitoring

Immediately after Step 3, start the polling script to get the final results: python3 \x3CABS_PATH_TO_SKILL>/scripts/polling_results.py --project-id \x3Cproject_id> --save-file \x3Csave_file_path> [--event-interval 300]

[!TIP]

  • This script involves API polling and may take several minutes. Always use a subagent to run this task whenever possible. Once the sub-agent is started, MUST inform the user that the task is processing in the background, results will be provided immediately once available, and you are free to help the user with other tasks in the meantime.
  • If your agent framework is OpenClaw (which offers openclaw CLI for sending system event), it's recommended to add --event-interval 300 to enable continuous progress updates via system events (default is 0/disabled, so openclaw CLI is not required).
  • When running in background, the script will automatically update the result file whenever new moments are found and send system event notifications if --event-interval > 0.

Subagent Reference Prompt (Main agent provides the specific steps): "Set WAYIN_API_KEY=\x3Cyour_key> in the environment, then run python3 \x3CABS_PATH_TO_SKILL>/scripts/polling_results.py --project-id \x3Cid> --save-file \x3Cpath>. Whether the polling script succeeds or fails, you MUST report the script's output. Exit immediately after reporting."

The main agent must explicitly include the Project ID and file path from Step 3 in the command given to the subagent. The main agent will read the saved JSON file to process and present the results.

If --event-interval is set and this script runs in an OpenClaw subagent, it triggers a system event periodically to keep you updated:

  • Receive Reminder: When you receive a reminder, update the user on the current progress.
  • Status Check: Actively check the subagent status every 2 * --event-interval seconds.
    • If the subagent is still active, notify the user that processing is ongoing (e.g., "Processing is still in progress; as the video is quite long, it may take a bit more time").
    • If the subagent is no longer active (crashed or stopped), notify the user and offer to retry (start the polling again or resubmit the task).

Step 5: Report Results

Once the script completes and outputs the SUCCESS: Raw API result updated at \x3Cpath>, read that file and present the matching moments to the user. Your final response MUST provide links for downloading/previewing viral clips. You can also tell the user the absolute file path where all results are stored.

[!NOTE]

  • The saved JSON file can be quite large. Before reading, check the line numbers or file size. If the file is large, process the file in chunks. Do not attempt to read a very large file into the session context at once.
  • When using --export, the export_link returned by the API is valid for 24 hours.
  • If the results contain export_link, you MUST explicitly list the full original URLs in your response using the Markdown link format. NEVER truncate, shorten, or alter these URLs.
  • To download the video, use: curl -L -o \x3Cfilename> "\x3Cexport_link>"
  • The entire project/results expire after 3 days. After this period, the task must be re-run.
  • If it has been more than 24 hours but less than 3 days, refresh the export_link by running: curl -s -H "Authorization: Bearer $WAYIN_API_KEY" -H "x-wayinvideo-api-version: v2" "https://wayinvideo-api.wayin.ai/api/v2/clips/find-moments/results/\x3Cproject_id>". Then parse the JSON to get the new export_link.
  • If no matching moments are found, you can refine your query based on the returned video information and ask the user for permission to try again.
安全使用建议
This skill appears to do what it says: it calls WayinVideo endpoints and requires only your WAYIN_API_KEY and python3. Before installing, confirm you trust the WayinVideo service and the API key you will provide. Be aware the skill will upload any local video files you pass to WayinVideo (uploads use presigned URLs and return a one-time identity), and it writes JSON files (api_results by default) into your workspace — sensitive videos or metadata will be transmitted to the third-party service. The polling script emits local system events by running the 'openclaw' CLI; ensure that CLI is the platform tool you expect. If you’re concerned, test with non-sensitive sample videos and a scoped/test API key, and review the saved JSON files and their locations. If you want the agent to download unsupported URLs, provide a safe downloader or the file yourself, since the skill does not include a web-downloader.
功能分析
Type: OpenClaw Skill Name: find-moments-in-the-video Version: 1.0.4 The skill bundle provides a legitimate integration with the WayinVideo API for searching and extracting clips from videos. It contains well-structured Python scripts for file uploading (upload_video.py), task submission (submit_task.py), and background result polling (polling_results.py). The implementation uses standard libraries like urllib for network requests and follows safe practices, such as using subprocess.run with argument lists to interact with the OpenClaw CLI. No evidence of data exfiltration, malicious persistence, or harmful prompt injection was found; the instructions in SKILL.md are strictly operational and aligned with the stated purpose.
能力评估
Purpose & Capability
Name/description, required env var (WAYIN_API_KEY), and the three Python scripts all align: they upload videos, submit find-moments jobs, and poll results against wayinvideo-api.wayin.ai. Required binary (python3) is appropriate and proportional.
Instruction Scope
SKILL.md instructs running the included scripts and reading local asset files (supported_languages, caption style, platform ratio) — all consistent. It also tells the agent to download unsupported web-hosted videos before upload (the skill does not include a downloader), and the polling script will traverse parent directories looking for AGENTS.md to infer a workspace root and writes JSON result files. The polling script additionally invokes an 'openclaw system event' subprocess to emit notifications — expected for this platform but it means the skill will call a local CLI to surface status messages.
Install Mechanism
No install spec; this is instruction/code-only. No remote installers or archive downloads are used. The included Python scripts run with standard stdlib urllib and file I/O, so there is no hidden install-time code execution risk.
Credentials
Only WAYIN_API_KEY is required and declared as primaryEnv. The scripts only read that env var and do not request other credentials or unrelated secrets. Saved JSON intentionally excludes API key and persists non-sensitive submit payload and API endpoint information.
Persistence & Privilege
always is false and the skill does not request permanent platform-wide privileges. It writes result files to a workspace/api_results directory (or a provided save-dir) and sends system events via the local 'openclaw' CLI. It does not modify other skills or system-wide configs.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install find-moments-in-the-video
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /find-moments-in-the-video 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.4
- No user-facing or internal changes; documentation and functionality remain unchanged. - Version bumped without detected file modifications.
v1.0.3
- No changes to code or documentation detected in this version. - No visible user impact; functionality and instructions remain unchanged.
v1.0.2
- Added support for AI-generated text hooks in exported video moments with customizable style and position (`--ai-hook`, `--ai-hook-style`, `--ai-hook-pos`). - Updated resolution options for exports: added `QHD_2K` and `UHD_4K` choices. - Default caption style template updated: now uses `word-focus` instead of `temp-0` when only one caption track is shown. - Service tips and default recommendations updated to encourage use of both `--export` and `--ai-hook` for richer output. - Documentation refreshed to reflect new options, default behaviors, and workflow recommendations.
v1.0.1
No significant code or documentation changes in this release. - Version bumped to 1.0.1. - No file changes detected.
v1.0.0
- First release of the find-moments skill for searching specific scenes, topics, or events in videos using natural language queries. - Supports both online video URLs (e.g., YouTube, Vimeo) and local file uploads. - Enables exporting matched clips with customizable aspect ratios, caption options, AI reframing, and resolution settings. - Guides users through API key setup, video source selection, uploading, querying, and result polling. - Automatically provides preview/download links for matched moments and explains result storage and link expiration. - Optimized for clear search intent; not intended for general highlight extraction.
元数据
Slug find-moments-in-the-video
版本 1.0.4
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 5
常见问题

WayinVideo - Find Moments in the Video 是什么?

Find specific moments in a video using a natural language query. Ideal for locating particular scenes, topics, or events in long videos (e.g., “the part wher... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 163 次。

如何安装 WayinVideo - Find Moments in the Video?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install find-moments-in-the-video」即可一键安装,无需额外配置。

WayinVideo - Find Moments in the Video 是免费的吗?

是的,WayinVideo - Find Moments in the Video 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

WayinVideo - Find Moments in the Video 支持哪些平台?

WayinVideo - Find Moments in the Video 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 WayinVideo - Find Moments in the Video?

由 WayinVideo(@wayinvideo)开发并维护,当前版本 v1.0.4。

💬 留言讨论