Communitygithub.com

UGC 视频自动生成 — 全管道 Playwright

完整 UGC 广告视频管道:在 Higgsfield 上生成角色图像,然后通过 Seedance 2.0 创建视频。自动协调从图像提示到成品 UGC 视频的完整流程。

UGC 视频自动生成 — 全管道 Playwright 是什么?

该技能是一个全自动的 Playwright 管道,用于在 Higgsfield 平台上创建 UGC 广告视频。它分两个阶段工作:首先在 /image/soul-v2 上生成角色图像,然后在 /create/video?model=seedance_2_0 上利用生成的图像创建 Seedance 2.0 视频。该技能自动化了完整的端到端流程,包括导航、填写图像提示、确认生成、处理 Lexical 富文本编辑器以及监控视频生成状态。它需要用户登录到 Higgsfield 并启用 Playwright MCP 插件。该技能特别适用于需要快速制作 UGC 风格广告内容的开发者或内容创作者,支持多种视频风格(如推荐、产品展示、开箱、前后对比、生活方式)。通过工具化处理浏览器交互,它确保了流程的可靠性和可重复性,并内置了错误处理机制来处理常见的平台问题。

兼容平台✓Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/AKCodez/higgsfield-claude-skills/tree/HEAD/ugc-video-auto

在你喜欢的 AI 中提问

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

文档

UGC 视频自动 — 全管道 Playwright

本技能在 Higgsfield 上编排完整的 UGC 广告视频管道:生成角色图像 → 选择图像用于视频 → 添加 UGC 视频提示 → 生成 Seedance 2.0 视频。全程通过 Playwright 自动完成。


管道概览

步骤 1: 生成角色图像  →  /image/soul-v2
步骤 2: 导航至视频页面    →  /create/video?model=seedance_2_0
步骤 3: 从图库中选择图像 →  上传对话框 → "图像生成" 标签
步骤 4: 编写 UGC 视频提示 →  Lexical 编辑器 (contenteditable)
步骤 5: 配置并生成      →  点击生成

前提条件

  • 用户必须已登录到 Playwright 浏览器会话中的 higgsfield.ai
  • Playwright MCP 插件必须已启用
  • 首次使用每个 Playwright 工具前,请使用 ToolSearch 加载

输入要求

用户需提供:

  1. 角色描述 或预生成的图像提示(调用 /ugc-hot-girl 生成一个)
  2. 产品/品牌背景 — UGC 视频所广告的内容
  3. 视频风格 — 推荐、产品展示、开箱、反应等

可选覆盖:

  • 图像模型: Soul 2.0(默认,最适合肖像)
  • 视频模型: Seedance 2.0(默认)
  • 时长: 5秒, 8秒(默认), 10秒
  • 比例: 自动, 16:9, 9:16 (TikTok/Reels), 1:1
  • 分辨率: 720p(默认), 1080p

完整自动化流程

阶段 1: 生成角色图像

步骤 1.1: 导航至图像生成页面

browser_navigate → url: "https://higgsfield.ai/image/soul-v2"

等待页面加载,截取快照。

步骤 1.2: 输入图像提示

找到文本框(Playwright ID: hf:tour-image-prompt,占位符: "描述你想象中的场景"):

browser_click → ref: <textbox_ref>, element: "图像提示文本框"
browser_type → ref: <textbox_ref>, text: "<角色图像提示>"

如果用户未提供图像提示,先使用 /ugc-hot-girl 生成一个。

步骤 1.3: 生成图像

找到生成按钮(显示 "生成 XXXX 剩余免费生成次数"):

请求用户确认 — 这会消耗积分/免费生成次数。

browser_click → ref: <generate_button_ref>, element: "生成按钮"

步骤 1.4: 等待生成完成

browser_wait_for → time: 20

截取屏幕截图。验证新图像作为历史网格中的第一项出现。通过检查第一个网格元素的 innerHTML 是否包含带有新资源 URL 的 <img> 标签来确认。


阶段 2: 从生成的图像创建视频

步骤 2.1: 导航至 Seedance 2.0 视频页面

browser_navigate → url: "https://higgsfield.ai/create/video?model=seedance_2_0"

等待页面加载,截取快照。确认模型按钮中显示 "Seedance 2.0"。

步骤 2.2: 打开上传媒体对话框

找到上传区域 — 查找包含以下内容的 generic [cursor=pointer]:

  • paragraph: 上传媒体
  • paragraph: 图像, 视频或音频
browser_click → ref: <upload_area_ref>, element: "上传媒体区域"

