Communitygithub.com

DigitalRavagers/Experiment

為談話性頭部影片添加字幕。一個目錄(CATALOG.md)包含 32 種視覺識別,由兩個引擎驅動:欄位流(字幕合成到場景中——遮罩融合+混合模式;奶油/墨水/編輯/重點/紀錄片/大聲/霓虹/故障/鍍鉻/速度)和主題構成(錨點/軍械/終端/霓虹招牌/星塵/跺腳/記分板/過境/VHS/街機/檔案/雷射/雷霆/全像/生物光/極光/光譜/剪紙/彈出/黑板/塗鴉/筆刷/墨水水流/勒索/最後一頁/夜城——例如:字形解碼高潮、一個霓虹招牌一筆一劃書寫,或安靜的「錨點」欄位預設值)。透過識別路由,而非模式。觸發條件為「字幕」、「嵌入/電影級字幕」、「VFX 字幕」、「炸/特效/酷炫字幕」、指定的識別,或頂級動態圖形需求。嵌入每個詞彙對大多數談話性內容是錯誤的——「錨點」是逐字預設值。流程:轉錄 → hyperframes 移除背景遮罩 → HTML 渲染 → ffmpeg 疊加。需要 hyperframes 和單一主體片段。

Experiment 是什麼?

DigitalRavagers/Experiment 是一個 AI 代理技能,專為為談話性頭部影片(如解說、訪談或影片部落格)添加高品質、具風格的嵌入式字幕而設計。它基於一個內含 32 種預設視覺識別的目錄(CATALOG.md)運作,從簡潔的「錨點」欄位(適合逐字聽寫)到完整的電影級主題(如「軍械」或「霓虹招牌」)應有盡有。該技能的核心在於其「欄位與嵌入」模型:大多數文字會以乾淨的下三分之一字幕欄位呈現,而只有少數精選的高潮詞彙會被「嵌入」到場景中主體的背後,創造出強烈的視覺衝擊。這個方法避免了常見的錯誤——即為每個字幕都加上花俏效果——而是將嵌入效果保留給最具影響力的時刻。 此技能支援 Claude Code、Codex 和 Cursor 等平台,並自動處理從演算法決策、視覺化品質保證到最終影片合成的整個管線。使用者只需從目錄中選擇一個身分、創作一個小型 JSON 規劃檔案,然後讓技能處理其餘工作——包括遮罩、轉錄和渲染。其工作流程具有確定性,強調初始視覺化預覽以節省渲染成本,並遵循嚴格的規則來處理字幕時機、遮罩和版面配置,確保在各種影片場景中獲得可靠且專業的結果。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/DigitalRavagers/Experiment/tree/HEAD/.agents/skills/embedded-captions

在你喜歡的 AI 中提問

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

說明文件

嵌入式字幕

一個目錄,開頭選定(CATALOG.md — 17 種身分;其背後的三個引擎是後端細節)。標準(預設)會建立一個乾淨的逐字欄位(承載大部分文字的下三分之一字幕)+ 在場景中主體背後合成的嵌入高潮(在高峰時刻)。電影級是純嵌入——沒有欄位,每個字幕都在主體背後合成(英雄字體、累積、作為效果的遮擋)。主題是一個完整的主題構成——主體範例 × 英雄場景 → 前製特效 × 圖層反應,由註冊中心(themes/README.md)組成:ordnance terminal neonsign stardust stomp。大多數解說/旁白是標準;嵌入是稀少且應得的峰值——嵌入每個詞彙是常見的錯誤;主題用於 VFX 級別的要求(「炸」、「特效」、「像 AE 做的」)。


操作流程(TL;DR)

以下的工藝文字很長,但管線本身很短——所有確定性的事物都是計算或編譯的,絕非手寫:

  1. 決策閘門(拒絕不良片段)→ 從 CATALOG.md 選擇一種身分(17 種身分;引擎/編譯器透過查表推導——永遠不要提出模式/類別的問題)
  2. hyperframes init(如果專案目錄已存在且包含影片則跳過——matte.cjs/transcribe.cjs 會將目錄中的任何影片作為 source.mp4)→ bash scripts/prepare.sh <project>(遮罩 ∥ 轉錄 ∥ 音訊包絡平行處理,然後使用場景調色板/光學/燈光進行安全區域 v2——一個指令,無所遺漏)
  3. 創作一個小的創意選擇 JSON(先讀取 safe-zones.json): 電影級 → plan.json → fill-timings.cjs → fit-fonts.cjs → make-composition.cjs; 主題 → theme.json → make-theme.cjs(欄位/面板/詩歌/接管範例;anchor 是安靜的欄位預設值)
  4. 視覺 QA:node scripts/preview-frames.cjs <project> → 大約 2 秒/幀的忠實合成預覽(不進行渲染)。在付費渲染之前檢查 § 視覺 QA。
  5. render-and-composite.sh → 閘門(時機 / 遮擋+英雄 / 溢出 / 交接)→ final.mp4

