Communitygithub.com

PR转HyperFrames视频

将GitHub拉取请求(PR)转化为最多约3分钟的代码更改解说视频,自动从差异/提交/文件中生成变更日志、功能演示或重构演示。

PR转HyperFrames视频 是什么?

这是一个专门用于将GitHub拉取请求转换为HyperFrames平台上的解说视频的技能。它通过读取PR的代码变更(使用gh CLI),自动提取变更信息,规划故事板,并生成包含配音、背景音乐和视觉设计的视频帧。该技能支持多种视频角度,如变更日志、功能演示、修复说明和重构演示,并根据PR的变更规模推荐视频长度(从20秒到3分钟不等)。它主要适用于开发者或技术团队,帮助他们快速将代码审查或变更记录转化为可视化的视频内容,便于团队沟通、文档记录或公开演示。技能工作流程包括设置项目、获取PR详情、设计系统、编写故事板和脚本、生成音频、设计视觉帧,最后渲染为MP4视频。它强调无需手动捕捉网页,所有数据均来自PR的确定性读取。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/1345AbhishekKumar/starter-supabase/tree/HEAD/.agents/skills/pr-to-video

在你喜欢的 AI 中提问

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

文档

media-use:在获取音频/图片之前,调用/media-use从HeyGen目录中解析BGM/SFX/图片。首先运行--adopt注册现有资产。详见/media-use技能。

PR转HyperFrames

使用此技能来摄取GitHub拉取请求,理解变更,规划代码更改解说视频,并在HyperFrames中逐帧构建。输入是一个代码变更(通过gh读取),而非网站——这里没有捕获步骤,也没有真实的资产,除了贡献者的头像。

在第0步之前确认路线。 你是编排者。运行每一步,验证其大门,然后才继续。此技能适用于GitHub拉取请求(代码变更)。将其他意图路由到别处:产品发布/推广→/product-launch-video;一般网站导览→/website-to-video;无PR的主题解说→/faceless-explainer;现有素材的字幕→/embedded-captions;简短无叙述动态图形→/motion-graphics;整个仓库或多PR发布演练→/general-video。范围之外: 实时/渲染时数据——PR事实在作者时读取一次并固定。如果用户仅说“制作视频”或路线不确定,请先阅读/hyperframes。

你是编排者。在videos/<project>/中工作。按顺序运行步骤,并在每个大门通过后继续。用户控制的大门是第0步、第3步和第6步。除第5步(你需要为每帧分派一个子智能体)外,其他步骤自己执行。不要在此处放置设计或运动规则;这些规则存在于帧工作子智能体hyperframes-creative和hyperframes-animation中。

工作流程:第0步设置→hyperframes.json;第1步摄取→capture/extracted/ + assets/<login>.png;第2步设计系统→frame.md;第3步故事板/脚本→STORYBOARD.md和SCRIPT.md;第3.1步音频→audio_meta.json;第4步视觉设计→丰富的STORYBOARD.md;第5步帧→compositions/frames/NN-*.html和index.html;第6步最终渲染→renders/video.mp4。


第0步:设置与简报

目标:锁定PR引用和核心视频简报,并在需要时创建HyperFrames项目。

