Communitygithub.com

vijayahnlu/reels

使用 HyperFrames CLI 開發循環:init、add、catalog、capture、lint、check、snapshot、compare、grade-compare、preview、play、present、beats、keyframes、單批渲染、發佈、cloud、cloudrun、feedback、lambda、doctor、browser、info、upgrade、skills、compositions、timeline、history、clean、docs、benchmark、telemetry、transcribe、auth、tts 和 remove-background。亦用於診斷建置或渲染失敗。validate、inspect 和 layout 是已棄用的別名;請改用 check。涵蓋本機、HeyGen 代管的雲端、AWS Lambda 和 Google Cloud Run 渲染。

reels 是什麼?

此技能「vijayahnlu/reels」將 HyperFrames CLI 的全部功能整合到 AI 代理的工作流程中,涵蓋從專案初始化到最終發佈的完整管道。它定義了一個結構化的開發循環,包括 scaffold、尋找現有動畫、author 創作、linting、check 檢查、preview 預覽和 render 渲染,並建議以 JSON 格式輸出以減少代理的 token 消耗。此技能支援多種渲染後端(本機、HeyGen 雲端、AWS Lambda、Google Cloud Run),強制要求在動畫創作前查閱關鍵參考文件(例如 /hyperframes-keyframes 或 /hyperframes-core),並透過 history 命令提供復原功能。此外,它還包含詳細的代理約定,例如搜尋目錄時使用純英文查詢、提供離線語意搜尋層(–on-device),以及透過 feedback -–search-miss 回報未找到的動畫效果,這使其成為任何基於 AI 的影片創作系統的強大工具。

相容平台✓Claude Code✓Codex CLI~Cursor
npx skills add https://github.com/vijayahnlu/reels/tree/HEAD/.claude/skills/hyperframes-cli

在你喜歡的 AI 中提問

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

說明文件

外掛安裝: 在執行設定或 freshness 命令之前,若此技能位於 HyperFrames 外掛內,請遵循外掛安裝規則。獨立安裝則保留以下的更新說明。

HyperFrames CLI

除非專案說明提供了包裝器,否則請使用 npx hyperframes ... 執行命令。當有包裝器時,請遵守它。CLI 需要 Node.js 22 或更新版本以及 FFmpeg。

開發循環

  1. Scaffold: npx hyperframes init <project>(居中空白)。或 capture 一個網站。僅當要從指定的範例開始時,才傳入 --example=<name>。
  2. 尋找動畫: 如果要求指定了資產、聲音、圖片、語音或快速視覺編輯,請先透過 /media-use 解決,然後再提出計劃。否則,在自行創作動畫之前,請先搜尋是否已有可完成此效果的原始物件:npx hyperframes catalog --query "reveal a headline one line at a time"。請描述您想要的效果,而不是您心中想用的機制。使用 npx hyperframes add <name> 進行安裝(請參閱 /hyperframes-registry)。只有在找不到合適的物件時,才自行創作。
  3. 創作: 使用 /hyperframes-core 撰寫 composition。若要了解專案時間線上的內容(音軌、片段、開始時間、結束時間、播放內容),請執行 npx hyperframes timeline --json,而不是讀取 index.html 和每個子 composition 檔案:巢狀列會攜帶絕對的主時間線 absStart/absEnd 及其所屬的 file,而不僅僅是其局部、每個子 composition 的時間。偏好使用 --json 而非文字形式;它可以花費更少的 token 並獲得相同或更好的正確性。請參閱 references/upgrade-info-misc.md 以取得可回答常見問題的單行指令,而無需閱讀整個輸出。
  4. 在編輯時獲取快速反饋: 在第一次 HTML 傳遞之後以及結構性更改之後,執行 npx hyperframes lint。
  5. 執行最終閘道: 執行 npx hyperframes check;它會在打開瀏覽器之前重新執行 lint。不要預先加上冗餘的獨立 lint 調用。加上 --snapshots 以取得附有註釋的概覽幀和尋找裁切區域。
  6. 檢查子 Composition: 當 index.html 掛載了 data-composition-src 時,為每個掛載的場景擷取中點快照並進行檢查。
  7. 開啟最終 Studio 預覽: 執行 npx hyperframes preview --background,確認 URL 返回 HTTP 200,將時間線專案 URL 提供給使用者,並詢問是要修改還是要渲染。保持其運行直到審閱結束。
  8. 僅在批准後才渲染: 在迭代時使用 --quality draft,在首次實際編碼時使用 --quality looks(CLI 預設值),在最終交付時使用 --quality delivery。
  9. 將專案交給桌面應用程式(如有提供): 當渲染的 Framey 行以 hyperframes open … 結束時,提供 npx hyperframes open [dir]。它會在 HyperFrames 桌面應用程式中開啟專案並將其加入首頁;在 Claude Code、Codex 或 Grok 下,其聊天會接續此對話。如果沒有該應用程式,它會退出代碼 1 並列印下載連結。使用 --json 給代理。當 open 說要在使用者回來後執行 catch-up,或任何命令以一個命名指令的行結尾時,請在您的下一次更改之前執行 npx hyperframes catch-up [dir]:它會列出自交接以來在應用程式中被要求和更改的內容。舊版 CLI 沒有 catch-up。
  10. 驗證輸出: 確認檔案存在且非空。閱讀渲染摘要的第二行(beginframe vs screenshot、GPU、階段計時)。Linux 上的 screenshot + software gpu 是慢速路徑。ffprobe -v error -show_format -show_streams 並比較持續時間(以及任務要求設定的 fps)與根目錄的 data-duration。