这将打开一个对话框,包含标签页:上传、图像生成、视频生成、元素、喜欢。

步骤 2.3: 切换到图像生成标签

browser_click → ref: <image_gen_tab_ref>, element: "图像生成标签"

在对话框的标签栏中查找 button "图像生成"。

步骤 2.4: 选择生成的图像

最新生成的图像是网格中的第一项。

它最初显示为 button "检查资格"。点击它:

browser_click → ref: <first_image_ref>, element: "第一个图像(最近生成的)"

点击后,按钮变为一个带有图像预览和绿色复选标记的 generic [cursor=pointer] — 表示它已被选中且有资格。

重要: 列表中第一个 "检查资格" 按钮始终是最新的图像。点击后,其 ref 会从快照中消失,并被新的通用元素替换。

步骤 2.5: 关闭对话框

browser_press_key → key: "Escape"

截取快照。验证:

  • 上传区域不再显示 "上传媒体" 文本
  • 而是显示一个带有嵌套图像元素(48px 缩略图)的 generic [cursor=pointer]
  • 旧的 paragraph: 上传媒体 和 paragraph: 图像, 视频或音频 已消失

步骤 2.6: 清除任何现有提示

视频页面使用 Lexical 富文本编辑器(contenteditable div),而不是标准文本框。要清除它:

browser_evaluate → function: "() => { const el = document.querySelector('[data-lexical-editor]'); el.focus(); el.click(); }"
browser_press_key → key: "Control+a"
browser_press_key → key: "Backspace"

截取快照。现在文本框应显示占位符:"详细描述你的场景。使用 @ 引用资源"

步骤 2.7: 输入 UGC 视频提示

清除后,截取快照以获取新的文本框 ref。然后缓慢输入(Lexical 编辑器需要):

browser_type → ref: <textbox_ref>, text: "<UGC 视频提示>", slowly: true

UGC 视频提示模板(根据风格选择):

推荐 / 主演:

来自 @image1 的女士正在对着镜头说话,带有自然的手势,温暖的金色时刻光线,随意真实的氛围。她热情地说话,稍微前倾以强调。柔和的散景背景,浅景深。自然的皮肤纹理,逼真的嘴唇运动,TikTok UGC 推荐风格。平滑的手持相机,24fps。

产品展示:

来自 @image1 的女士拿着一个产品朝向相机,转动它以显示不同的角度。兴奋真诚的表情,眼睛睁大。环形灯照明,干净的背景。她指着产品的特点,热情地点头。自拍特写取景,iPhone 质量视频,真实的 UGC 感觉。

反应 / 开箱:

来自 @image1 的女士带着兴奋的期待打开包裹,拿出一个产品,并表现出由衷的喜悦。惊讶的表情,嘴巴张开,然后露出灿烂的笑容。自然的卧室照明,随意的环境。手持相机感觉,真实的开箱能量,TikTok 风格。

前后对比:

来自 @image1 的女士开始时持怀疑态度,带着疑虑触摸自己的脸。然后她使用了一个产品,表情转变为惊讶,不敢相信地触摸自己的皮肤。柔和的环形灯,浴室镜环境。分割感觉的转变时刻,真实的反应,UGC 推荐。

生活方式 / 日常生活:

来自 @image1 的女士穿过一个明亮的现代空间,随意地以其作为日常一部分的方式与产品互动。自然的晨光,放松的动作,真实的即兴能量。相机轻柔跟踪,浅景深。有抱负但 relatable 的生活方式内容。

步骤 2.8: 配置视频设置(可选)

默认设置对大多数 UGC 效果良好:

  • 时长: 8秒(适合短视频)
  • 比例: 自动(或 9:16 用于 TikTok/Reels)
  • 分辨率: 720p

要更改比例为 TikTok 竖版:

browser_click → ref: <ratio_button_ref>, element: "比例选择器"

然后从下拉菜单中选择 "9:16"。

步骤 2.9: 生成视频

截取显示最终表单状态的屏幕截图。

请求用户确认 — 视频生成比图像消耗更多积分。

生成按钮显示积分成本(例如 "生成 30 20"):

browser_click → ref: <generate_button_ref>, element: "生成视频按钮"

步骤 2.10: 监控生成进度

点击生成后:

  1. 视频进入生成队列
  2. 检查历史标签页了解进度
  3. 定期截取屏幕截图以显示状态
  4. Seedance 2.0 视频通常需要 1-3 分钟

关键元素模式参考

图像生成页面 (/image/soul-v2)