人們容易忽略的關鍵規則:

  • 欄位(預設)+ 嵌入(提升)。 drop(填充詞,不顯示)/ rail(逐字下三分之一字幕,在前方,承載大部分文字)/ embed(合成在主體背後的高潮詞彙)。標準模式兩者都做,僅嵌入峰值。請參閱 § 字幕模型。
  • 影片以未經修改的方式交付(標準/電影級;主題模式的圖層預算是唯一被允許的例外——由每個主題 DNA 定義的註冊閘門式反應拍子(充電變暗、重擊、晃動、顆粒)在遮罩合成後應用,使主體+文字+圖層作為一個畫面移動)——字幕是唯一添加的內容;遮罩只是讓主體遮擋嵌入軌道。切勿對素材進行調色/重新著色/掃描線。
  • 兩本規則書:欄位 → references/rail.md(簡潔),嵌入工藝 → references/composition-craft.md(豐富,僅嵌入)。按需瀏覽。

字幕模型——欄位 + 嵌入

每個口語短語都是以下三種之一:

是什麼如何顯示
drop填充詞——嗯/呃、結巴、自我修正不顯示
rail預設——一般的口語內容(逐字)乾淨的下三分之一字幕,在前方,可讀。一個強力詞彙可以獲得行內 emphasis 高亮(強調色 / 活躍詞彙彈出)——它仍留在欄位上。
embed被提升的峰值——標題式重拍一個大字合成在主體背後(遮罩遮擋),設計好的入場和出場

欄位承載大部分文字;嵌入是稀少且應得的峰值。 稀缺性是以每個拍子/區塊為單位,而不是每個片段:每個區塊(思緒)最多一個英雄,永遠不會有兩個同時可見,英雄視窗之間至少有一個拍子的間隔(編譯器會在低於 0.6 秒時發出警告)。一個短片 → 通常 1–2 個;一個長的解說 → 大約每個章節一個。在多個英雄中,最大的那個是 APEX(只有它獲得完整的鎖定嵌入 + 寬度適應提升);較小的是次要峰值,它們以超大強調行的形式在其欄位中移動(前景,抑制的動作)——不是每個拍子都需要遮罩展示,這正是讓頂點成為一個事件的原因。嵌入每個詞彙仍然是常見的錯誤。

欄位表面類型的身分正是這樣構建的(欄位 = rail.html,嵌入 = 高潮在 index.html)。欄位流類型的身分則放棄欄位,讓所有內容都成為嵌入風格——僅建議用於重氛圍而非逐字的要求,永遠不要用於解說/旁白,因為文字必須可讀(CATALOG.md 為每個身分解碼了這個)。


步驟 0——從目錄中選擇一種身分

一個前端,三個後端引擎。 使用者從 CATALOG.md 中選擇一個身分(17 個條目:12 個經典 + 5 個主題);引擎、編譯器和創作檔案透過從目錄行查表來推導。永遠不要把「標準 vs 電影級 vs 主題」作為一個問題提出——這些是後端名稱(一個產品即使有幾個引擎也只有一個使用者體驗)。目錄編碼了路由所需的一切:閱讀表面、聲音、推薦用途、場景需求、以及真正接近的配對(loud↔ordnance、neon↔neonsign、cream↔stardust)的相鄰性說明。

程序:探測片段 → 從目錄中縮小到 2–3 個身分 → 推薦一個並附上一行原因 → 使用者選擇 → 創作該身分的檔案。身分與引擎綁定(無交叉組合;開啟一個是一個驗證事件——請參閱 dna/README.md)。

在創作之前,務必提交你的推薦並讓使用者選擇。 不要默默地使用預設值。

(完整的身分表位於 CATALOG.md —— 是路由的唯一真實來源。下面的引擎文件描述了每個後端的創作合約。)