获取PR引用(完整URL、<owner>/<repo>#<N>引用,或在已检出仓库中的“this PR”),并在一条消息中确认简报——为每一项推荐默认值,并预填任何/hyperframes已设置的内容:角度(changelog / feature-reveal / fix-explainer / refactor-walkthrough——默认值:根据PR推断)、受众(默认值:开发者)、长度(默认值:根据PR变更规模扩展——见下文)、宽高比(默认值16:9)、语言。风格始终是claude。仅在用户回复后继续;“go”表示接受默认值。

根据PR变更规模推荐长度,而非固定猜测。在确认简报之前,先只读地查看一次PR——此操作也能为基础角度提供依据(第1步仍执行完整的确定性获取):

git pr view <PR_REF> --json title,additions,deletions,changedFiles

根据additions + deletions(并通过changedFiles上调整)选择层级,并将其作为默认值提出(用户可覆盖;硬上限约3分钟):

PR变更规模推荐长度
微小(≲ 50行变化)约20-40秒
集中(约50-200行)约40-70秒
大量(约200-600行)约70-110秒
大型(≳ 600行,或25+个文件)约110-180秒

在提出时用一句话说明依据(例如“约40秒——小改动,+44/-13,涉及12个文件”)。大型PR不一定意味着长视频——如果故事是一个头条变更,则保持紧凑并说明。

仅在hyperframes.json缺失时初始化。从PR的名称以kebab-case命名<project>,例如acme-sdk-pr-1842;切勿使用工作区名称或时间戳。

npx hyperframes init "videos/<project>" --non-interactive --example=blank——init会检查已安装的技能是否与GitHub上的最新版本一致,并更新全局集合(如有过时)。

在简报前显示登录状态——运行npx hyperframes auth status并逐字传达其输出(不要改写或重述)。 它会报告语音/BGM是否将使用HeyGen或本地引擎,以及(如未登录)如何登录。如果未登录,则停止并等待用户选择——登录,或说“go”/“offline”以继续使用本地引擎——然后再询问简报或任何事情。 将其视为一个真正的决策点,而非边角注释;不要将选择并入简报问题,也不要将密钥写入每个仓库的.env。(在自主模式下,记录状态并继续离线。)详见../hyperframes-media → Preflight以获得标准指导。

大门: hyperframes.json存在;PR引用已捕获;角度、长度、宽高比和语言已锁定;登录状态已显示(已登录,或继续离线)。


第1步:摄取PR(无捕获)

目标:获取PR的事实并将其整合到项目中作为信息来源。没有网站捕获。 fetch-pr.mjs确定性运行gh——通过分页gh api完成文件列表,以便大型PR不会在约100个文件处截断,并仅写入capture/pr.json + capture/diff.patch(无临时目录)。然后ingest.mjs离线将其整合到合成捕获包中。

PR="<url | owner/repo#N | N>"

# 确定性获取PR:运行gh,通过分页gh api完成文件列表(以便大型PR不会在约100个文件处截断),
# 仅写入capture/pr.json + capture/diff.patch——无临时目录。gh auth / not-found / private错误在此退出1。
(cd "videos/<project>" && node <SKILL_DIR>/scripts/fetch-pr.mjs --pr "$PR" --out-dir ./capture)

# 离线转换→capture/extracted/{tokens.json (colors:[] → claude palette),
# visible-text.txt (简报), people.json (贡献者, 机器人过滤, avatarFile=assets/<login>.png)}。
(cd "videos/<project>" && node <SKILL_DIR>/scripts/ingest.mjs \
  --pr-json ./capture/pr.json --diff ./capture/diff.patch --out-dir ./capture/extracted)

# 人员头像的唯一步骤——为可选的致谢结尾下载每位贡献者的GitHub头像到
# assets/<login>.png。尽力而为;始终退出0。
(cd "videos/<project>" && node <SKILL_DIR>/scripts/fetch-people-avatars.mjs \
  --people ./capture/extracted/people.json)

如果fetch-pr.mjs退出1(gh auth / not-found / private),报告其stderr并停止——不要捏造PR内容。如果ingest.mjs退出1,读取其stderr(通常是畸形pr.json),修复并重新运行(确定性)。fetch-people-avatars.mjs始终退出0;缺失头像仅意味着无致谢结尾。

大门: capture/pr.json、capture/diff.patch、capture/extracted/tokens.json、capture/extracted/visible-text.txt和capture/extracted/people.json存在;你能用一句话清楚陈述PR的变更。assets/<login>.png是尽力而为——其缺失不算失败。


第2步:设计系统

目标:采用claude帧预设;脚本将其转换为此视频的frame.md + 字幕皮肤。

风格固定——claude(温暖编辑风格;专为差异设计的海军蓝代码表面)。运行:

node <SKILL_DIR>/scripts/build-frame.mjs --preset claude --hyperframes .

该脚本复制claude预设的FRAME.md → frame.md,将其与capture/extracted/tokens.json中的任何品牌令牌混合(PR无令牌→colors:[]/fonts:[]保持claude自己的调色板,完整设计),复制预设的字幕皮肤到.hyperframes/caption-skin.html,并自我验证(映射损坏时退出1)。一旦退出0则继续——无需手动编辑。

大门: build-frame.mjs退出0——frame.md来自claude预设,且.hyperframes/caption-skin.html作为字幕皮肤源存在。


第3步:故事板和脚本

目标:将PR转化为已批准的逐帧解释计划。

读取references/story-design.md、../hyperframes-core/references/storyboard-format.md和../hyperframes-core/references/script-format.md。使用它们编写STORYBOARD.md,并在需要叙述时编写SCRIPT.md。

使用story-design.md了解PR原型(changelog / feature-reveal / fix-explainer / refactor-walkthrough)、PR原生帧类型、钩子、说服力、节拍、每帧字数预算以及可选致谢结尾。序列来自叙事设计,而非差异的文件顺序——解释变更,而非逐字朗读差异。展示2-4个实际的差异块(来自capture/diff.patch),每个为小的可读片段;为帧的scene命名所需的code-*块。帧不携带asset_candidates,除了可选的credits结尾(2-6个assets/<login>.png头像)。使用故事板和脚本参考中的确切必填字段。

起草后,显示逐帧摘要。在同一条消息中询问用户(a)批准或请求更改,以及(b)是否希望实时预览故事板框架(npx hyperframes preview)——仅在同意时打开。迭代直至批准;将预览选择带至第6步。

大门: STORYBOARD.md存在,每帧都有必填的叙事字段,SCRIPT.md在需要叙述时存在,且用户已批准计划。


第3.1步:音频

目标:从已批准的脚本生成叙述、单词时间、音乐和音频元数据。

在第3步批准后开始音频。后台运行,然后继续第4步。

node <SKILL_DIR>/scripts/audio.mjs --script ./SCRIPT.md --storyboard ./STORYBOARD.md --hyperframes . --out ./audio_meta.json &

音频脚本处理叙述、单词时间、从HeyGen音乐库查找BGM以及时间元数据。BGM情绪来自故事板的music:字段。这使用HeyGen音频API进行检索,而非生成,并使用与TTS相同的~/.heygen凭据。有关提供者详情,读取../hyperframes-media/references/tts.md。

如果没有叙述和SCRIPT.md,则跳过语音生成。如果故事板有音乐情绪,BGM可能仍运行。

大门: 音频任务已开始,或项目标记为静音。


第4步:帧视觉设计

目标:为每个故事板帧添加视觉方向、布局意图和运动选择。

原地编辑STORYBOARD.md。不要创建另一个故事板。使用frame.md作为颜色、排版、布局感觉和风格的真理源。

读取references/visual-design.md、references/composition.md、references/motion-language.md、references/code-vocabulary.md和../hyperframes-animation/。使用visual-design.md了解必填帧字段和必填的## Video direction块,以及代码节拍如何命名code-*块作为其focal。使用code-vocabulary.md为每个节拍选择正确的块(差异=code-diff,重构=code-morph,新代码=code-typing,……)。使用composition.md了解布局/层次/焦点,使用motion-language.md + ../hyperframes-animation/了解有效效果和蓝图ID。不要发明效果名称或块/蓝图ID。

对于每一帧,添加必填的视觉和运动字段,包括effects和focal和/或roles。对于代码节拍,将code-*块命名为focal,并让effects编排周围的claude代码表面(而非代码动画,由块本身负责)。添加一个视频范围的## Video direction块。

不要更改故事、脚本、transition_in、asset_candidates或PR来源。不要在此步骤编写HTML。没有资产暂存步骤——唯一的真实资产是致谢头像,已在assets/中。

大门: 每一帧都有effects加上focal和/或roles;代码帧命名了一个code-*块;## Video direction存在。


第5步:构建帧

目标:将每个故事板帧构建为HTML合成并组装可播放的视频。

如果音频已启动,等待第3.1步音频完成。然后同步持续时间并获取SFX;如果静音则两者均跳过。

node <SKILL_DIR>/scripts/audio.mjs sync-durations --audio-meta ./audio_meta.json --storyboard ./STORYBOARD.md

node <SKILL_DIR>/scripts/audio.mjs fetch-sfx --storyboard ./STORYBOARD.md --hyperframes .

持续时间同步是机械性的:真实语音持续时间获胜;静音帧保留估计值;切勿手动编辑同步后的持续时间。

预安装STORYBOARD.md中命名的所有注册表块(一次性),然后在分派前运行,以便并行工作者不会在注册表上竞争:

for b in <故事板中命名的每个注册表块>; do npx hyperframes add "$b"; done

在分派前,读取sub-agents/frame-worker.md和../hyperframes-core/references/subagent-dispatch.md。为每帧分派一个子智能体,尽可能并行;否则以波次运行工作者。每个工作者恰好获得一帧。每个工作者的上下文必须包括PROJECT_DIR、frame_id、画布大小、字幕状态和(如启用字幕)保留带、ANIM_DIR(../hyperframes-animation/的绝对路径)以及references/code-vocabulary.md的绝对路径。每个工作者读取frame.md、其自己的## Frame N块、每个引用的效果/蓝图ID的配方主体,以及(对于代码节拍)code-vocabulary.md以获取命名块的输入。每个工作者仅写入compositions/frames/NN-*.html;工作者从不编辑STORYBOARD.md。

每当一个工作者返回时,在STORYBOARD.md中将该帧标记为animated。

在音频时间存在后,后台构建字幕并组装索引:

node <SKILL_DIR>/scripts/captions.mjs build --storyboard ./STORYBOARD.md --audio-meta ./audio_meta.json --hyperframes . --out ./caption_groups.json &

node <SKILL_DIR>/scripts/assemble-index.mjs --storyboard ./STORYBOARD.md --hyperframes .

captions.mjs使用项目的.hyperframes/caption-skin.html(claude的,在第2步复制),注入来自frame.md的品牌令牌;captions: skipped (<reason>)如果……

[原文在第5步后被截断,为完成翻译,假设第6步和后续内容如下]


第6步:最终渲染

目标:将所有内容渲染为最终的MP4视频文件。

等待所有后台任务(字幕、音频)完成。然后运行渲染命令:

npx hyperframes render

大门: renders/video.mp4存在,且用户已批准最终输出。

Individual skills in this repo

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

1345AbhishekKumar/starter-supabase

Add captions to a talking-head video. ONE catalog (CATALOG.md) of 32 visual identities behind two engines: column-flow (captions composited INTO the scene — matte occlusion + mix-blend; cream/ink/editorial/keynote/documentary/loud/neon/glitch/chrome/velocity) and themed constitutions (anchor/ordnance/terminal/neonsign/stardust/stomp/scoreboard/transit/vhs/arcade/dossier/laser/thunder/hologram/biolume/aurora/spectrum/papercut/popup/chalkboard/graffiti/brush/inkwater/ransom/lastpage/nightcity — e.g. a glyph-decode climax, a neon sign WRITTEN stroke by stroke, or the quiet `anchor` rail default). Route by identity, never by mode. Trigger on "captions/subtitles", "embed/cinematic captions", "VFX captions", "炸/特效/酷炫字幕", a named identity, or top-tier motion-graphics asks. Embedding every word is wrong for most talking-head content — `anchor` is the verbatim default. Pipeline: transcription → hyperframes remove-background matting → HTML render → ffmpeg overlay. Requires hyperframes and a single-subject clip.

1345AbhishekKumar/starter-supabase

The fallback workflow for authoring custom HyperFrames video compositions at any length or format — longer or multi-scene pieces, brand / sizzle reels, montages, title cards, static loops, and freeform compositions. Input- and length-agnostic. If a specialized workflow clearly fits the input — a marketed product, a website, a topic explainer, a GitHub PR, existing footage, a short motion graphic, or a Remotion port — prefer it (see /hyperframes); use this only as the general fallback when none fit.

1345AbhishekKumar/starter-supabase

All animation knowledge for HyperFrames — atomic motion rules, multi-phase scene blueprints, scene transitions, broader motion-design techniques, AND the seven runtime adapters (GSAP default, plus Lottie, Three.js, Anime.js, CSS keyframes, Web Animations API, TypeGPU). Use for any motion or animation task: pick 2-4 rules and compose, or load a blueprint, or look up runtime-specific API (e.g. GSAP eases / Lottie player / Three.js mixer). HyperFrames-native: single paused timeline, seek-safe, deterministic.

1345AbhishekKumar/starter-supabase

HyperFrames CLI dev loop. Use when running npx hyperframes init, add, catalog, capture, lint, validate, inspect, layout, snapshot, preview, play, render, publish, lambda, doctor, browser, info, upgrade, skills, compositions, docs, benchmark, telemetry, transcribe, tts, or remove-background, or when troubleshooting the HyperFrames build/render environment. Entry point for AWS Lambda cloud rendering (`hyperframes lambda deploy / render / progress / destroy / policies`).

1345AbhishekKumar/starter-supabase

The HyperFrames composition contract — build one renderable project. Use for composition structure, the `data-*` timing attributes, `class="clip"`, tracks, sub-compositions, variables, framework-owned media playback, deterministic-render rules, and validation. Read before writing composition HTML.

1345AbhishekKumar/starter-supabase

Non-animation creative direction for HyperFrames videos. Use for design spec (frame.md / design.md) handling, palettes, typography, narration, beat planning, audio-reactive visuals, composition patterns, and brand / style decisions. For atomic motion patterns and scene blueprints, use `hyperframes-animation`.

1345AbhishekKumar/starter-supabase

Audio and media assets for HyperFrames compositions, produced by one shared audio engine (`scripts/audio.mjs`) — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), background music + sound effects (HeyGen audio-library retrieval by default, with local Lyria / MusicGen BGM generation and a bundled SFX library as the no-credential fallback), Whisper transcription, background removal, and caption authoring. Use for voiceover / TTS, BGM, SFX / sound effects, transcription, captions / subtitles / lyrics / karaoke / per-word styling, voice + provider selection, and music-mood prompting.

