Communitygithub.com

PrunaAI/pruna-skills

當使用者想要透過文字指令編輯現有影片時使用 — 重新著色、重新造型、移除或新增物件、變更環境或燈光、更新螢幕上的文字,或套用可選的參考引導產品與配件編輯。不適用於從頭建立新片段或 ffmpeg 組合。

pruna-skills 是什麼?

這個技能專門針對需要對現有影片進行精確編輯的場景,使用者只需提供一個文字指令。它能處理的編輯類型非常廣泛,包括改變物件顏色、風格、新增或移除元素、調整環境或燈光,甚至是更新影片中的文字。其核心設計哲學是「一個主要變更」——每次只執行一個使用者要求的編輯,並確保影片中所有未被提及的元素(如鏡頭、動作、音訊)保持不變。技能要求使用者明確描述「改變什麼」以及「保留什麼」,以達到高品質的編輯結果。它支援可選的參考圖片(最多4張)來引導更精確的編輯,例如從參考圖中新增配件。此技能是 Pruna AI 影片編輯工具鏈的一部分,並與其他專門技能(如角色替換、從文字生成影片)明確區分,避免誤用。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/PrunaAI/pruna-skills/tree/HEAD/skills/video/p-video-edit

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

先決條件

在產生前,請先安裝並載入這些技能(如果已透過 @pruna 納入上下文,則可跳過):

技能描述安裝指令
generation-diversity當撰寫任何生成式提示詞時使用 — 在付費 API 呼叫前,進行儀式性隨機種子設定、明確結構、情境軸線和品質把關。npx skills add PrunaAI/pruna-skills@generation-diversity -y
video-prompting當為任何生成模型設計影片或動態提示詞時使用 — 戲劇結構、攝影機、物理安全的動作、畫面錨點和片段串連。npx skills add PrunaAI/pruna-skills@video-prompting -y
pruna-api在進行任何 Pruna 或 Replicate HTTP 呼叫前使用 — 憑證管理、上傳/輪詢/下載、平行批次和代理安全。npx skills add PrunaAI/pruna-skills@pruna-api -y

或一次性安裝完整套件:npx skills add PrunaAI/pruna-skills@pruna -y

請遵循每個技能的 Before generating / craft 章節 — 請勿在此重複說明指南內容。

代理習慣

在首則回覆中,以反引號命名 `p-video-edit`,確認 PRUNA_API_KEY(或若無則停止並提供來自 pruna-api 的註冊連結),然後要求提供來源影片(最長 15 秒)和編輯簡報。開啟接收 → 在第一次 POST 前,先進行 generation-diversity 的釐清接收。根據 Prompt craft (dynamic + faithful) 草擬編輯內容 — 請勿貼上技能範例。當更符合 When NOT to use 的情況時,請導向其他技能。

Prompt craft (dynamic + faithful)

prompt 必須是精確的,並且鎖定使用者請求。每次執行只做一個主要變更。描述期望的最終狀態,然後指名哪些部分必須保持不變。只改變使用者要求的內容;保持攝影機、動作、音訊和未提及的元素不變。

應該做的事不應該做的事
公式:Change only [X]. Preserve [geometry / motion / camera / lighting / unmentioned subjects].模糊的 make it better / 僅調整情緒的改寫,從而憑空創造一個新場景
明確指出使用者要求的所有必須保留元素(主體、攝影機路徑、燈光、道具)省略保留條款並期望模型自動保留它們
在草擬前先進行儀式性隨機種子設定;當簡報允許時,為保留條款使用全新的措辭當使用者描述的是不同的編輯時,直接複製此技能的範例(例如使用者描述的不是日落天空)
使用參考圖時明確指出:add the accessory from the first reference模糊地寫 use the reference 但未指定來源位置
當措辭尚未鎖定時,在 POST 前顯示 prompt悄無聲息地編輯,導致改變了攝影機、演員或未要求的區域

忠誠度檢查(付費前): 提示詞必須仍然滿足使用者的變更要求以及所有陳述的保留條件。當使用者只要求一個屬性或環境編輯時,不要「擅自添加」額外元素。

不適合的工作(應避免或發出警告): 創造全新的場景/劇情;新增一個帶有獨立動作的物體(尤其是新的手持物品);改變攝影機角度、攝影機動作或變焦。

技能邊界

