Communitygithub.com

josueh04/product-video-skills

為每個產品一次性提取所有影片重複使用的素材,並寫入 kit/ 和 product.yaml(設計符記、字型子集、圖示子集、標誌、虛構角色、標準名稱、發音、禁用詞彙及唯讀工具清單)。

product-video-skills 是什麼?

此技能專為影片製作流程設計,確保每個產品的所有影片共享同一套核心素材(kit),避免重複提取、不一致或未經批准的素材使用。它能自動化提取設計符記(design tokens)、字型子集(woff2)、圖示子集(SVG)、標誌(淺色、深色、應用圖標變體)、虛構角色、標準名稱、發音、禁用詞彙,並列出唯讀工具清單。技能支援 Claude Code 等平台,透過一系列 Python 腳本執行,並要求每次操作都有來源鎖定(sources.lock)和用戶批准。其最大價值在於消除影片間的素材不一致問題,例如錯誤的發音、不一致的客戶姓名或未經批准的圖示,確保最終影片的品質和品牌一致性。

相容平台✓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)

每個產品的所有影片都從同一套素材包中提取,因此素材包只需提取一次、批准一次,即可重複使用。 在這些技能來源的製作過程中,零散處理的成本很高: 一個圖示字型未經詢問就被下載,後來才獲得批准,之後又擴展了三次; 期間一個子代理從瀏覽器擴充功能資料夾中的字型檔裡取了兩個字形; 同一個示範客戶在兩支影片中有不同的姓氏,因為一份否決名單從未獲得回覆; 一個更名後的產品在螢幕上保留了舊名稱,直到審查員發現。

開始之前

  • 來源必須鎖定(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 的解析器,針對產品主題進行解析,並將其描述的渲染事實(執行時期 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>"]

從產品用於其主色調的符記中,設定 brand.accent 至 product.yaml,並引用該符記。

2. 字型 (Fonts)

找出應用程式實際載入的字型(link 標籤、@font-face、鎖定檔案中的字型套件),而非僅是 CSS 名稱所列出的。 從儲存庫或已安裝的套件中取得檔案(例如 node_modules 中的 @fontsource/<family> 套件); 僅存在於網路字型服務上的字型需要用戶批准才能下載。然後建立子集:

"$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 中。 帶有「unknown」授權或「missing」授權檔案的字型視為未就緒:請尋找或詢問。 在 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>            # candidates in 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 中 為每個檔案新增一行並附上引用;它會拒絕網址。然後在 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:一句話的 identity 以及它絕不能採用的措辭。

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.

相關技能