Communitygithub.com

josueh04/product-video-skills

通过简短访谈了解产品信息,创建 products/<slug>/ 文件夹并生成独立 Git 历史,填充 product.yaml 并关联技能,最后拉取源代码并构建产品套件。仅在用户输入 /product-new 时运行。

product-video-skills 是什么?

该技能专门用于通过半自动化访谈流程快速创建产品工作区。当用户在终端输入 `/product-new` 时启动,通过一系列简洁提问收集产品名称、定位、禁止用语、源代码地址、文档、品牌资源、虚构角色信息、名称与发音以及禁止提及的术语等关键元数据。会后生成一个符合 `product.yaml` 模板的文件夹结构,自动初始化 Git 仓库并创建首个提交。随后依次调用 `source-recon` 技能拉取源代码并锁定版本,再调用 `product-kit` 技能提取样式令牌、字体、图标、Logo 等信息,写入 `kit/` 目录。整个过程强调不覆盖已有产品、不交互凭证、不修改源代码目录,确保产品与上游代码隔离且可追溯。该技能适用于 Claude Code 等 AI 编程助手,为用户快速搭建标准化产品开发环境。

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

在你喜欢的 AI 中提问

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

文档

/product-new

在工作台内创建一个产品文件夹:先进行一次简短访谈,然后通过一个脚本写入文件夹,接着两个由模型调用的技能进行填充(source-recon 获取代码,product-kit 提取令牌、字体、图标、Logo、角色和名称)。

为什么在任何其他操作之前进行访谈:在衍生出这些技能的生产流程中,角色、产品名称和定位都是一轮轮评审后才确定的,每一次评审都会导致重新渲染。在这里收集的每个答案,都是未来不会发生的评审轮次。

开始之前

从当前技能的实际路径解析工作台(既可以从工作台根目录运行,也可以从一个产品文件夹中运行):

PVS_HOME="$(cd "$(cd "${CLAUDE_SKILL_DIR}" && pwd -P)/../.." && pwd)"

从参数中检查 slug:2 到 40 个小写字母、数字或短横线,以字母开头。如果 $PVS_HOME/products/<slug> 已经存在,则停止并告知;绝不覆盖已有产品,因为它有自己的历史记录,可能还有已签署的简报。如果用户传入了 --from examples/acme(或其他文件夹),则访谈只需了解与其不同的部分。

在连接任何仓库之前,向用户说明一次:Claude 会读取产品的代码,这意味着代码会被作为上下文发送给模型。用户应确保其公司允许这样做。

1. 访谈

按小组提问(每次消息两到三个问题),使用用户的母语。对任何可以推断的内容给出默认值,以便用户主要是确认。完整的问题列表及每个问题背后的原因在 references/interview.md 中;请先阅读该文件再开始提问。

  1. 产品:名称、用一句话描述(定位)、面向谁。
  2. 禁用语:团队拒绝使用的描述,即使公司文档中有也不使用。
  3. 源代码:对每项(前端、后端、设计、文档)提供一个 Git URL 或本地路径、生产环境使用的分支、应用目录和框架(angular-primeng、react、vue、svelte、html、other)。询问实际部署的是哪个分支:在原始生产环境中,过时的检出会浪费大量时间。
  4. 文档:URL、仓库路径或 mcp:<name>(只读)。
  5. 品牌:仅当不在前端时(Logo 和字体文件)。否则 product-kit 会自动找到它们。
  6. 虚构角色:提议一个公司名和两到三个人,包括全名、555 电话和 example/.test 域名的邮箱。以你的提议作为默认值,用一个闭合式问题让用户拒绝。评审员对平淡或听起来像真人的名字反应强烈,而姓在视频中发生变化是一个会发布的错误。
  7. 名称和发音:规范名称、当前 UI 中可能仍然显示的历史遗留字符串,以及品牌词汇的读法。
  8. 禁止提及的术语:竞争对手、供应商、真实客户,任何绝对不能出现或被听到的内容。
  9. 评审员:签署每个视频的覆盖矩阵和声明表的人。

绝不要索要令牌、密码或 SSH 密钥,也绝不要主动存储它们。源代码拉取使用机器已有的 Git 访问权限。如果 URL 中包含凭据(https://user:token@...),请让用户删除;脚本无论如何都会拒绝它们。

2. 写入文件夹

将答案写入一个类似 product.yaml 格式的临时文件(可以是任意子集;参见 references/answers.example.json),存放在仓库外部,然后运行:

"$PVS_HOME/bin/pvs-py" "$PVS_HOME/skills/product-new/scripts/new_product.py" <slug> \
  --answers <scratch>/answers.json [--from examples/acme]

该脚本会复制 _template/product,然后将 --from 指定的文件夹覆盖到其上(因此如果某个示例缺少文件,如 kit/RULES.md,仍会从模板中获取),将答案逐行合并到 product.yaml 中(模板的注释是用户的文档,因此保留),当模板没有时写入 CLAUDE.md 和 .gitignore,运行 scripts/link-skills.sh 使得 cd products/<slug> && claude 能看到相同技能,并创建第一个 Git 提交。它会拒绝已存在的 slug、URL 中的凭据以及明显非虚构的角色邮箱和电话。如果失败,修正它指出的答案并重新运行;不要手动创建文件夹。

如果输出 "still to fill in product.yaml",则表示模板中有一些占位符在访谈中未覆盖。询问这些占位符,或者告知用户哪些仍未填写。

3. 填充

通过 Skill 工具按顺序调用由模型调用的技能:

  1. source-recon,将每个源代码拉取到 products/<slug>/sources/ 目录并锁定到 sources.lock 文件中。如果某个拉取因访问权限失败,报告精确的 Git 错误并停止:用户自行在他们的机器上修复访问权限,绝不要让你提供凭据。
  2. product-kit,提取 kit/tokens.css、字体、图标、Logo,并将角色、名称和发音写入 kit 目录和 kit/RULES.md 文件。

两者都只会在产品文件夹内写入。绝不编辑 sources/ 目录中的任何内容。

4. 报告

一个简短的表格,然后给出下一步命令:

项目值
文件夹products/<slug>/(Git:首次提交或未提交的原因)
源代码角色、分支、来自 sources.lock 的提交号
套件product-kit 提取的内容以及未找到的内容
角色已冻结的角色名称,供最后一次否决
待办product.yaml 中仍有占位符、任何未验证的内容

下一步:cd products/<slug> && claude,然后 /video-new <video>。

Individual skills in this repo

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

josueh04/product-video-skills

Extract, once per product, everything every video of it reuses and write it to kit/ and product.yaml (design tokens, font subsets as woff2, icon subsets as SVG from the product's own icon packages, logos in light, dark and app-tile variants from the repo, a fictional cast proposed once for veto and then frozen, the canonical-names map, pronunciations, banned terms and the read-only tool list). Use it when a product is set up or its kit is missing or incomplete, when a video needs an icon, font or logo that is not in kit/ yet, when someone asks for demo names, fake customers, phone numbers or emails, when a brand word is mispronounced or an old product name shows up, and when checking that demo data is fictional.

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.

相关技能