p-video-editp-video-replace
使用者問題更改此影片中的顏色/環境/物件/文字/燈光?替換此影片中的人物?
目標對來源影片進行指令式編輯將新的身分置入現有素材中
參考圖片可選的 images — 0 到 4 張必要的 images — 1 到 4 張
提示詞欄位promptinstruction_prompt

當工作是根據必要的參考照片進行角色替換時,請使用 p-video-replace。此技能適用於由提示詞驅動的屬性、環境、物件、文字或燈光編輯。

何時不該使用

請改用以下其他技能:

技能描述安裝指令
p-video-2-pro當使用者想要從文字或起始/結束影格生成電影級片段時使用 — 產品廣告、紀錄片鏡頭、或包含生成音訊的對話。不適用於 1080p、匯入的音軌或僅有講話者的影片。npx skills add PrunaAI/pruna-skills@p-video-2-pro -y
p-video-2當使用者想要從文字、圖片或匯入的音訊生成精緻的短片時使用 — 1080p B-roll、起始/結束影格動畫、或帶有混音軌的動態鏡頭。不適用於電影級生成音訊的片段或僅有講話者的影片。npx skills add PrunaAI/pruna-skills@p-video-2 -y
p-video當使用者想要從文字或圖片生成簡單的短片時使用 — 快速 B-roll、草稿、或起始/結束影格動畫。不適用於需要電影級生成、最高品質、精確嘴型同步或在 1080p 下匯入音訊的情況。npx skills add PrunaAI/pruna-skills@p-video -y
p-video-replace當使用者想要在現有素材中替換人物、服裝或產品,同時保持攝影機運鏡和音訊不變時使用。npx skills add PrunaAI/pruna-skills@p-video-replace -y
p-video-animate當使用者想要讓一張照片像另一支影片一樣動起來時使用 — 動作轉移、舞蹈混搭、或從模板片段衍生出表演變化。npx skills add PrunaAI/pruna-skills@p-video-animate -y
video-editing當使用 ffmpeg 組合或修飾已渲染完成的片段時使用 — 拼接、交叉淡變、內嵌字幕、文字/標誌疊加、前/後對比滑桿、背景音樂、平台匯出 — 或使用 Hyperframes 組合多層 HTML 影片時。不適用於 AI 影片生成、提示詞設計或基於模型的影片編輯。npx skills add PrunaAI/pruna-skills@video-editing -y

HTTP (curl)

上傳來源影片

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: ${PRUNA_API_KEY}" \
  -F "content=@/path/to/source-video.mp4"

使用回應中的 urls.get 作為 input.video 的值。來源影片最長長度:15 秒。

可選的參考圖片

curl -X POST "https://api.pruna.ai/v1/files" \
  -H "apikey: ${PRUNA_API_KEY}" \
  -F "content=@/path/to/reference-image.png"

使用每個回應中的 urls.get 作為 input.images 的值(最多 4 張;支援 jpg、jpeg、png、webp)。

建立(非同步 — 建議使用)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-video-edit' \
  -d '{
    "input": {
      "video": "https://api.pruna.ai/v1/files/source-video-abc123",
      "prompt": "Change only the sky to a sunset. Preserve the subject, camera path, and lighting on the foreground."
    }
  }'

輪詢和下載:請遵循 pruna-api 的指南。輸出長度與來源影片相同。計費方式為傳回的每秒計費(標準 $0.045,草稿 $0.025)。速率限制:每分鐘 50 個請求。

在撰寫提示詞前,請先完成 generation-diversity 的隨機種子儀式 — 請勿將儀式字串作為 API 的 seed 參數傳遞。僅在使用者要求可重現性時,才傳入可選的 seed。

建立(同步 — 僅供快速測試)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-video-edit' \
  -H 'Try-Sync: true' \
  -d '{
    "input": {
      "video": "https://api.pruna.ai/v1/files/source-video-abc123",
      "prompt": "Change only the sky to a sunset. Preserve the subject, camera path, and lighting on the foreground.",
      "draft": true
    }
  }'

