Communitygithub.com

josueh04/product-video-skills

一次性提取产品的所有视频共用元素(设计令牌、字体子集、图标子集、Logo、虚拟演员、名称映射、发音、禁用词和只读工具列表),并写入 kit/ 和 product.yaml。在产品初始化、kit 缺失或不全、视频需要新图标/字体/Logo、需要演示名称/假客户/电话/邮箱、品牌词发音错误或旧产品名出现时使用,同时用于验证演示数据完全虚拟。

product-video-skills 是什么?

该技能针对产品视频制作场景设计,核心思想是“一次提取,多次复用”。它自动从产品仓库中收集并生成所有视频共享的资源集(kit),包括设计令牌(如主色、主题选择器)、字体子集(WOFF2格式,含许可证文件)、图标子集(SVG,来自产品自己的图标包)、Logo(浅色/深色/应用磁贴三种变体)、虚构演员表(推荐一套完整的虚拟姓名和联系方式)、规范名称与旧名映射、品牌词发音、禁用词列表以及只读工具列表。技能同时更新 `product.yaml` 中的 `brand.*`、`cast`、`names`、`pronounce`、`banned_terms` 等关键配置。它支持 Claude Code 等基于SKILL.md的AI代理平台,通过一系列 Python 脚本(位于 `scripts/` 目录)自动化执行每个步骤,并提供验证检查(如 `check_cast.py`)。其价值在于消除了视频创作中的重复劳动、命名冲突、非虚构数据泄露以及品牌一致性丢失等痛点,确保所有视频作品从一开始就具备高质量的、一致的品牌资产和虚构数据。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/josueh04/product-video-skills/tree/HEAD/skills/product-kit

在你喜欢的 AI 中提问

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

文档

产品套件 (Product Kit)

每个产品的所有视频都从同一个套件(kit)中获取素材,因此套件只需一次性提取、一次性审批,然后重复使用。在制作这些技能所来源的生产过程中,零散地执行这些操作代价高昂:有一次未经询问就下载了图标字体,接着在获得批准后又下载了三次,中间还有一个子代理从浏览器扩展文件夹内的字体中提取了两个字形;同一个演示客户在两个视频中出现了两个不同的姓氏,因为需要否决的名称列表从未得到回复;一个重命名的产品在屏幕上保留了旧名称,直到审核人员发现。

开始之前

  • 源文件必须固定版本(sources.lock、sources/<role>/)。如果不是,请先运行 source-recon:每个套件文件都要引用已锁定的提交。
  • 对于套件所需的所有下载(字体包、仓库中不存在的图标包),一次性地在一个列表中询问,包含内容、来源和大致的文件大小。未经明确同意,不得下载任何内容,并且绝不允许从浏览器配置文件或扩展文件夹中获取。
PVS_HOME="$(cd "$(cd "${CLAUDE_SKILL_DIR}" && pwd -P)/../.." && pwd)"
K="$PVS_HOME/skills/product-kit/scripts"

1. 令牌 (Tokens)

运行 ui-spec-from-code 的解析器来处理产品的主题,并将其描述的渲染事实(runtime rem、主题选择器、实际加载的字体)写入 kit/render-facts.md:

"$PVS_HOME/bin/pvs-py" "$PVS_HOME/skills/ui-spec-from-code/scripts/resolve_tokens.py" <product_dir> \
  [--theme-selector "<dark selector>"]

根据产品用作主色的令牌,在 product.yaml 中设置 brand.accent,并注明引用来源。

2. 字体 (Fonts)

找出应用程序实际加载的字体(link 标签、@font-face、锁定文件中的字体包),而不仅仅是 CSS 中提到的名称。从仓库或已安装的包中提取字体文件(例如 node_modules 中的 @fontsource/<family> 包);如果字体只存在于 Web 字体服务中,则需要用户批准才能下载。然后进行子集化:

"$PVS_HOME/bin/pvs-py" "$K/subset_fonts.py" <product_dir> <font files...> \
  [--text-file videos/*/audio/lines.tsv] [--license OFL-1.1] [--source <citation>]

该脚本会将子集化后的字体写入 kit/fonts/<family>-<weight>.woff2,重建 kit/fonts/fonts.css(font-display: block,确保渲染时不会先绘制回退字体),复制在字体旁边或其包中找到的许可证文本(OFL 要求文本随字体一起分发),并将来源、许可证和许可证文件记录在 kit/fonts/fonts.md 中。如果字体许可证为“未知”或许可证文件“缺失”,则视为未就绪:请找到它们或询问用户。在 product.yaml 中设置 brand.font。对于通过连字工作的图标字体,请传递 --all-features,并将连字名称作为 --text 传递,同时检查每个名称都能渲染为字形,而非字母。

3. 图标 (Icons)

从 ui-spec-from-code 的图标提取结果(或从规格说明中)获取图标列表,按包分组。从产品自己的包中复制它们:

"$PVS_HOME/bin/pvs-py" "$K/collect_icons.py" <product_dir> --package <dir with svg files> \
  --names calendar,check,plus [--variant outline/24] [--prefix bx-] [--clean]

该脚本会将每个 SVG 复制到 kit/icons/<set>-<name>.svg,并向 kit/icons/icons.md 添加一行(文件、名称、集合、来源引用、许可证)。如果名称缺失或存在歧义,脚本会失败,而不会选择相似图标,因为正是近似误导的图标导致审核人员拒绝了整个初版。对于仅以图标字体形式存在的图标:对该字体进行子集化(第 2 节),并从库自己的 CSS 中获取码位;构建过程必须在遇到未知名称时失败。

4. 标志 (Logos)

仅从仓库的资源(或用户提供的品牌包)中获取:绝不允许重绘、描摹或从网站上获取。列出候选文件,查看它们,然后复制三种变体:

"$PVS_HOME/bin/pvs-py" "$K/collect_logos.py" <product_dir>            # 在 sources/ 中查找候选
"$PVS_HOME/bin/pvs-py" "$K/collect_logos.py" <product_dir> --light frontend/assets/logo.svg \
  --dark frontend/assets/logo-white.svg --tile frontend/public/icon-512.png [--root <brand folder>]

脚本会分别写入 kit/logos/logo-light.*(用于浅色背景)、logo-dark.*(用于深色背景)和 app-tile.*(方形图标),当产品有 SVG 时优先使用 SVG 格式,并在 kit/logos/logos.md 中为每个文件添加一行带引用的记录;它拒绝接受 URL。然后在 product.yaml 中设置 brand.logo_light、brand.logo_dark 和 brand.app_tile 为脚本输出的路径。在每个视频中根据背景选择变体:浅色标志放在白色页面上会消失,这在原始生产过程中发生过。

5. 演员表 (Cast)

从第一帧起,演示数据就完全是虚构的,并且每个视频中保持一致。阅读 references/cast-and-names.md 了解保留的数字范围和域名。在一个单一的是非题中提出一套完整的演员表,并将你的提议作为推荐默认值:

每个 Acme Tasks 视频的演示演员表(推荐:直接使用): Northwind Bakery, Portland OR (northwind.example);所有者 Maya Lindqvist, [email protected];客户 Omar Haddad, +1 503 555 0172。使用它,还是需要更改哪些名字?

全名,每人一个姓氏,永久保留;电话在 555-0100 到 555-0199 范围内;电子邮件和网站使用保留域名。审核人员会基于品味否决名称(在原始制作中,一个平淡无奇的名字被拒绝了),所以请在做任何动画之前先询问。如果审核人员没有回复,请说明你将冻结该提议,然后冻结它:沉默绝不能导致同一个人物产生两个版本。将结果写入 product.yaml 中的 cast: 字段,并检查:

"$PVS_HOME/bin/pvs-py" "$K/check_cast.py" <product_dir>

该脚本会在以下情况下失败:缺少姓氏、名字带有两个姓氏、电话不是 555 开头或不虚构、电子邮件或网站使用看起来真实的域名。

6. 名称、发音、禁用词

询问用户,然后写入 product.yaml:

  • names:规范名称到必须永远不出现的旧字符串(实时 UI 或代码中可能仍会显示的旧产品名)的映射。每个视频都使用规范名称,即使真实 UI 落后于它;在渲染之前,grep 会查找遗留的旧名称。
  • pronounce:品牌词到语音引擎可以正确发音的拼写(在原始制作中,一个自创的产品名被读成了另一个词,是通过耳朵听出来的)。
  • banned_terms:竞争对手、团队不希望出现在屏幕上的第三方供应商、真实客户、内部代码名称。
  • never_say 和 positioning:一句话的身份标识及其绝不能使用的措辞。

7. 只读工具

填写 kit/RULES.md 的第 10 节“只读工具”(模板在发送时会带有占位符),包含产品允许代理调用的 API 或 MCP 工具(文档、目录、模板),并说明其他所有内容都是禁止的。具有写入权限的连接通过此规则保持只读状态;建议使用仅限于只读的凭据,因为在原始生产环境中,只读权限仅通过指令来强制执行。

8. 报告

向用户展示套件清单(令牌数量和标志、附有许可证的字体、按集合分组的图标、标志、演员表)、仍待批准的内容以及您更改的 product.yaml 键。

Individual skills in this repo

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

josueh04/product-video-skills

Interview the user about a product, then create products/<slug>/ with its own git history, a filled product.yaml and linked skills, fetch its sources and build its kit. Run only when the user types /product-new.

josueh04/product-video-skills

Back every sentence of a video's narration (audio/lines.tsv) and every screen it shows with a citation into the pinned source code (role/path:line@sha) or a docs URL, mark what is visible in the UI versus backend-only, flag restricted or unreleased features, and cut or rewrite anything unbacked; writes the video's TRUTH.md and checks it with truth_check.py. Use it whenever a script or narration is drafted or edited, before voice is generated, before a build, when someone asks "can we say this?", "is this true?", "does the product really do X?", when a reviewer asks for a feature or a claim the product may not support, and when a source document (pitch deck, PRD, marketing page) makes claims the video wants to repeat.

josueh04/product-video-skills

Check a rendered product video before anyone else sees it: worker-pattern flicker, black frames, loudness and true peak, clipping, clicks at clip edges, overlapping narration, speech to text against the script, banned terms and legacy names, camera zoom, contact sheets, frame strips at transitions and parity against the approved version; then write qa/REPORT.json, the only thing deliver.py accepts. Use it after every HyperFrames render, whenever someone asks "is the render clean", "QA this", "check the video", "check the audio", "why does it flicker", "there is a click", "compare v3 with v2", "did the approved part change", or before showing, sending, uploading or delivering any MP4, even when the request does not say QA. Also use it to triage a defect a reviewer reported in a render.

josueh04/product-video-skills

Write a product video's narration and turn it into voice clips with word timings, pronunciation fixes, sound effects and even loudness. The script becomes a table of moments and then audio/lines.tsv (one clip per sentence, with role and speed columns); tts.py voices it with ElevenLabs or the free macOS say voice, maps brand respellings back to the on-screen spelling, normalizes every clip and writes audio/timings.json for the composer; make_sfx.py builds typing tracks from real keystrokes and places recorded click and pop sounds. Use it whenever a video needs a script, narration, voice-over, lines.tsv, timings.json, TTS, a new take, a voice or casting choice, a pronunciation fix ("it says the name wrong"), a changed sentence, a tone note ("too hype", "sounds cut off"), audio levels, a click at the end of a clip, typing or click sounds, or when the build stage asks for the voice. Also use it for silent loops, which still need a moment table and SFX.

josueh04/product-video-skills

The animation rules that keep HyperFrames' parallel render workers from dropping, flashing or flickering elements, plus a static lint (lint_motion.py) that finds the violations in a video's template before it costs a render. Use it whenever you write or edit GSAP tweens, timelines, cursors, camera moves, typing, scrolls or pop-ups in a HyperFrames composition or a video's src/template.tpl, whenever a render shows flicker, stutter, an element that vanishes on some frames, a title that flashes, or a "WORKER PATTERN" line from scan_render.py or qa.py, and whenever the preview looks right but the MP4 does not. Also use it to review someone else's timeline code before rendering.

josueh04/product-video-skills

Pin a product's source code (read-only exports in sources/ plus sources.lock), confirm that the pinned commit is what runs in production, and map every screen of a video brief to its route, components, i18n strings and state, written to the video's SOURCES.md. Use it whenever a video needs to know where a screen lives in the code, when sources/ is missing or stale, before ui-spec-from-code or product-truth start on a video, after the product's frontend changed ("what changed", "which videos are affected", "refresh the sources", "is this checkout current", "which commit is in prod"), and when there is no code and you need an inventory of the no-code references (recordings, recovered captures, docs) a screen can be rebuilt from.

josueh04/product-video-skills

Compose a narrated product demo in HyperFrames: the stage (the product UI rebuilt at its real viewport and scaled to 1080p, camera, rack focus with veil, chapter titles, cursor and clicks, typing, streaming text, pop-ups, toasts, scrolls, end screen and lockup) and the build.py that anchors every beat to a word of the narration. Use it whenever you write or edit a video's video/build.py, src/template.tpl or src/app.css, place a beat on a word, add a chapter, a click, a pop-up or a push-in, frame a screen, build the end screen or lockup, snapshot setup beats, or render a draft or delivery MP4 of a product video in this workbench. Also use it when someone says "the cursor is off", "too zoomed in", "too fast", "it feels chaotic", "the title flashes", "sync the UI to the voice", or asks for a walkthrough, demo or pitch video of a UI.

josueh04/product-video-skills

Gather pixel references for UI that the code cannot show, or to check a rebuild against the real thing, using frames and timed OCR text from screen recordings, captures recovered from past Claude Code session transcripts, a local instance of the app built like production, and web research for third-party apps, plus side-by-side parity images and contact sheets. Use it whenever someone hands over a screen recording (.mov or .mp4) of the product, when a screen has no usable source code (a stale checkout, another company's UI such as a sign-in page, calendar or CRM, runtime output from a backend not in the repos), when asked "what does it really look like", "match the recording", "how long does that animation take in the app", "compare our render to the real app", or when screenshots from an earlier session might already exist. Never uses the reviewer's personal browser.

josueh04/product-video-skills

Turn a product's real frontend code into 1:1 rebuild specs for a video, one read-only subagent per screen, each returning static HTML, CSS with every variable resolved to its literal value and cited (role/path:line@sha), every state, transitions with exact durations and easings, icons from the code's own icon sets, and the exact i18n strings; plus resolve_tokens.py to write the product's design tokens to kit/tokens.css. Use it whenever a screen of the product has to appear in a video, when writing or fixing video/src/app.css or the template markup, when someone asks for exact sizes, colors, fonts, paddings, animations or icons of a screen, when a rebuilt screen "looks off" next to the real app, and when the design tokens or theme of a product need extracting. Framework adapters cover Angular with PrimeNG (proven), React, Vue, Tailwind and plain HTML (unproven).

josueh04/product-video-skills

Say where this session stands in the Product Video Skills workbench (setup state, which product and video the current folder belongs to, the stage of every video) and the exact next command to type. Also answers "how do I..." questions about the workbench from its docs.

josueh04/product-video-skills

Coordinate the build of one or more signed videos of the current product with subagents (source recon, product truth, UI specs, voice, one builder per video), re-run QA itself, then deliver. A light coordinator that never builds itself. Run only when the user types /video-build.

josueh04/product-video-skills

Start a new video of the current product - create videos/<video>/, write BRIEF.md, the feature coverage matrix (COVERAGE.md) and the claims sheet (CLAIMS.md), propose chapters, then stop for the reviewer's sign-off. Never builds. Run only when the user types /video-new.

josueh04/product-video-skills

Turn a batch of reviewer feedback on the product's videos into one table per video, fix every video that got notes in parallel (one subagent each) while keeping approved parts, re-run QA and parity, bump versions and deliver. Run only when the user types /video-review.

josueh04/product-video-skills

Check this machine and install the pinned video toolchain of the Product Video Skills workbench (HyperFrames CLI, its rendering Chrome and its agent skills from the same release, the Python environment, the speech model for QA), then run the self-check. Safe to run again. `/video-setup check` only reports.

相关技能