Communitygithub.com

SingleGrain-Team/video-skills

製作一部約30秒的影片,用於解釋程式碼變更(如合併請求、發行版本或未提交差異),讓不閱讀差異化內容的人也能理解。影片會先快速滾動實際的差異化內容,再以簡潔語言摘要,並搭配四個實際程式碼片段的說明,最後附上安裝指令與網址。最終輸出為1920x1080 H.264 MP4影片及可編輯的HyperFrames專案檔。

video-skills 是什麼?

這是一項專為AI代理(如Claude Code、Cursor、Codex等)設計的技能,能自動將程式碼差異(diff)轉變為約30秒的解釋性影片。其核心目的是幫助那些不會直接閱讀差異化內容的觀眾(如客戶、團隊成員或社群粉絲)快速理解變更內容。技能支援透過GitHub PR、發行版本或本地未提交的差異作為輸入,並遵循固定的五階段影片結構:鉤子(Hook)、差異模糊(Diff Blur)、白話摘要(Plain Words)、四個能力展示(Four Beats)與結尾(Close)。影片中使用的差異化內容必須是真實的程式碼行,並以快速滾動且模糊的方式呈現,以強調其不可讀性,隨後再以簡潔的語言和四個具體的程式碼片段進行說明。最終產出為1920x1080的H.264 MP4影片以及可完整編輯的HyperFrames專案檔,方便後續重品牌化或重複使用。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/SingleGrain-Team/video-skills/tree/HEAD/skills/pr-explainer-film

在你喜歡的 AI 中提問

開啟一個已預先載入此 Agent Skill 的新對話。

說明文件

pr-explainer-film

一部預設無聲、長度約30秒、分為五個樂章的影片。其結構的巧妙之處在於:觀眾首先會覺得差異化內容難以閱讀,接著獲得白話解答,再看到實際證明,最後知道該輸入什麼指令。

時間樂章目的
0-2秒鉤子說明變更規模(例如「已變更15個檔案」)
2-8秒差異模糊實際的程式碼區塊快速閃過;計數器持續上升
8-13秒白話摘要一句話標題加上三個簡短重點
13-23秒四個能力展示每個能力展示一個功能,並同時顯示背後的真實程式碼
23-30秒結尾逐字打出安裝指令,然後顯示網址

輸入

在開始建構之前收集以下資訊。僅詢問缺少的項目。

  1. 變更來源:一個GitHub PR或發行版本(使用 gh pr diff、gh pr view --json title,body,files),或本地工作目錄(使用 git diff 加上未追蹤的檔案)。僅限唯獨操作;絕不修改儲存庫。
  2. 觀眾:那些不會閱讀差異化內容的人(客戶、團隊成員、粉絲)。這將決定摘要和能力展示中的用語。
  3. 行動呼籲:確切的安裝指令和/或網址。請完全按照原文使用。如果該產品只有一個標準指令,則僅顯示該指令,不顯示其他工具的名稱。
  4. 品牌:色板、標誌(你自己的檔案)、字型。範本中的預設值為中性且深色。

工作流程

  1. 閱讀變更。 取得包含新增/刪除計數的檔案清單以及實際的程式碼區塊。用非工程師也能理解的一句話來描述變更;如果你做不到,表示你還不理解這項變更。
  2. 挑選內容(參閱 references/content-rules.md):鉤子數字、用於模糊效果的5-8個程式碼區塊、3個摘要重點、恰好4個能力展示、行動呼籲。
  3. 建立專案骨架。 npx --yes hyperframes init <dir> --non-interactive --example=blank,然後將 template/index.html 和 template/film.config.js 複製覆蓋產生的檔案。如果你有標誌,請放在 assets/logo.png。
  4. 填寫 film.config.js。 所有文字、程式碼片段和數字都在此定義。僅在需要更改 :root 中的品牌變數、時間軸或版面配置時,才編輯 index.html。
  5. 驗證:npx --yes hyperframes lint 然後 npx --yes hyperframes check。修復所有錯誤。已知可接受的警告:nested_structure_needs_subcomposition(影片刻意使用單一檔案,以便於重新品牌化)。
  6. 檢查畫面。 npx --yes hyperframes snapshot --at 1,4,6,8.3,11,14,17,19.5,22,26,29 並開啟 snapshots/contact-sheet-*.jpg。根據下方的清單進行檢查;修正問題並重新拍攝快照,直到一切正常。
  7. 渲染。 npx --yes hyperframes render --quality high --workers 2 --output final.mp4。使用 ffprobe 確認其為1920x1080、H.264、且長度為28-34秒。
  8. 再次檢查從MP4中擷取的4-6個影格(使用 ffmpeg -ss T -i final.mp4 -frames:v 1 f.png),而不僅是快照。