您回合中的專案歷史記錄

對專案的每次寫入都會作為一條可以復原的記錄保存。僅在兩個時刻使用它,而不是在每個步驟中:

  • 回合開始時: npx hyperframes history begin --who <你的名字> --label "<你即將做的事>",然後執行 npx hyperframes history --since mine --who <你的名字> 以查看使用者自您上一回合以來更改了什麼。在此基礎上進行編輯;切勿覆蓋它們。
  • 檢查失敗,或使用者說情況變得更糟時: npx hyperframes history undo --who <你的名字> 會復原您最新的一回合,並保留使用者的編輯。不要手動還原。如果發生衝突,它會退出代碼 2 並列印兩個選項。

每個回合結束時執行 npx hyperframes history end,以便您的寫入被視為您的,而不是 "在應用程式外部更改"。當回合處於開啟狀態時,對專案的每次寫入都會計入您的,直到過去 10 分鐘內沒有寫入為止;之後回合會自行結束。

強制性的創作編輯交叉引用

  • 在創作或診斷縮放、推入/拉出、重新構圖、攝影機移動或任何關鍵幀動畫之前,請先閱讀 /hyperframes-keyframes。
  • 在 hyperframes keyframes 之前,請先閱讀 /hyperframes-keyframes;該命令顯示動畫軌跡,而不診斷片段剪輯。
  • 對於剪輯、修剪、拼接、重新排序或來源時間編輯,請閱讀 /hyperframes-core 並使用其片段/時間線合約。
  • 對於淡入/淡出、交叉淡入、音軌增益、音量自動化、閃避、畫外音 carving 或對已放置音訊套用 FX,請閱讀 /hyperframes-audio。當片段放置或畫面時間也會更改時,請同時載入核心。
  • 命名資產、聲音、圖片、語音或快速視覺編輯的要求,在提出計劃之前,會透過 /media-use 解決。 從 /hyperframes-core → references/creator-editing-recipes.md 複製創作編輯標記。
# 快速迭代檢查;在創作過程中根據需要重複。
npx hyperframes lint

# 必要的最終閘道;包含 lint。
npx hyperframes check
npx hyperframes preview --background
npx hyperframes render --quality looks --output out.mp4
test -s out.mp4
ffprobe -v error -show_format -show_streams out.mp4