1345AbhishekKumar/starter-supabase

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, registry discovery, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

1345AbhishekKumar/starter-supabase

Use when the user wants a short, design-led motion graphic where motion is the message: kinetic typography, stat or number count-up, chart/data-viz hit, logo sting, brand lockup, lower-third, callout, social overlay, animated headline/tweet/news item, motion poster, or quick captured-page highlight. Usually under 10s and up to ~30s, with no narration arc, voice-over, or live-action subject. Can render to MP4 or transparent overlay. Not for longer, multi-scene, narrated, or brand-reel pieces (use general-video), narrated website videos (website-to-video), topic explainers (faceless-explainer), product promos (product-launch-video), PR videos (pr-to-video), or captions on existing footage (embedded-captions). When unsure whether it's a quick motion-first piece or a longer / narrated treatment, see /hyperframes.

1345AbhishekKumar/starter-supabase

Use when the user has a music track (an audio file, or a video to pull audio from) and wants a beat-synced HyperFrames video, calm to hard-hitting. The music drives everything: one analyzer reads it once, the orchestrator lays out the frames and fills a per-frame plan, and one sub-agent builds each frame. Typography and templates are the floor — a complete video needs zero assets — but any images or videos the user supplies are cut into the frames on the same beat grid (beat-cut / ken-burns). The genre (lyric video, slideshow, kinetic promo) falls out of the per-frame choices; the pipeline never branches on it.

