Communitygithub.com

PrunaAI/pruna-skills

用于从文本、图像或导入的音频生成精美短片的技能 —— 支持1080p B-roll、首尾帧动画或带有混合音轨的动态镜头。不适用于电影级生成音效片段或仅含主持人的口播视频。

pruna-skills 是什么?

该技能封装了Pruna的`p-video-2`模型API,专为需要从文本/图像/音频快速生成高质量短片的场景设计。它支持1080p分辨率、自定义帧率(24/48fps)、首尾帧锚定动画以及上传外部音轨驱动的口型同步视频,单次调用仅生成一个片段。技能内置了完整的提示词工程流水线:从`generation-diversity`的随机种子仪式、`video-prompting`的镜头语言模板到`audio-prompting`的音频同步规则,确保每次生成的提示词都动态且忠实于用户需求。当请求涉及多场景拼接、纯电影级生成(`p-video-2-pro`)、动作迁移(`p-video-animate`)或仅口播头像(`p-video-avatar`)时,技能会主动建议转向更合适的工具。该技能在Cline/Claude Code等智能体环境中运行,通过激活`@pruna`关联的辅助技能包,智能体可在首次回复中确认API密钥、引导用户提供必要参数,并自动跳出纯粹示例的粘贴,转而创造性地编写符合用户意图的提示词。

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

