Communitygithub.com

openclip-thumbnails

从视频中提取静帧作为缩略图,并使用 OpenClip 压缩、调整大小、裁剪或转换格式为 jpg、png 或 webp。仅需 OpenClip 账户即可免费使用,无需订阅。

openclip-thumbnails 是什么?

OpenClip 缩略图与图片编辑技能提供两个免费工具:`extract_thumbnails` 从视频中提取关键帧,`edit_image` 对图片进行压缩、调整大小、裁剪或格式转换。该技能通过远程 MCP 服务器(`https://openclip.app/mcp`)运行,支持 Claude Code、Claude Desktop、Cursor 以及仅需令牌的客户端。工作流程包括上传文件、调用工具、轮询任务状态直到完成,最终返回永久 CDN 链接。视频帧提取默认均匀分布,若需精确时刻的帧,可先用 `edit_video` 裁剪。图片编辑每次仅执行一个操作,如调整大小、裁剪或转换格式,适合用于网页优化或生成缩略图。

兼容平台✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/OpenClip-App/agent-skills/tree/main/skills/openclip-thumbnails

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

OpenClip:缩略图与图片编辑

两个免费工具,通常一起使用:

  • extract_thumbnails - 从视频中提取帧。
  • edit_image - 压缩、调整大小、裁剪或转换图片格式。

两者均免费,需要 OpenClip 账户,但无需订阅或积分。

设置(一次性)

OpenClip 是一个远程 MCP 服务器,地址为 https://openclip.app/mcp。在出现 OAuth 提示时使用你的 OpenClip 账户登录,无需复制 API 密钥。

  • Claude Code: claude mcp add --transport http openclip https://openclip.app/mcp,然后使用 /mcp 授权。
  • Claude Desktop / web: 设置 -> 连接器 -> "添加自定义连接器",粘贴 URL,登录。
  • Cursor(.cursor/mcp.json):{ "mcpServers": { "openclip": { "url": "https://openclip.app/mcp" } } }
  • 仅限标头的客户端: 在 openclip.app/settings/connect 处生成 MCP 令牌,并使用 Authorization: Bearer <token> 连接到 https://openclip.app/mcp/key。

快速验证:调用 get_account。

文件输入

  1. create_upload(filename, content_type) 返回一个 id 和一个 upload_url。
  2. 将原始字节通过 PUT 请求发送到 upload_url。
  3. 将返回的 id 作为 video(缩略图)或 file(图片编辑)参数传递。

不要调用 complete_upload。 该操作会启动付费的视频剪辑管线。免费工具直接读取上传的文件。list_videos 中已有的视频也可作为输入。

extract_thumbnails

extract_thumbnails(video, count?, width?)。

  • count - 1 到 10,默认为 1。帧会均匀分布在视频中,因此 count: 5 可提供一个粗略的联系表供你选择。
  • width - 输出帧的可选像素宽度。

输出是一个帧的压缩包,而非单个图片 URL。将压缩包 URL 交给用户,如果你需要特定帧,则解压它。

当用户需要某个精确时刻的帧而非均匀分布时,先用 edit_video(operation="trim",参见 openclip-video-editing)将视频裁剪到该时刻,然后从裁剪后的片段中提取一个缩略图。

edit_image

edit_image(file, operation, ...params),每次调用只执行一个操作:

  • compress - quality 1 到 100(默认 80),可选 format(jpg、png、webp)。
  • resize - 以像素为单位的 width 和 height,可选 format。
  • crop - 可以是 aspect("1:1"、"9:16"、"16:9"、"4:5")或显式的 x、y、width、height,可选 format。

当图片要放在网页上时使用 webp,当需要兼容所有环境时使用 jpg。

轮询

两个工具都会返回一个 tool_job hashid,其 status 为 "queued"。每 5 到 10 秒轮询 get_tool_job_status(tool_job):

  • queued / processing - 仍在处理,继续轮询。
  • completed - 返回永久 CDN outputs URL 及 result_meta。
  • failed - 返回 error。

规则

  • 始终进行轮询,两个工具都是异步的。
  • 每次调用只执行一个 edit_image 操作。要调整大小后再压缩,请依次运行两次调用。
  • extract_thumbnails 始终返回压缩包。不要向用户承诺提供单个帧 URL。
  • 输出 URL 是永久 CDN 链接,不会签名或过期。
  • 免费使用每天有速率限制,并且有按文件大小的上限。

示例提示到操作

  • "从这个视频中抓取一个缩略图" - create_upload,PUT 字节,extract_thumbnails(video),轮询,返回压缩包 URL。
  • "给我 5 帧供选择" - extract_thumbnails(video, count=5),轮询。
  • "我想要 1:30 处的帧" - edit_video(video, operation="trim", start_ms=90000, end_ms=91000),轮询,然后对输出执行 extract_thumbnails,轮询。
  • "把这张图片变成正方形的 webp" - edit_image(file, operation="crop", aspect="1:1", format="webp"),轮询。
  • "这个 PNG 太大了,压缩一下" - edit_image(file, operation="compress", quality=75, format="webp"),轮询。

相关

将主体裁剪为透明 PNG 请参见 openclip-remove-background。视频裁剪和裁剪请参见 openclip-video-editing。

Individual skills in this repo

This repo contains 9 individual skills — each has its own dedicated page.

OpenClip-App/agent-skills

OpenClip agent skill for clipping long-form into short-form social clips.

OpenClip-App/agent-skills

OpenClip clipping: long video → short vertical clips ranked by virality score.

OpenClip-App/agent-skills

OpenClip captions: burn styled animated captions into short clips.

openclip-convert

Convert and compress media from your agent with OpenClip - video to mp4, webm, mov, mkv, or gif, and audio to mp3, aac, wav, or flac. FREE with just an OpenClip account, no subscription. Use when asked to

openclip-remove-background

Remove the background from an image with OpenClip and get back a transparent PNG. FREE with just an OpenClip account, no subscription. Use when asked to

openclip-repurpose

Turn one long video into a full batch of platform-ready short clips for TikTok, Reels, and YouTube Shorts with OpenClip - find the moments, reframe to vertical, burn in captions, and write the post copy for each. Use when asked to

openclip-transcription

Transcribe video or audio to JSON, SRT, and VTT with speaker diarization and time codes, using OpenClip. FREE with just an OpenClip account, no subscription. Use when asked to

openclip-ugc-ads

Generate short vertical UGC-style ad clips from a structured creative brief with OpenClip, picking from a roster of AI creators. Use when asked to

openclip-video-editing

Edit a video file from your agent with OpenClip - trim, crop, reframe to 9:16 or 1:1, resize, rotate, flip, compress to a target size, or mute the audio. FREE with just an OpenClip account, no subscription. Use when asked to

相关技能