Communitygithub.com

OpenClip 縮圖與圖片編輯

從影片中擷取靜止畫面作為縮圖,並透過 OpenClip 進行壓縮、調整大小、裁切及格式轉換(jpg、png、webp)。僅需 OpenClip 帳戶即可免費使用,無需訂閱。

OpenClip 縮圖與圖片編輯 是什麼?

OpenClip 縮圖與圖片編輯技能提供兩個免費工具:`extract_thumbnails` 可從影片中均勻取樣擷取多張幀畫面,並打包成 ZIP 檔案回傳;`edit_image` 則支援對圖片進行壓縮、調整尺寸、裁切或格式轉換(支援 jpg、png、webp)。兩者皆非同步,需要輪詢任務狀態。此技能支援 Claude Code、Claude Desktop/Web、Cursor 及任何支援 MCP 的客戶端,設定方式簡單,只需透過 OAuth 登入 OpenClip 帳戶,無需 API 金鑰。上傳檔案時請使用 `create_upload` 與 PUT 位元組,不要呼叫 `complete_upload`。適用於快速產生影片縮圖、製作聯絡表、將圖片最佳化為網頁用 webp 等情境。免費使用有每日速率限制及檔案大小上限。

相容平台✓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 / 網頁版: 設定 → 連接器 →「新增自訂連接器」,貼上 URL,登入。
  • Cursor(.cursor/mcp.json):{ "mcpServers": { "openclip": { "url": "https://openclip.app/mcp" } } }
  • 僅支援標頭的客戶端: 在 openclip.app/settings/connect 產生一個 MCP 權杖,然後連線到 https://openclip.app/mcp/key,並帶上 Authorization: Bearer <token>。

驗證:呼叫 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 - 可選的輸出幀像素寬度。

輸出為 幀畫面的 ZIP 壓縮檔,而非個別的圖片 URL。將 ZIP 網址提供給使用者,或如果你需要特定幀畫面,則將其解壓縮。

當使用者想要從精確時間點而非均勻分布取樣時,請先使用 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 一律回傳 ZIP 壓縮檔。請勿向使用者承諾個別幀畫面的 URL。
  • 輸出 URL 為永久 CDN 連結,不會簽署或過期。
  • 免費使用有每日速率限制及單一檔案大小上限。

範例提示對應動作

  • "從這個影片抓一張縮圖" - create_upload,PUT 位元組,extract_thumbnails(video),輪詢,回傳 ZIP 網址。
  • "給我 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

相關技能