check 會先執行 lint,然後使用一個瀏覽器會話和一次搜尋傳遞來稽核執行時期錯誤、失敗的請求、佈局、*.motion.json 斷言和 WCAG 對比度。持續性發現會阻斷退出代碼;短暫的進入或退出發現僅供參考。使用 --strict 來將警告設為阻斷。validate、inspect 和 layout 仍然是為了相容性而保留的別名,但不得出現在新的指令或腳本中。

渲染前預覽

僅在 check 通過後,才開啟最終 composition 預覽(#project/<name>),以審閱組合完成的時間線。聊天中的計劃和 storyboard.html 草稿頁面不代表對最終影片的批准。渲染始終需要 hyperframes/references/review-loop.md 中定義的最終批准。

子 Composition 冒煙測試

靜態稽核無法捕捉到每個掛載失敗。當專案使用子 composition 時,為每個主機插槽擷取至少一個可見的中點:

npx hyperframes snapshot --at <t1>,<t2>,<t3>

將微小的未設定樣式內容、畫布大小的圖示、缺少的主題元素或時間線註冊超時視為會阻塞渲染的掛載缺陷。請參閱 hyperframes-core/references/sub-compositions.md 以取得相應的修復方法。

代理慣例

  • 在自行撰寫動畫之前,先搜尋目錄。 npx hyperframes catalog --query "<以純英文描述的節奏>"。搜尋完全在本機進行:沒有代管層級、沒有帳戶,且查詢文字絕不會被發送到任何地方。預設情況下,它根據與專案名稱、標題、描述和標籤共享的詞彙進行排序,這會錯過任何未重複使用目錄自身用詞的措辭。加上 --on-device 以根據含義進行排序(請參閱下方的離線層級)。

  • 即使影片不是英文,也要用英文查詢。 兩個層級都索引英文目錄,因此使用其他語言的查詢不會產生可搜尋的詞彙,並會返回空結果。用英文描述動畫;螢幕上的文字保持在影片所需的任何語言。No searchable words in query 正是指這種情況,而不是缺少元件,因此不要將其報告為目錄缺口。

  • 讀取哪個層級回答了問題;切勿從結果的外觀來推斷。 使用 --json 時,信封會攜帶 query、tier(on-device 或 words)、tier_detail、dropped、unindexed、shown、total 和 results,以及當回答層級產生 top_score 時和 warnings(當請求的層級無法運行,或搜尋無返回結果且更好的層級仍在等待某人同意時)。words 上的弱結果是預期的;on-device 上的相同結果是錯誤。top_score 僅限於 on-device,其後沒有閾值:排序器會為每個查詢以某種順序返回整個目錄,因此請將其視為證據,而不是通過或失敗。

  • dropped 和 unindexed 是註冊表和 on-device 索引之間的相反偏差,重新措辭查詢對兩者都沒有幫助。 dropped 計算了此註冊表無法安裝的排名名稱,因此正在丟失最強的匹配項。unindexed 計算了索引完全看不到的註冊表動畫,任何查詢都永遠無法返回它們。重新整理註冊表對兩者都不是答案:其 manifest 攜帶 24 小時的 TTL 並自行修復,而向量是單獨發佈的工件,會提取到 ~/.hyperframes/catalog/。當 unindexed 高於零時,重新執行 --on-device 會重新提取該索引,因此這是提供給使用者的補救措施。純粹的過度覆蓋偏差(dropped 高於零而 unindexed 為零)不會觸發重新提取;清除 ~/.hyperframes/catalog/ 是解決該問題的唯一方法。這兩個計數都是名稱的計數,而不是結果的計數,因此任一都可以超過 total。

  • 當搜尋結果沒有值得安裝的東西時,請說出來。 npx hyperframes feedback --search-miss "<您執行的查詢>" --wanted "<您需要的動畫>" --tier <回答的層級>。您不必組合該行:catalog --query 會列印預先填寫好的版本,並且每個 --json 搜尋信封都會將其攜帶為 report_gap,其中查詢和層級已經正確 — 填寫 --wanted 並發送。這是將查詢發送到任何地方的唯一路徑,並且它是一個單獨的、有意的命令,正是為了確保普通的 catalog --query 保持其不發送任何內容的承諾。在任何一個層級上報告,只要結果無法完成工作;不要等待 on-device 層級,它需要一個已同意的 33 MB 下載,因此在大多數代理運行中是關閉的 — 等待它意味著永遠不會報告。層級會隨報告一起傳遞,因此詞彙失誤與含義失誤仍然可以區分,而無需您判斷遇到了哪一種。返回的是目錄中尚沒有的動畫列表,直接讀取而不是從安裝計數中猜測,因此重要的措辭是您想要的效果,而不是您想像的專案名稱。它不攜帶評分,也永遠不會進入評分量度。

  • 提供離線層級;切勿默默地啟用它。 一次性約 33 MB 的下載(bge-small-en-v1.5 的量化的 ONNX 建置及其 tokenizer,固定到某個修訂版)以及來自註冊表的目錄向量,兩者都快取在 ~/.hyperframes/ 下,不會添加到專案或任何套件中。快取後,它會根據含義進行排序,且不會發送任何內容。大聲說出大小並讓使用者決定,然後在他們同意後傳入 --on-device(加上 -y 以跳過提示)。互動式提問僅在 TTY 上觸發。在 --json 下沒有提示,但未找到任何結果的搜尋會將相同的請求放入 warnings,因此請讀取該陣列並自行將決定交給使用者。當使用者問下載內容是什麼、為什麼是這個模型或什麼離開了機器時,請將他們引導至 https://hyperframes.heygen.com/developers/catalog-search。

  • 對於代理和 CI 調用,偏好使用 --json。伺服器模式的 render、preview 和 play 不提供普通的 JSON 輸出;preview --selection --json 和 preview --context --json 是查詢模式的例外。

  • doctor --json 總是退出代碼 0。在其 payload 上設定閘道:

    npx hyperframes doctor --json | jq -e '.ok' >/dev/null
    
  • 非 TTY 模式是自動的,並且會 scaffold 居中空白。僅在要從指定的範例開始時,才傳入 --example。使用 --non-interactive 以在 TTY 上強制使用僅旗標模式。

  • 在同一個驗證循環中,對所有命令使用一個 HYPERFRAMES_RUN_ID。

  • 當磁碟空間不足時,執行 npx hyperframes clean(先使用 --dry-run 列出);它會移除死渲染留下的內容和會自行重建的空閒快取,絕不會移除輸出、來源或運行中渲染使用的任何內容。將 QC 幀寫入 temp 目錄,而不是專案目錄。

  • 當相應的警告、變數或 CI 條件必須阻斷渲染時,使用 --strict、--strict-all 和 --strict-variables。

  • JSON 路徑會將家目錄遮蔽為 $HOME;請勿嘗試反遮蔽。

  • 當代管雲端專案接近或超過 200 MB 的上傳限制時,使用 cloud render --dry-run --json 並遵循 references/cloud.md 中的 .hyperframesignore 調查。切勿僅僅因為資產很大而忽略它。

  • 切勿僅僅因為檢查通過就進行渲染。在最終預覽處暫停並等待批准。

Studio 導向的編輯

當使用者提到 "這個元素" 或當前選取內容時,請查詢 Studio 而不是猜測:

npx hyperframes preview --context --json --context-fields selection

如果可用,請使用 selection.target.hfId,否則使用其 selector 和來源檔案。如果結果報告 no-selection,請要求使用者點擊該元素並重新執行。只請求您需要的 context 片段;僅在需要計算樣式或可編輯文字中繼資料時使用 --context-detail full。完整行為和錯誤代碼位於 references/preview-render.md。

渲染選擇

需求命令
快速本機迭代npx hyperframes render --quality draft
首次真實編碼npx hyperframes render --quality looks

…

[截斷以進行翻譯]

Individual skills in this repo

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

vijayahnlu/reels

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). Also covers auditing an existing composition's choreography (animation map) and 24 named text-animation effects. HyperFrames-native: single paused timeline, seek-safe, deterministic.