確保格式有效的規則

  • 差異化內容必須是真實的。 從實際的差異化內容中複製實際的程式碼行。絕不虛構程式碼或計數。計數應從 git diff --shortstat 加上新檔案的 wc -l 計算得出。
  • 刻意設計為不可讀。 滾動速度會加速(使用 power2.in)並變得模糊。不要為了讓人能閱讀而放慢速度;「資訊太多無法閱讀」的設計正是為了鋪陳後續的解釋。
  • 先給出文字說明,再展示證據。 摘要必須在任何能力展示之前出現。每個能力展示的標題是2-4個字的好處;描述是一句沒有術語的句子;程式碼片段是1-5行真實的程式碼,並將關鍵行標示出來。
  • 恰好四個能力展示,每個展示一個概念,每個約2.6秒。優先刪除較弱的展示,而不是縮小文字。
  • 交替背景。 差異化和能力展示使用深色背景,摘要使用一個淺色場景。背景的變化傳達「現在一切變得簡單」的訊號。
  • 以指令結尾。 逐字打出真實的指令,然後顯示網址。沒有第二個行動呼籲。
  • 內容整潔。 在程式碼片段顯示之前,移除那些提及競爭對手或不相關工具的名稱的程式碼註解。永遠不要顯示行動呼籲指令以外的任何CLI。
  • 使用自己的素材。 使用你自己的標誌、電腦上已有的字型,並且不使用任何庫存或第三方媒體。音樂為選用;如果使用,僅限於獲得商業使用授權的音軌(透過 media-use 解決),並確保影片在沒有聲音的情況下仍完全可讀。
  • 確定性。 在構圖中不使用 Math.random、Date.now 或網路請求;透過補間動畫進度值來驅動打字文字和計數器的動畫,以便精確定位。

影格檢查清單(步驟6和8)

  • 鉤子數字和文字與實際變更相符。
  • 差異化內容視窗裁剪在其框架內;檔案標題以及綠色/紅色行在靜止時清晰可辨,移動時則模糊。
  • 計數器最終停在正確的數字上。
  • 摘要投影片在淡出前顯示所有三個重點。
  • 每個能力展示的標題、句子和程式碼片段都同時可見,沒有任何內容被裁切。
  • 最終影格顯示完整的指令和網址,拼寫完全正確。

交付成果

交付 final.mp4 和專案資料夾(index.html、film.config.js、assets/、meta.json)。報告檔案路徑、影片長度,以及任何被接受的驗證警告。該資料夾可以使用相同的指令重新渲染;如果要為下一個版本重新品牌化或重複使用,只需編輯 film.config.js。

參閱 references/content-rules.md 了解尺寸和文字限制。

Individual skills in this repo

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

SingleGrain-Team/video-skills

Make a 30-45 second launch film for a product by staging it inside one persistent, neutral chat window. A user types a request, the assistant answers and calls the product as a connected tool, a progress card runs, a follow-up triggers a second tool action, and the result lands as a count-up headline number before closing on the logo, tagline and call to action. Use when you need a launch, feature or integration announcement video for something that plugs into AI assistants (a skill, MCP server, plugin, connector, CLI). Delivers a rendered 1920x1080 MP4 plus an editable single-file HyperFrames project.

SingleGrain-Team/video-skills

Build a motion graphic where a screen recording plays in a large frame beside a checklist, and each checklist item ticks off at the exact moment that step happens in the recording, ending with every item checked and a short hold. Use when someone has a screen recording (product walkthrough, tutorial, onboarding, install demo) plus a list of steps with timestamps and wants a "watch the steps get done" film. Input is a recording, step labels with timestamps, a title and an optional palette; output is a 1920x1080 H.264 MP4 and the editable HyperFrames project.

SingleGrain-Team/video-skills

Build a 15-20 second product launch film that shows the product's real screen on a laptop built from plain CSS (no 3D model, no generation model) in a dark studio, scrolls the page, zooms into the interface for one key action such as typing a search, and resolves to the logo lockup. Use when someone has a full-page screenshot or screen recording of their product, one action worth showing, and a logo, and wants a short silent-friendly launch teaser rendered as a 1920x1080 MP4 with an editable HyperFrames project.

SingleGrain-Team/video-skills

Builds a 6-8 second logo sting in which the brand mark rides inside a refracting liquid bead (distorted past legibility), the bead swells, holds still for a beat, then ruptures into droplets and leaves the logo lockup (mark plus wordmark) crisp and upright on screen. Delivered as a 1920x1080 H.264 MP4 plus the editable HyperFrames project, with no 3D model, stock footage or generation model. Use it for brand intros and outros, product-launch openers, channel stings and any "reveal our logo" moment, from an SVG or PNG logo (including raster-only logos), a wordmark string and a palette.

SingleGrain-Team/video-skills

Make a 20-30 second launch film for a product that is not tied to one interface, such as a CLI, package, plugin or agent skill. The identical prompt or command is typed into four visually different surfaces in turn (a wide terminal, a tall chat card, a floating palette, an editor cell), the film then hard-cuts into a fast reel of real outputs on a beat or fixed tempo grid, and it closes on the command in a large pill. Delivered as a rendered 1920x1080 MP4 plus the editable HyperFrames project. Music is optional - with a track the cuts land on detected beats, without one they land on a 120 bpm grid.

SingleGrain-Team/video-skills

Render a 5-6 second motion graphic in which an oversized condensed headline (2-4 words) punches in behind a presenter, using a background-removed cutout of the presenter layered on top of the lettering. A hard cut then removes the presenter while the same headline holds the exact same size and position, and a short supporting line appears for a reading hold. Use it for talking-head intros, chapter openers, launch announcements and social hooks when you have one presenter clip, a headline, a supporting line and a palette. Built on HyperFrames; delivers a 1920x1080 H.264 MP4 plus the editable project.

SingleGrain-Team/video-skills

Builds a 10-14 second product sting out of a short run of UI moments (an entry screen, a single counting metric, a navigation list, one click that opens a menu, then an endcard) cut together so every cut carries the previous motion forward and the piece reads as one continuous camera move. Delivered as a 1920x1080 H.264 MP4 plus an editable single-file HyperFrames project. Use it for app launches, feature teasers, social bumpers and site intros when you have a product's logo, a couple of screenshots, one headline number and its real nav labels, and want polished UI motion without narration.

相關技能