Communitygithub.com

PrunaAI/pruna-skills

用于通过文本指令编辑现有视频——重新着色、重新样式化、移除或添加对象、更改环境或光照、更新屏幕文本,或应用可选的参考引导产品和配件编辑。不适用于从零开始创建新片段或ffmpeg组装。

pruna-skills 是什么?

该技能允许用户通过自然语言指令对现有视频进行精确编辑,支持重新着色、重新样式化、对象增删、环境与光照调整、屏幕文本更新,以及基于参考图像的引导式产品和配件编辑。用户需提供不超过15秒的源视频URL和描述所需修改的文本提示,并可选择上传0至4张参考图像。技能的核心是“动态+忠实”提示工程,要求明确描述要更改的内容以及必须保持不变的部分,以避免意外改变摄像头、运动、音频等未提及的元素。每次运行只做一项主要更改,支持异步和同步两种API调用,按输出时长计费。该技能适用于需要对现有视频进行有针对性修改的场景,而非生成全新片段或进行角色替换。

兼容平台~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

遵循每个技能的 生成前 / 设计部分——此处不再重复指南内容。

智能体习惯

在第一次回复中,用反引号标注 `p-video-edit`,确认 PRUNA_API_KEY(否则停止并提供pruna-api中的注册链接),然后询问源视频(最长15秒)和编辑需求。开始收集信息 → 在首次POST前进行generation-diversity的澄清性采集。用提示设计(动态+忠实) 来起草编辑内容——不要粘贴技能示例。当何时不使用更合适时,请重定向。

提示设计(动态+忠实)

prompt 是精准的且锁定请求。每次运行只做一项主要更改。描述期望的最终状态,然后指明哪些必须保持不变。只更改用户要求的内容;保持镜头、运动、音频和未提及的元素不变。

正确做法错误做法
公式:只更改[X]。保持[几何/运动/镜头/光照/未提及主体]不变。模糊的让它更好/仅情绪描述,凭空创造新场景
明确指出每个必须保留的内容(主体、镜头路径、光照、道具)省略保留条款,期望模型自行保留
起草前进行仪式化种子设定;在需求允许时对保留条款使用全新措辞当用户描述的编辑不同时,直接复制本技能的示例(黄昏天空)
使用参考图像时指明:从第一张参考图像中添加配件模糊地使用参考图像,未指定来源槽
在措辞未锁定时,在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": "只把天空改为黄昏。保持主体、镜头路径和前景光照不变。"
    }
  }'

轮询并下载:遵循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": "只把天空改为黄昏。保持主体、镜头路径和前景光照不变。",
      "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.

相关技能