Communitygithub.com

akshayDev17/ai-explainer-video

為一個完成的影片產生 YouTube 章節與英文字幕。這是課程內容解說影片流程的第六階段。

ai-explainer-video 是什麼?

這個技能是「explainer-video-from-coursework」管線的第六階段,主要負責為已完成的影片產生 YouTube 章節與英文字幕。它會讀取先前階段產生的 `out/<name>/<NN>/timeline.json` 和 `narration/<key>.src` 檔案,然後寫出 `publish.json`,再透過工具將其轉換為「description.md」(包含摘要與章節區塊的純文字)和「captions.srt」兩個檔案。技能支援 Claude Code、Codex CLI 與 Cursor 等平台,並遵循 YouTube 章節規範:第一個時間碼必須為 `0:00`、至少 3 個章節、每個章節至少 10 秒、標題長度不超過 40 字元且不重複。此外,它會進行嚴格的校驗,確保所有時間碼遞增且區段鍵值均能解析。值得注意的是,章節功能依賴於頻道的進階功能資格,因此即使格式正確,未符合資格的頻道仍不會顯示章節進度條,但時間戳記仍可作為跳轉連結使用。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/akshayDev17/ai-explainer-video/tree/HEAD/skills/craft-video-publish

在你喜歡的 AI 中提問

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

說明文件

craft-video-publish — 章節與字幕

屬於 explainer-video-from-coursework 管線的一部分 — 階段 6,共 8 階段。

此管線的工具與場景主機位於同一個 explainer-video-from-coursework 技能中:請以 node ../explainer-video-from-coursework/tools/<tool>.mjs 執行,並相對於此技能資料夾進行解析。請從專案目錄執行,讓 out/ 暫存目錄位於你的筆記旁。

先決條件: out/<name>/<NN>/timeline.json 和 narration/<key>.src — 兩者皆需在場景階段退出後才能使用。

AI 會寫入 out/<name>/<NN>/publish.json — 包含章節列表(segments 鍵值加上 title)和一段摘要(blurb)。工具會解析時間碼、驗證,並在 --dest 目錄中產出兩個檔案:description.md(摘要,接著是章節區塊,為可直接貼上的純文字)和 captions.srt。

  • 章節 — M:SS 標題,僅包含開始時間,預設每個區段一個;若需合併,則在一個列表中使用兩個鍵值,章節時間為第一個區段的視窗開始時間。標題需從旁白腳本取得 — 不得使用場景的 stageNames(大寫、可能遺漏、或成對近似)。
  • 字幕 — 每個區段一個提示,文字來自 narration/<key>.src(即用於產生 WAV 檔案的確切文字 — 音訊才是最終依據,而非 script.json)。
  • 嚴格檢查 — 第一個時間碼必須為 0:00 · 至少 3 個章節 · 每個章節至少 10 秒 · 時間碼遞增 · 每個區段鍵值都能解析 · 標題長度不超過 40 字元,且不重複或近似 · 提示時間碼遞增且不重疊。

章節需要頻道資格。 章節是 YouTube 的進階功能:尚未取得進階功能資格的頻道,即使章節列表完全符合規範,也不會顯示章節 — 時間戳記仍可作為跳轉連結使用,但分段進度條和 Google 關鍵時刻不會出現。description.md 中的內容不影響此結果,因此缺少章節並非格式錯誤:0:00(一位數)、時間碼後的 -、區塊上方的摘要以及 2:39 的總時長,均已在使用者合規頻道上實際驗證過,且上述嚴格檢查已完全符合 YouTube 的規則。

完成條件為: publish 命令退出碼為 0,且兩個檔案已存放於 MP4 檔案旁。

維護

若你修改此檔案,或使用者要求變更此階段,請告知使用者必須同步更新主要 explainer-video-from-coursework 技能中的「階段 6 — /publish」章節,並在回覆中指明該章節名稱。

Individual skills in this repo

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

akshayDev17/ai-explainer-video

Assemble one video from its segments — render each window silent, concatenate, mux the narration once, and verify. Stage 8 of explainer-video-from-coursework.

akshayDev17/ai-explainer-video

Synthesize narration and build the measured timeline for one video. Stage 4 of explainer-video-from-coursework — the one-shot TTS primitive.

akshayDev17/ai-explainer-video

Retitle and curate the videos in an explainer-video plan — write enrichment.json and merge it. Stage 2 of explainer-video-from-coursework; run it alone to retitle an existing plan.

akshayDev17/ai-explainer-video

Decompose a coursework notes directory into an explainer-video plan and prove no content-bearing section is dropped. Stage 1 of explainer-video-from-coursework; run it alone to (re)plan a directory.

akshayDev17/ai-explainer-video

Render one scene config over one time window to an MP4 (or a handful of QA stills). Stage 7 of explainer-video-from-coursework — the render primitive.

akshayDev17/ai-explainer-video

Author and iterate the animated visuals for one video's segments. Stage 5 of explainer-video-from-coursework; it re-invokes the audio stage when a beat needs a hold.

akshayDev17/ai-explainer-video

Write and validate the spoken narration for one explainer-video. Stage 3 of explainer-video-from-coursework; run it alone to (re)write a video's script.

akshayDev17/ai-explainer-video

Plan an explainer-video series from a directory of coursework notes — decompose into videos (proving nothing is dropped), retitle and curate, write the narration, synthesize the audio, author the visuals, then render and assemble the finished cut. Use when the user wants to turn structured coursework notes into explainer videos.

相關技能