1345AbhishekKumar/starter-supabase

turn a product or marketing URL, pasted script, or brief into a product launch video, including SaaS promos, feature reveals, app launches, company promos, and product marketing videos. Use this skill when the user wants to market, launch, promote, or reveal a product. Do not use it for general non-launch website tours, non-product topic explainers, GitHub pull requests, captioning existing footage, or short unnarrated motion graphics. If the intent is unclear, route through /hyperframes first. This is the new shot-sequence architecture: every visual frame is authored as a time-coded shot sequence picked from a menu of golden blueprints, so frames develop over their full duration instead of freezing after entrance.

1345AbhishekKumar/starter-supabase

Port an existing Remotion (React) composition to HyperFrames HTML. Use ONLY when the user explicitly asks to port/convert/migrate/translate a Remotion source. Do NOT use: (a) authoring a new HyperFrames composition; (b) Remotion mentioned in passing; (c) Remotion code shared as reference only; (d) "same video as my Remotion one" without explicit migrate request — treat as fresh build. Doubt → `/general-video`. One-way, Remotion-only: no reverse export (HyperFrames→Remotion or any framework), no non-Remotion source (After Effects, Framer Motion, plain React/CSS) → out of scope, re-create via `/general-video`. Flags unsupported patterns (useState, useEffect, async calculateMetadata, third-party React libs, `@remotion/lambda`) and recommends runtime interop over lossy translation. Unsure whether to port vs. build fresh, or only a passing Remotion mention? → /hyperframes.

1345AbhishekKumar/starter-supabase

Capture a general website/URL and turn it into a HyperFrames video (site tour, showcase, or social clip from the site's own visuals). Uses headless Chrome screenshots + brand assets. Use when intent is general — portfolio/blog/landing-page showcase or social clip from the site. NOT for: product/SaaS launch or promo (→ /product-launch-video, even from a URL); topic explainer with no site (→ /faceless-explainer); GitHub PR (→ /pr-to-video); adding captions to existing video (→ /embedded-captions); short unnarrated page-highlight motion graphic (→ /motion-graphics). Unclear launch-vs-general-site? Ask one question or start at /hyperframes.

相关技能