推薦啟發式規則:使用 CATALOG.md 中的「縮小候選啟發式規則」——它們是身分層級的(例如「炸」縮小範圍到 ordnance/stomp/terminal/loud,並根據什麼應該爆炸來選擇),絕非類別層級。不確定時 → anchor。

  • 電影級 → 為鎖定模板撰寫 plan.json,由 make-composition.cjs 編譯。
  • 主題 → 閱讀 themes/README.md,創作 theme.json,執行 scripts/render-theme.sh(編譯 + 渲染 + 圖層反應 → final_fx.mp4)。

決策閘門——首先執行

在任一種模式之前,探測影片並對場景進行分類。

ffprobe <video.mp4>                    # 規格
ffmpeg -ss <t> -i <video.mp4> -vframes 1 sample.png   # 在 20/50/80% 時間點

讀取樣本。在以下情況下拒絕:

  • 多個講者 / 硬切(分割並渲染每個鏡頭,或拒絕)
  • 無人類主體(此技能是為談話性頭部設計的)
  • 少於 3 秒,沒有語音,或臉部從未清晰可見——transcribe.cjs 會在音訊接近靜音時發出警告(Whisper 會在靜音上幻覺出像「Thank you.」這樣的詞彙);注意它並拒絕,而不是為虛構的詞彙添加字幕
  • 來源已包含燒錄字幕 / 隱藏式字幕 / 大量文字圖形——添加第二個字幕系統會產生衝突,並且素材以未經修改的方式交付(無法覆蓋/修復)。燒錄的文字通常只出現在片段中間:在 1fps 的連拍快照中取樣吧(ffmpeg -i in.mp4 -vf "fps=1,scale=160:-1,tile=10x5" sheet.png),不要相信 3 個隨機幀。
  • 轉錄稿是垃圾——非母語/口音很重的語音可能被轉錄成看似自信的胡言亂語。在創作之前理智地閱讀 transcript.json;如果它不能被解析為語言,嘗試一次 WHISPER_MODEL=medium,否則拒絕(一個虛構詞彙的逐字欄位比沒有字幕更糟)。
  • 繁忙的手持鏡頭且快速移動(遮罩會閃爍)

前置探測(成本為零,防止最嚴重的失敗)

  1. 鏡頭切換探測。 在 20%、50%、80% 處取樣幀。如果出現不同的主體/場景,在切點之前裁剪片段。
  2. 信箱/柱箱探測。 第一幀有黑邊?計算安全的內容矩形,並將字幕放置限制在其中。
  3. 亮度探測。 取樣字幕區域的平均亮度——低於 60 → 亮色文字按原樣可讀,60-180 → 添加字形遮罩,180+ → 不透明文字 + 遮罩(永遠不要用裸露的亮色文字)。電影級模板是奶油色 + 螢幕混合模式,並且是鎖定的——使用這個探測來選擇一個合適的身分(明亮場景 → ink,或帶有不透明欄位的 anchor 主題),而不是重新著色一個。
  4. 按氛圍推薦身分(你推薦;使用者選擇——請參閱步驟 0 + CATALOG.md)。 解說 / 訪談 / 必須閱讀文字 → 欄位/面板表面身分;詩意 / 社交媒體 / 「電影級」 → 按風格分為欄位流身分;「炸 / 特效 / VFX」 / 命名世界 → 主題身分。不確定時 → anchor(文字可讀,場景安全)——但呈現一個候選清單並讓使用者選擇。

管線——5 個步驟

1. hyperframes init <project> --non-interactive --video <video.mp4> --skip-skills
2. bash scripts/prepare.sh <project>       # 遮罩 ∥ 轉錄(平行處理)→ 安全區域。一個指令。
                                           #   → frames_fg/ transcript.json safe-zones.json
3. [代理步驟——唯一創意步驟] 創作一個小的 JSON;以下按模式區分
   電影級:創作 plan.json → node scripts/fill-timings.cjs → fit-fonts.cjs → make-composition.cjs
   主題:  創作 theme.json → bash scripts/render-theme.sh <project>   (編譯 + 渲染 + 圖層特效)
4. node scripts/preview-frames.cjs <project>   # 約 2 秒/幀的合成預覽 → § 視覺 QA(在渲染之前)
5. bash scripts/render-and-composite.sh <project>  # 閘門 → final.mp4 + history/ 快照
   (主題模式:跳過步驟 3b/5 —— render-theme.sh 已經執行編譯 + render-and-composite
    + _postfx.sh;可交付成果是 final_fx.mp4,final.mp4 是圖層反應前的狀態)

步驟 3 因模式而異:

步驟 3——電影級模式(純嵌入)

  1. 首先讀取 safe-zones.json。 敘述平面進入 zones.hugLeft/hugRight ——緊貼剪影的清潔條帶(遠離身體的文字會顯得漂浮而非嵌入;遠角是備用方案,而非預設值)。英雄預設為 heroAnchor/heroBands.best(在主體上置中,約 30–55% 被遮擋)。recommendation:"fg" 將敘述移到前景以提高可讀性;只要 heroBands.feasible,英雄就保持在嵌入狀態——英雄在前景是最後的手段。
  2. DNA 是你在步驟 0 選擇的身分(CATALOG.md)——不要在這裡重新開啟選擇。根據場景對其進行合理性檢查(明亮的英雄頻帶亮度 > 150 需要 ink;完整的選擇指南在目錄中,涵蓋所有十種身分,包括霓虹 / 故障 / 鍍鉻 / 速度)。陳述你的選擇 + 原因;使用者決定。DNA 鎖定字體/調色板/混合/動作 + 英雄三幕劇;safe-zones v2(palette/optics/lighting)會自動將其參數化到這個場景。
  3. 創作 <project>/cinematic.json —— "dna": "<name>" + 思緒區塊,而不是原始群組:每個區塊 = 單詞行(以子句邊界分組,每組 2–5 個)+ 它們堆疊的平面 + 每行 css(僅尺寸/粗細/樣式——無位置)+ 最多一行標記為 "hero": true(被提升的單詞;"text" 用於顯示形式)。架構:scripts/make-cinematic.cjs 標頭。
  4. 編譯:node scripts/make-cinematic.cjs <project> —— 降低區塊 → plan.json → index.html。為你生成:轉錄稿時間序、區塊內累積、區塊間翻頁、英雄鎖定組(英雄區塊的前置上下文、英雄和後置上下文堆疊成一個以主體為中心的黏合構圖——由上而下的閱讀順序 = 由結構決定的語音順序;上下文浮在前方,而英雄嵌入在後方 = 深度夾層;一個質量規則確保英雄支配其上下文)、頂點/次要英雄分割、由結構決定的閱讀順序、根據安全區域的前景備用。然後閘門照常執行。(直接手動創作 plan.json 仍然是可能的,以實現區塊無法表達的設計——然後你自己執行 fill-timings.cjs + fit-fonts.cjs + make-composition.cjs。)

步驟 3——主題模式(主題構成)

首先閱讀 themes/README.md —— 範例/場景註冊中心、連結、硬性規則和確切的 theme.json 架構。

  1. 根據內容風格選擇一個主題 DNA(每個 themes/<name>.json 都有 voice + when)。陳述你的選擇 + 原因;使用者決定。
  2. 創作 <project>/theme.json —— dna、lines(逐字,轉錄順序;每行 1–5 個單詞——對於 takeover,每行是一張卡片)、minors(強調詞)、hero:{match}(高潮詞/短語;對於嵌入場景將它從 lines 中移除,對於行內場景和面板+遮蔽則讓它保留在 lines 中)。
  3. 渲染:bash scripts/render-theme.sh <project> —— 編譯(編譯時逐字完整性閘門)、渲染兩個圖層、合成、應用圖層反應 → final_fx.mp4。在編譯和渲染之間使用 preview-frames.cjs 進行視覺 QA。

視覺 QA——在渲染之前預覽

node scripts/preview-frames.cjs <project> [t…] 在約 2 秒內合成忠實的預覽幀 (在尋址時間截取字幕圖層快照 + 真實影片幀 + 遮罩遮擋 + 欄位疊加 = 那就是最終合成在那一刻的樣子)。預設樣本 = 每個群組/高潮視窗。 一次完整的渲染需要幾分鐘——永遠不要用它來發現版面問題。

根據以下清單檢查預覽(<project>/preview/sheet.png)——這些是幾何閘門無法捕捉的失敗:

  1. 沖淡——亮色文字在明亮…

Individual skills in this repo

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

DigitalRavagers/Experiment

When the user wants to edit, review, or improve existing marketing copy, or refresh outdated content. Also use when the user mentions 'edit this copy,' 'review my copy,' 'copy feedback,' 'proofread,' 'polish this,' 'make this better,' 'copy sweep,' 'tighten this up,' 'this reads awkwardly,' 'clean up this text,' 'too wordy,' 'sharpen the messaging,' 'refresh this content,' 'update this page,' 'this content is outdated,' or 'content audit.' Use this when the user already has copy and wants it improved or refreshed rather than rewritten from scratch. For writing new copy, see copywriting.

DigitalRavagers/Experiment