元素模式
提示文本框textbox 带有 ID hf:tour-image-prompt
模型选择器group > button 包含 "Soul 2.0"
宽高比button 显示 "3:4"
分辨率button 显示 "2k"
生成按钮button "生成 XXXX 剩余免费生成次数"
第一个结果历史网格中的第一个 generic 子元素

视频创建页面 (/create/video)

元素模式
上传区域(空)generic [cursor=pointer] 带有 paragraph: 上传媒体
上传区域(已填写)generic [cursor=pointer] 带有嵌套的图像缩略图,无 "上传媒体" 文本
上传对话框dialog 带有标签栏:上传、图像生成等
图像生成标签对话框中的 button "图像生成"
图库中的第一张图像对话框网格中的第一个 button "检查资格"
选中的图像generic [cursor=pointer] 带有嵌套的 img(替换 "检查资格" 按钮)
提示编辑器[data-lexical-editor] contenteditable div
提示文本框(快照中)聚焦 Lexical 编辑器后的 textbox [active]
模型按钮button "模型" 包含 "Seedance 2.0"
时长按钮button "时长"
比例按钮button "自动比例"
分辨率按钮button "720p 分辨率"
生成按钮button "生成 XX XX" 带有积分成本

错误处理

  • 未登录: 要求用户登录 (! open https://higgsfield.ai)
  • 缺少图像提示栏: 刷新页面 — 这是一个间歇性的平台错误
  • "检查资格" 不转换: 图像可能与 Seedance 2.0 不兼容。尝试其他图像或重新生成
  • Lexical 编辑器无法清除: 尝试三次点击选择所有内容,然后按退格键。或使用 browser_evaluate 清除 innerHTML
  • 对话框无法通过 Escape 关闭: 点击对话框区域外部
  • 积分不足: 在生成前警告用户。视频比图像消耗更多积分
  • 过期的 ref: 每次交互前务必获取新的快照。页面状态更改后,ref 会改变

端到端工作流示例

用户: "为我的新护肤品精华液创建一个由美女推广的 UGC 广告视频"

1. 调用 /ugc-hot-girl → 生成美容/护肤图像提示:
   "有魅力的年轻女性,20岁出头,肌肤清晰水润,深棕色头发扎成凌乱
    发髻... 环形灯照明... 逼真照片,4K..."

2. 阶段 1 — 图像生成:
   → 导航至 /image/soul-v2
   → 输入图像提示
   → 用户确认 → 点击生成
   → 等待 15-20 秒 → 图像出现在网格中 ✓

3. 阶段 2 — 视频创建:
   → 导航至 /create/video?model=seedance_2_0
   → 点击上传区域 → 图像生成标签
   → 点击第一个图像(检查资格)→ Escape
   → 图像加载到表单中 ✓
   → 清除旧提示 → 输入 UGC 推荐提示:
     "来自 @image1 的女士拿着一个小精华液瓶子,带着真诚的好奇心
     检查它。她在指尖蘸取一滴精华液,触碰脸颊,表情因喜悦而
     明亮起来..."
   → 将比例设置为 9:16 以适配 TikTok
   → 用户确认 → 点击生成
   → 视频生成中... 完成 ✓

4. 报告: "您的 UGC 视频已准备好!请查看历史标签。"

管道技能参考

步骤技能作用
1/ugc-hot-girl生成角色图像提示
2/higgsfield-image-auto仅自动化图像生成步骤
3/seedance-auto-generate仅自动化视频生成步骤(从本地文件)
完整/ugc-video-auto本技能 — 端到端运行整个管道

您可以单独使用各个技能,或者调用 /ugc-video-auto 一次性运行所有内容。

Individual skills in this repo

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

AKCodez/higgsfield-claude-skills

Generate cinematic film-style video prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants cinematic, film-like, movie-quality, Hollywood-style, dramatic, or professional film-quality AI video. Triggers on: cinematic, film look, movie scene, dramatic lighting, depth of field, lens flare, anamorphic, letterbox, noir, epic, Steadicam, dolly, crane shot, or any cinematic video generation request. Always use this skill even if the user doesn't explicitly say "cinematic" but describes a film-like aesthetic.

AKCodez/higgsfield-claude-skills

Generate 3D CGI and rendered video prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants 3D rendered, CGI, Pixar-style, Unreal Engine, photorealistic 3D, computer-generated, or digitally rendered video content. Triggers on: 3D animation, CGI, rendered, Blender, Unreal Engine, octane render, ray tracing, volumetric, subsurface scattering, physically based rendering, or any 3D/CG video request. Always use even if the user just says "make it look 3D" or describes a rendered aesthetic.

AKCodez/higgsfield-claude-skills

Generate cartoon and animation style video prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants cartoon, 2D animation, cel-shaded, hand-drawn, illustrated, flat animation, or motion graphics animation style video. Triggers on: cartoon, animation, cel shading, hand-drawn, illustrated, flat design animation, vector animation, retro cartoon, rubber hose, motion graphics, or any cartoon/animated style request. Use even for vague requests like "make it look animated" or "fun colorful style.

AKCodez/higgsfield-claude-skills

Convert comic book panels, manga pages, webtoons, and illustrated storyboards into animated video using Seedance 2.0 on Higgsfield. Use whenever the user wants to animate comics, bring illustrations to life, convert manga to video, animate storyboards, or create motion from static sequential art. Triggers on: comic to video, manga animation, panel animation, storyboard to video, webtoon animation, comic book motion, sequential art, graphic novel animation, or any illustrate-to-animate request. Use even when user says "make this drawing move" or "animate this page.

AKCodez/higgsfield-claude-skills

Generate e-commerce product advertisement video prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants product ads, e-commerce videos, product showcases, unboxing, product demos, shopping ads, fashion ads, beauty ads, food ads, or any commercial product video for online selling. Triggers on: product ad, e-commerce, product showcase, Amazon video, Shopify ad, Instagram shop, TikTok shop, product commercial, fashion video, beauty ad, food ad, product demo, dropshipping video, or any product promotional video request. Use even for "make a video for my product" or "product promo.

AKCodez/higgsfield-claude-skills

Generate product 360° turntable, multi-angle showcase, and product reveal video prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants a product rotation video, turntable showcase, product reveal, 360 view, multi-angle product display, product beauty shot, hero product video, or unboxing reveal. Triggers on: product 360, turntable, product rotation, multi-angle, product reveal, product showcase, hero shot, beauty shot, product spin, unboxing, or any request to showcase a physical product from multiple angles. Use even for "show my product from all sides" or "make a product video.

AKCodez/higgsfield-claude-skills

Generate music video and beat-synced visual content prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants to create a music video, lyric video, beat-synced visuals, performance video, concert visual, album art animation, or music-driven visual content. Triggers on: music video, lyric video, beat sync, music visualization, performance video, concert visual, album visual, song video, music clip, beat drop visual, rhythm sync, or any music-driven video request. Use even for "make visuals for my song" or "video for this track.

AKCodez/higgsfield-claude-skills

Generate viral social media hook video prompts for TikTok, Instagram Reels, and YouTube Shorts using Seedance 2.0 on Higgsfield. Use whenever the user wants to create scroll-stopping hooks, viral short-form video, attention-grabbing openers, TikTok content, Reels content, Shorts content, or any social-media-optimized video. Triggers on: social media video, TikTok, Instagram Reels, YouTube Shorts, viral video, hook, scroll-stopper, short-form, trending, engagement, views, or any request for social media video content. Use even for "make something that gets views" or "viral content.

AKCodez/higgsfield-claude-skills

Generate brand storytelling and narrative video prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants to create a brand story video, company origin story, mission video, about us video, brand film, corporate narrative, founder story, brand anthem, company culture video, or emotional brand content. Triggers on: brand story, brand video, company story, origin story, about us, mission video, brand film, brand anthem, corporate video, company culture, founder story, brand narrative, or any request for brand/company storytelling video. Use even for "tell our company story" or "make a video about our mission.

AKCodez/higgsfield-claude-skills

Generate real estate, architecture, and interior design showcase video prompts for Seedance 2.0 on Higgsfield. Use whenever the user wants property tours, real estate listings, architecture showcases, interior design videos, home staging content, property marketing, virtual tours, construction reveals, or any real estate/architecture video. Triggers on: real estate, property, house, apartment, architecture, interior design, home tour, listing video, property marketing, virtual tour, building, construction, renovation, home staging, or any real estate/architecture video request. Use even for "make a video for my listing" or "showcase this property.

AKCodez/higgsfield-claude-skills

Generate a detailed AI image prompt for creating an attractive female UGC ad character. Use when the user wants to create a "hot girl" character image for UGC ads, influencer-style content, product testimonials, or social media ad creatives. Triggers on requests like "create a UGC girl", "hot girl for ads", "female influencer image", "UGC character", "testimonial girl", or any request for a female character for ad/UGC content.

相关技能