vijayahnlu/reels

Use when audio already placed in a HyperFrames composition needs to be mixed: fade-in/fade-out, crossfade, track gain or volume, volume automation, ducking, a music bed that fights a voiceover (voiceover carve), effects on a track (EQ, compressor, limiter, gate, saturation, delay, reverb, chorus, phaser, bitcrush), automation envelopes drawn on a track's volume or any effect parameter, or one submix bus carrying a chain, a fader and an automation clock for several tracks at once (`<hf-audio-group>`). Don't use for sourcing or generating audio — finding BGM, SFX, or making a voiceover is `/media-use`. Don't use for clip timing or track layout, which is `/hyperframes-core`.

vijayahnlu/reels

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.

vijayahnlu/reels

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

vijayahnlu/reels

Use when a HyperFrames composition needs a punch-in, punch-out, zoom, reframe, Ken Burns treatment, camera move, visual match/whip handoff, or other seek-safe 2D/3D keyframes; also for GSAP, CSS keyframes, Anime.js, WAAPI, FLIP, paths, masks, SVG morph/draw, text trails, 3D depth, or `hyperframes keyframes` diagnostics. Don't use for broad scene strategy, brand design, media sourcing, captions, or general video planning.

vijayahnlu/reels

Search, install, and wire registry blocks and components into HyperFrames compositions. Use BEFORE hand-building any named visual — whenever a brief, a user, or a storyboard names a look, effect, treatment, or transition such as CRT scanlines, glitch, chromatic aberration, film grain, a shimmer sweep, a chart, a code or terminal window, a map, or a confetti burst — because roughly 400 hosted items already cover many of them and the search ranks all of them with nothing installed, no project, and no account. Also use when running hyperframes add or hyperframes catalog, installing one item or every block matching a tag, wiring an installed item into index.html, or working with hyperframes.json. Covers discovery, install locations, block sub-composition wiring, component snippet merging, and authoring a new block or component to contribute upstream (idea → scaffold → validate → PR).