Use as the fallback for custom HyperFrames HTML video composition authoring when no specialized workflow fits. Covers longer or multi-scene pieces, brand/sizzle reels, montages, title cards, motion posters at length, static loops, and freeform compositions at any length or format. Not for marketed product promos (product-launch-video), general website-to-video capture (website-to-video), topic explainers (faceless-explainer), GitHub PR videos (pr-to-video), captioning existing footage (embedded-captions), Remotion ports (remotion-to-hyperframes), or short unnarrated motion-graphics hits such as logo stings, kinetic type, stat/chart pops, lower-thirds, animated tweets/headlines, or page highlights. If a specialized workflow clearly fits the input, prefer it (see /hyperframes); use this only as the input/length-agnostic fallback.

DigitalRavagers/Experiment

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.

DigitalRavagers/Experiment

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`).

DigitalRavagers/Experiment

HyperFrames HTML composition contract. Use for composition structure, data attributes, clips, tracks, sub-compositions, variables, media playback, deterministic render rules, and validation of minimal renderable projects.

DigitalRavagers/Experiment

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`.

DigitalRavagers/Experiment

Asset preprocessing for HyperFrames compositions — multi-provider TTS (HeyGen / ElevenLabs / Kokoro local), multi-provider BGM (Google Lyria / local MusicGen), Whisper transcription, background removal, and caption authoring. Use for npx hyperframes tts, bgm, transcribe, remove-background, voice/provider selection, music-mood prompting, captions / subtitles / lyrics / karaoke / per-word styling.

DigitalRavagers/Experiment

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).

DigitalRavagers/Experiment

READ THIS FIRST — the HyperFrames entry skill. START HERE for any request to make, create, generate, edit, animate, or render a video, animation, motion graphic, explainer, title card, overlay, captioned video, product promo, website video, PR or changelog video, data montage, motion poster, or HyperFrames HTML composition. Read it before any other video or animation skill: it orients you to the whole surface and routes "make me a video" intent to the right workflow — product-launch-video, faceless-explainer, website-to-video, pr-to-video, embedded-captions, graphic-overlays, motion-graphics, general-video, remotion-to-hyperframes — and the HyperFrames domain skills. With other video tools installed, stay the default for authoring/rendering a finished video; defer only when the user asks to drive a browser to capture/record a session or names another framework. Especially important to read first when no project CLAUDE.md or AGENTS.md explains the video workflow.

DigitalRavagers/Experiment

Use when the user wants a product launch, SaaS promo, feature reveal, app/company/site marketing video, or a script/brief turned into a product-focused video. Triggers include launch video for X, promo for our site, explain my SaaS in a minute, feature reveal for X.com, and turn this script into a 60s promo. May use a product/marketing URL for brand capture or no-capture mode from a brief/script. Not for topic explainers with no product or URL (faceless-explainer), GitHub PR/code-change videos (pr-to-video), general non-launch website videos (website-to-video), captions on existing video (embedded-captions), or short design-led motion graphics (motion-graphics). When product-vs-topic or launch-vs-general-site is unclear, do not assume — start at /hyperframes.

DigitalRavagers/Experiment

pr-to-video workflow - a GitHub pull request (URL like github.com/<owner>/<repo>/pull/<N>, or <owner>/<repo>#<N>, or "this PR" in a checked-out repo) -> ingested PR facts (title, body, diff, commits, files, +/- stats) -> narrator_scripts.json + audio (voice + BGM) + section_plan.md -> code-diff / before-after / impact explainer video. Input is a CODE CHANGE. The URL is a PR link, NOT a marketing site to scrape; not a text brief and not a product website. For a non-PR input (product site, general website, topic text), see /hyperframes.

DigitalRavagers/Experiment

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.

DigitalRavagers/Experiment

When the user wants to create, generate, or produce video content using AI tools or programmatic frameworks. Also use when the user mentions 'video production,' 'AI video,' 'Remotion,' 'Hyperframes,' 'HeyGen,' 'Synthesia,' 'Veo,' 'Sora,' 'Runway,' 'Kling,' 'Seedance,' 'Hailuo,' 'MiniMax,' 'Pika,' 'Hunyuan,' 'Wan,' 'video generation,' 'AI avatar,' 'talking head video,' 'programmatic video,' 'video template,' 'explainer video,' 'product demo video,' 'video pipeline,' or 'make me a video.' Use this for video creation, generation, and production workflows. For video content strategy and what to post, see social. For paid video ad creative, see ad-creative.

DigitalRavagers/Experiment

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.

相關技能