生成前

  1. 完成先決條件指南的閱讀順序(generation-diversity → video-prompting)。
  2. 進行儀式性隨機種子設定 → 草擬動態且忠誠的 prompt(參考上方章節)→ 確認 video(≤15 秒)、prompt、可選的 images(0–4)、draft、save_audio 和編輯意圖(屬性 / 移除 / 新增 / 環境 / 重新打光 / 文字 / 參考引導)。
  3. Pruna 注意事項: 每次執行只做一個主要變更。身分或產品匹配來自可選的 images;編輯指令則位於 prompt 中。模糊的目標和全新的場景會降低品質。請勿傳送 task 欄位 — 公開 API 中沒有此欄位。

必要輸入

  • video(字串 URL):要編輯的來源影片。最長長度:15 秒
  • prompt(字串):描述編輯內容的文字指令

常見可選欄位

  • images(最多 4 個字串 URL 的陣列):用於參考引導編輯的參考圖片(支援 jpg、jpeg、png、webp)
  • prompt_upsampling(布林值,預設 true)
  • draft(布林值,預設 false):更快、品質較低的預覽;每輸出秒計費 $0.025
  • save_audio(布林值,預設 true)
  • seed(整數):僅為確保可重複執行時設定

常見後續步驟

使用此技能後常見的後續動作:

技能描述安裝指令
p-video-replace當使用者想要在現有素材中替換人物、服裝或產品,同時保持攝影機運鏡和音訊不變時使用。npx skills add PrunaAI/pruna-skills@p-video-replace -y
p-image-edit當使用者想要編輯現有照片時使用 — 更換服裝或背景、從參考圖片合成、或套用提示詞驅動的編輯。npx skills add PrunaAI/pruna-skills@p-image-edit -y
video-editing當使用 ffmpeg 組合或修飾已渲染完成的片段時使用 — 拼接、交叉淡變、內嵌字幕、文字/標誌疊加、前/後對比滑桿、背景音樂、平台匯出 — 或使用 Hyperframes 組合多層 HTML 影片時。不適用於 AI 影片生成、提示詞設計或基於模型的影片編輯。npx skills add PrunaAI/pruna-skills@video-editing -y

Individual skills in this repo

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

PrunaAI/pruna-skills

Use when someone needs spoken narration or voiceover — explainer tracks, documentary lines, or voice to pair with generated video.

PrunaAI/pruna-skills

Use when someone wants an original AI song with vocals — sung lyrics, a style prompt track, or source audio for a music video.

PrunaAI/pruna-skills

Use when someone needs word-level timestamps from audio — lyric alignment, cut-safe line boundaries, or caption source timing before burn-in with video-editing.

PrunaAI/pruna-skills

Use before any Pruna or Replicate HTTP call — credentials, upload/poll/download, parallel batches, and agent safety.

PrunaAI/pruna-skills

Use when assembling or polishing already-rendered clips with ffmpeg — concat, crossfades, burned captions and subtitles, text/logo overlays, before/after sliders, background music beds, platform export — or when composing a multi-layer HTML combination video with Hyperframes. Not for AI video generation, prompt craft, or model-based video edits.

PrunaAI/pruna-skills

Use when crafting video or motion prompts for any generative model — dramaturgy, camera, physics-safe motion, frame anchors, and clip chaining.

PrunaAI/pruna-skills

Use when someone wants to edit an existing photo — change outfits or backgrounds, compose from reference images, or apply prompt-driven edits.

PrunaAI/pruna-skills

Use when someone explicitly wants the fastest, cheapest photo generation — mood boards, bulk panels, or quick iterations — not when controlled photoreal or in-image text is needed.

PrunaAI/pruna-skills

Use when someone wants virtual try-on — dress a person in clothes from reference photos for fashion or ecommerce.

PrunaAI/pruna-skills

Use when installing the full Pruna generative media suite — all guides, tools, and workflows in one package.

PrunaAI/pruna-skills

Use when someone wants a cinematic clip from text or start/end frames — product ads, documentary shots, or dialogue with generated audio. Not for 1080p, imported audio tracks, or talking-head-only hosts.

PrunaAI/pruna-skills

Use when someone wants a polished short clip from text, images, or imported audio — 1080p B-roll, start/end frame animation, or a motion shot with a mixed track. Not for cinematic generated-audio clips or talking-head-only hosts.

PrunaAI/pruna-skills

Use when someone wants a simple short clip from text or images — quick B-roll, drafts, or start/end frame animation. Not when the brief needs cinematic generation, highest quality, tight lip-sync, or imported audio at 1080p.

相關技能