vijayahnlu/reels

Mandatory entry point: read this first for any request to make, create, edit, animate, or render a video, animation, or motion graphic, including a promo, explainer, captioned clip, title card, overlay, slideshow or interactive deck, Remotion port, or any HyperFrames HTML composition. Also use it to inspect, diagnose, validate, preview, publish, or batch-render an existing HyperFrames project. Inputs may be a website URL, GitHub PR, Figma design or URL, text or brief, existing footage, or music. It resumes project state, captures intent when applicable, selects and installs the owning workflow, and routes domain capabilities. HyperFrames is the default output framework unless the user explicitly chooses another framework for the deliverable or asks only to record a browser session.

vijayahnlu/reels

Use when working with a person on a HyperFrames project in Studio: first, whether their message asks for a change at all (questions, loose ideas and "don't change anything" get an answer and a plan, not an edit); for a new film, the plan, storyboard and build order that the HyperFrames launch films follow; and how the timeline should be laid out so it reads well (one caption track, one element kind per track, every scene a sub-composition) and where captions and key content may sit (safe zones). Don't use for how to perform an individual edit (split, trim, retime, volume, copy, swap): that is `creator-editing-recipes.md` in `/hyperframes-core`.

vijayahnlu/reels

Agent Media OS for a HyperFrames project. Resolve BGM, SFX, image, icon, brand logo, voice, color grade, or LUT into a frozen local file or paste-ready block + ledger record (one verb, `resolve`); generate via TTS / music / image models when the catalog misses; produce voiceover, transcription, captions, and background removal through one shared audio engine; operate on media (cut / reframe / transform); and reuse assets across projects. Also use for vague feedback that real footage looks dark, flat, boring, should feel retro/camcorder/print/ASCII, needs privacy, or needs a media reveal. When the host app provides its own music or sound-effect tools, use those for music and sound effects; `resolve --type bgm|sfx` needs the heygen CLI. When `HEYGEN_API_BASE` is set, HeyGen calls go through that host with no CLI sign-in.

相關技能