在你喜欢的 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
audio-prompting为任何音频生成模型(TTS、音乐或背景音)编排提示词时使用 —— 导演风格、歌曲结构和后期制作分层。npx skills add PrunaAI/pruna-skills@audio-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-2` 是 1080p / 导入音频 / 草稿 片段生成器(文本/图像/音频)。`p-video-2-pro` 用于 电影级生成,配合生成的音频(480p/768p,首尾帧,不支持上传音频)。`p-video` 用于更简单、更快速的片段。仅含主持人(无原生场景音频)→ `p-video-avatar`。对现有视频进行指令编辑 → `p-video-edit`。

在 第一次回复 中,用反引号标出 `p-video-2`,确认 PRUNA_API_KEY(若无则提示注册链接,来自 pruna-api),然后询问所需输入。开始获取需求 → 在首次 POST 前进行 generation-diversity 澄清确认。当编写运动提示词时,请遵循 提示词编排(动态 + 忠实) 和 video-prompting(p-video-2-prompting)—— 不要粘贴技能示例。当 不适用时 的条件更匹配时,请引导用户使用更合适的技能。

提示词编排(动态 + 忠实)

每个 input.prompt 必须 新颖且具体,并且必须 符合用户的需求节奏。多样性永远不能覆盖需求要点。相对 p-video 的差异点:见 video-prompting(p-video-2-prompting)。

应该做不应该做
执行 generation-diversity 的随机种子仪式;声明;当需求允许时,旋转≥2个自由轴(运镜变化、光照变化、纹理、节奏)复制本技能中的curl示例(sports car、person turns等)或复用先前会话的提示词
首先固定用户要求的事实(主体、动作节奏、帧锚定时的 OPEN/MID/CLOSE、设置 audio 时的旁白同步)为了“更酷”的片段而替换主体或动作,忽略原始请求
使用 video-prompting 的戏剧结构编排 —— 每个节拍一个冻结动作,稳定的相机适用于 I2V,物理安全的运动模糊的情绪化字符串(cinematic vibe, neon energy)或极端的电影级运镜
当设置了 audio,运动和节奏必须 与旁白/表演节拍匹配;将说话者控制在 一个或两个在VO播放时偏离到无关动作,或在片段中出现3个以上说话人脸
在用户未确认措辞前,在 POST 之前展示草拟的提示词及模式字段以不同的主体或节拍静默重新生成,与已批准的内容不符

忠实度检查(付费前): 如果你从提示词中删除了用户指定的主体/动作/场景,那么作业就是错误的 —— 请重写。自由轴只能填充需求中未指定的部分。

展示草拟提示词时,仍需标出 `p-video-2`(辅助技能帮助编排;此工具拥有调用权)。

技能边界

本技能 = 每次调用 一个 p-video-2 预测。

超出范围(不得通过本技能执行):

  • 多场景拼接、串联、子智能体编排或并行场景批次
  • 电影级生成,配合生成的音频(无导入音轨)→ p-video-2-pro
  • 从模板视频进行动作迁移 → p-video-animate
  • 仅含主持人/口型同步主持人,无原生场景音频 → p-video-avatar
  • 对现有视频进行指令编辑 → p-video-edit

如果请求超过一个片段,停止并推荐:image-to-video(一个叙事节拍),visual-transition-reel(多场景视觉),或 narrated-multi-scene(多场景 + VO)。

不适用时

请使用更合适的技能:

技能描述安装命令
p-video-2-pro当用户需要从文本或首尾帧生成电影级片段时使用 —— 产品广告、纪录片镜头或带有生成音频的对白。不适用于1080p、导入音频轨或仅含主持人的口播视频。npx skills add PrunaAI/pruna-skills@p-video-2-pro -y
p-video当用户需要从文本或图像生成简单的短视频片段时使用 —— 快速B-roll、草稿或首尾帧动画。不适用于需要电影级生成、最高质量、紧密口型同步或1080p导入音频的场景。npx skills add PrunaAI/pruna-skills@p-video -y
p-video-avatar当用户想要一个人物在镜头前朗读脚本时使用 —— 口型同步主持人、发言人或基于头像照片的叙事化身。npx skills add PrunaAI/pruna-skills@p-video-avatar -y
p-video-animate当用户想要一张照片像另一段视频那样运动时使用 —— 动作迁移、舞蹈混剪或基于模板片段的表演变体。npx skills add PrunaAI/pruna-skills@p-video-animate -y
p-video-replace当用户想要在现有视频中替换人物、服装或产品,同时保持运镜和音频不变时使用。npx skills add PrunaAI/pruna-skills@p-video-replace -y
p-video-edit当用户想要通过文本指令编辑现有视频时使用 —— 重新着色、重新风格化、移除或添加物体、改变环境或光照、更新屏幕文本,或应用可选的参考引导的产品和配饰编辑。不适用于从头开始生成新片段或ffmpeg拼接。npx skills add PrunaAI/pruna-skills@p-video-edit -y
video-editing当使用ffmpeg组装或润色已渲染的片段时使用 —— 拼接、交叉淡入淡出、烧录字幕、文字/Logo叠加、前后对比滑块、背景音乐、平台导出 —— 或使用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/first-frame.png"

将 urls.get 作为 input.image(首帧)和/或 input.last_frame_image(尾帧)传入。以相同方式上传 TTS/音乐作为 input.audio。

创建(异步文生视频 — 推荐)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-video-2' \
  -d '{
    "input": {
      "prompt": "A sports car drifting through a neon-lit city at night, cinematic aerial shot",
      "duration": 5,
      "resolution": "720p",
      "aspect_ratio": "16:9"
    }
  }'

轮询并下载:遵循 pruna-api。

在编写提示词前先完成 generation-diversity 的随机种子仪式—— 不要将仪式字符串作为 API seed 传递。

计费按返回的秒数(而非请求的 duration)。速率限制:每分钟250次请求。

分辨率draft=falsedraft=true
720p$0.025 / s$0.015 / s
1080p$0.05 / s$0.03 / s

首/尾帧(视觉转场)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-video-2' \
  -d '{
    "input": {
      "prompt": "OPEN: hold wide on wet alley, neon flicker. MID: slow dolly in, rain ticks on pavement. CLOSE: settle on end pose.",
      "image": "https://api.pruna.ai/v1/files/START_ID",
      "last_frame_image": "https://api.pruna.ai/v1/files/END_ID",
      "duration": 5,
      "resolution": "720p",
      "fps": 24
    }
  }'

场景锚定点三重组合(image + last_frame_image + audio)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-video-2' \
  -d '{
    "input": {
      "prompt": "Close-up of a singer performing the uploaded track. Natural lip-sync, expressive face, stage lighting, camera holds steady on the performer.",
      "image": "https://api.pruna.ai/v1/files/SCENE_START",
      "last_frame_image": "https://api.pruna.ai/v1/files/SCENE_END",
      "audio": "https://api.pruna.ai/v1/files/SCENE_NARRATION",
      "resolution": "720p",
      "fps": 24,
      "save_audio": true
    }
  }'

当设置 audio 时,省略 duration。片段长度 = min(音频长度, 20s) —— 保持TTS ≤ ~19s(渲染前使用 ffprobe)。音频条件作业按音频长度计费。

创建(同步 — 仅限快速测试)

curl -X POST 'https://api.pruna.ai/v1/predictions' \
  -H 'Content-Type: application/json' \
  -H "apikey: ${PRUNA_API_KEY}" \
  -H 'Model: p-video-2' \
  -H 'Try-Sync: true' \
  -d '{
    "input": {
      "prompt": "A sports car drifting through a neon-lit city at night, cinematic aerial shot",
      "duration": 5,
      "resolution": "720p",
      "draft": true
    }
  }'

生成前准备

  1. 按顺序阅读前置条件指南(generation-diversity → video-prompting)。
  2. 执行随机种子仪式 → 草拟 动态 + 忠实 的运动提示词(见上文)→ 与用户确认 模式(T2V / I2V / 帧对 / 音频)、duration(省略则让模型从提示词中自动选择,或音频驱动时省略)、resolution、fps、draft 和 prompt。
  3. Pruna 备注: 当设置了 image,aspect_ratio 被忽略。当设置了 audio,省略 duration 并保持 save_audio: true(默认)以保留旁白。对于 镜头前说话,首选 T2V 原生语音(save_audio: true,无导入 audio)—— 停顿/台词/休息时的口型同步是相对 p-video 的质量提升。导入的 audio 保持更干净的面部;视位锁定效果不稳定 —— 不要将混音的 wav 视为口型同步演示。在 draft: true 下迭代,最终使用 draft: false。如果请求是多场景 —— 停止(见技能边界)。不支持原生4K。

必需输入

  • prompt (字符串)

常用可选字段

字段作用
image首帧 —— I2V 锚点;设置后 aspect_ratio 被忽略(支持 jpg, jpeg, png, webp)
last_frame_image可选的结束状态静态图
audio音频条件;时长跟随音频(上限 20s);支持 flac/mp3/wav
duration1–20s;留空 让模型从提示词中选择长度;如果设置了 audio 则忽略
resolution720p(默认)或 1080p
fps24(默认)或 48
aspect_ratio当无 image 时:16:9(默认),9:16,4:3,3:4,3:2,2:3,1:1
drafttrue = 更便宜、更快的预览(720p 时 $0.015/s,1080p 时 $0.03/s);false(默认)= 最终版
save_audio保留模型生成或上传的音频在输出中(默认 true)
prompt_upsampling增强提示词(默认 true)
seed, disable_safety_filter可复现性 / 客户端策略

相关

相关技能:

技能描述安装命令
p-video-2-pro当用户需要从文本或首尾帧生成电影级片段时使用 —— 产品广告、纪录片镜头或带有生成音频的对白。不适用于1080p、导入音频轨或仅含主持人的口播视频。npx skills add PrunaAI/pruna-skills@p-video-2-pro -y
p-video当用户需要从文本或图像生成简单的短视频片段时使用 —— 快速B-roll、草稿或首尾帧动画。不适用于需要电影级生成、最高质量、紧密口型同步或1080p导入音频的场景。npx skills add PrunaAI/pruna-skills@p-video -y
gemini-3.1-flash-tts当用户需要语音旁白或画外音时使用 —— 解说音轨、纪录片台词或与生成视频搭配的声音。npx skills add PrunaAI/[email protected] -y
image-to-video当用户想要从图像生成一个简短的电影节拍时使用 —— 一个叙事场景、故事瞬间或带有可选画外音的电影级B-roll。npx skills add PrunaAI/pruna-skills@image-to-video -y
visual-transition-reel当用户想要带转场的蒙太奇时使用 —— 动作序列片段或可选的带旁白的多场景作品。npx skills add PrunaAI/pruna-skills@visual-transition-reel -y
narrated-multi-scene当用户想要一个带画外音的多部分故事时使用 —— 分集B-roll、分章节宣传片或几个无镜头对话的关联视频场景。npx skills add PrunaAI/pruna-skills@narrated-multi-scene -y
p-video-avatar当用户想要一个人物在镜头前朗读脚本时使用 —— 口型同步主持人、发言人或基于头像照片的叙事化身。npx skills add PrunaAI/pruna-skills@p-video-avatar -y
p-video-animate当用户想要一张照片像另一段视频那样运动时使用 —— 动作迁移、舞蹈混剪或基于模板片段的表演变体。npx skills add PrunaAI/pruna-skills@p-video-animate -y
video-editing当使用ffmpeg组装或润色已渲染的片段时使用 —— 拼接、交叉淡入淡出、烧录字幕、文字/Logo叠加、前后对比滑块、背景音乐、平台导出 —— 或使用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 to edit an existing video with a text instruction — recolor, restyle, remove or add objects, change environment or lighting, update on-screen text, or apply optional reference-guided product and accessory edits. Not for a new clip from scratch or ffmpeg assembly.

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.

相关技能