Communitygithub.com

CleanExpo/Pi-Dev-Ops

最終步驟。合成 ElevenLabs 旁白、使用 `npx tsx render/render.ts` 產出 MP4、驗證時長/編碼/解析度/大小、上傳至 Supabase 儲存空間、透過 Telegram 傳送結果,並建立 Linear 工單。在 remotion-composition-builder 回報就緒後觸發。失敗模式(超時、掛起、型別錯誤)會升級至 Linear。

Pi-Dev-Ops 是什麼?

此技能是一個端到端的影片渲染與交付管線,旨在處理由 Remotion 組裝好的腳本,產出最終的 MP4 檔案。它會先執行型別檢查,並選擇性地為每個場景合成 ElevenLabs 旁白,然後調用 Remotion 的渲染器生成影片。渲染完成後,技能會驗證檔案的時長、編碼、解析度和大小是否合乎預期。接著將壓製好的 MP4 上傳至 Supabase 儲存空間,同時透過 Telegram 機器人傳送內嵌影片(若檔案超過 45MB 則改為發送連結),並在 Linear 中建立一個包含渲染 URL 和版本資訊的工單。此技能專為支援多個專案而設計,每個專案提供自己的 API 金鑰(ElevenLabs、Telegram、Supabase、Linear、Remotion License)。當金鑰缺失時,對應的功能步驟(如旁白或傳送)會安全地跳過。輸出檔案預設寫入呼叫專案下的 `.remotion-renders/` 目錄。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/CleanExpo/Pi-Dev-Ops/tree/HEAD/skills/remotion-render-pipeline

在你喜歡的 AI 中提問

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

說明文件

remotion-render-pipeline

將腳本轉換為已交付的 MP4。

觸發條件

  • remotion-composition-builder 回報 ready: true。
  • 使用者說「渲染它」/「發送它」,並帶有已知的工作任務。

輸入

  • jobId
  • composition — 與 src/Root.tsx 中 ID 匹配(例如 Explainer)
  • outputPath — 相對於 remotion-studio/output/
  • props — 完整的輸入屬性(品牌 + 分鏡 + ...)作為 JSON
  • linear — {teamId, projectId} 用於工單路由

方法

  1. 前置型別檢查 — cd remotion-studio && npx tsc --noEmit。若失敗,將錯誤返回給 remotion-composition-builder。
  2. 旁白合成 — render/voiceover.ts 將每個場景的 MP3 寫入 public/audio/{jobId}/scene-N.mp3(在 public/ 下以便 staticFile() 解析)。使用快取鍵 sha1(voiceId|style|text)。若缺少 ELEVENLABS_API_KEY 則跳過 — 腳本仍須僅以螢幕文字渲染。
  3. 渲染 — npx tsx render/render.ts --comp={composition} --out={outputPath} --props='{...}' --jobId={jobId}。設定 600 秒超時;若掛起或崩潰則重試一次。
  4. 驗證 — 檔案存在,時長 ±0.5 秒預期值,編碼 h264,解析度符合腳本,大小小於 100MB。
  5. 交付:
    • 上傳至 Supabase 儲存桶 remotion-renders — 簽署 URL,保留 90 天。
    • 透過 app.server.telegram_video.send_telegram_video()(共用工具)傳送至 Telegram。若檔案大於 45MB,則發送簽署 URL 連結而非內嵌上傳(Telegram 上限為 50MB)。
    • 在 {teamId}/{projectId} 下開啟 Linear 工單,包含:渲染 URL、來源簡報、BrandConfig 版本(src/brands/{slug}.ts 的 git SHA)、腳本檔案路徑。
  6. 狀態 — 將摘要寫入 .research/renders/{jobId}.json。

輸出

{
  "jobId": "ra-nir-explainer-2026-04-28T15-30-00",
  "mp4Path": "remotion-studio/output/ra-nir-explainer-2026-04-28T15-30-00.mp4",
  "supabaseUrl": "https://<project>.supabase.co/storage/v1/object/sign/remotion-renders/...",
  "telegramSent": true,
  "linearIssue": "RA-2049",
  "validation": { "durationSec": 60.0, "codec": "h264", "resolution": "1920x1080", "sizeMB": 12.4 }
}

邊界

  • 當 tsc --noEmit 失敗時,絕對不要執行渲染 — 會浪費 2-5 分鐘產生必定有問題的輸出。
  • 在渲染驗證通過之前,絕對不要自動合併來源 PR(腳本 + 品牌變更)。
  • 絕對不要將帶有 [DRAFT] 標記的渲染上傳到品牌儲存桶 — 草稿應傳送至 remotion-drafts。

失敗升級

  • 超時 / 掛起 → 終止,重試一次 → 若第二次仍失敗,則開啟 Linear 工單,設定 priority: 2,附上 stderr。
  • 驗證失敗(時長 / 編碼不符) → Linear 工單 priority: 3,附上差異與預期值。
  • Telegram 失敗 → 改以 send_telegram_document() 附加 .mp4 檔案。

重複使用的資源

各專案 API 金鑰

此技能從呼叫專案內部(Synthex、Pi-SEO、RestoreAssist 等)被調用。每個專案透過其自己的 .env / .env.local 提供自己的金鑰。技能絕不從 Pi-Dev-Ops 讀取金鑰。

渲染時必需或可選的環境變數:

  • ELEVENLABS_API_KEY — 旁白合成。若缺失 = 僅以螢幕文字渲染(記錄警告,渲染繼續執行)。
  • TELEGRAM_BOT_TOKEN, TELEGRAM_CHAT_ID — Telegram 傳送。若缺失 = 跳過 Telegram 步驟(MP4 仍會寫入磁碟並上傳至 Supabase(若有設定))。
  • SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY — 簽署 URL 上傳。若缺失 = 跳過 Supabase 步驟。
  • LINEAR_API_KEY — 工單建立。若缺失 = 跳過 Linear 步驟。
  • REMOTION_LICENSE_KEY — 任何商業渲染在 Remotion 的公平原始碼授權下需要。

從專案 Shell 的調用模式:

cd ~/Pi-CEO/Synthex
source .env.local                     # 專案自己的金鑰
cd ~/Pi-Dev-Ops/remotion-studio
npx tsx render/render.ts \
  --comp=Explainer \
  --out=$OLDPWD/.remotion-renders/synthex-launch.mp4 \
  --jobId=synthex-launch-$(date +%s) \
  --props='{"brand":"synthex","hookSec":8,"ctaSec":8,"storyboard":[...]}'

或透過 Pi-Dev-Ops 協調器 API 調用,該 API 在會話建立時繼承呼叫專案的環境。

輸出慣例:預設將 MP4 寫入 <呼叫專案>/.remotion-renders/(已加入 .gitignore)— 將每個專案的成品保留在其自己的目錄樹中。可使用 --out=... 覆蓋。

Individual skills in this repo

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

CleanExpo/Pi-Dev-Ops

Produce one or many consistent, on-brand faceless marketing videos from a topic: script, ElevenLabs voiceover with timestamps, one styled illustration per beat, ffmpeg stitch to 1080p, optional Unlisted YouTube upload. The look is a named style from styles.md (flat-line, hand-doodle, bold-kinetic, cinematic-photoreal, minimal-corporate, retro-print), so one command yields repeatable output per brand. The automated pipeline; distinct from faceless-video and video-director.

CleanExpo/Pi-Dev-Ops

Produce a faceless YouTube-style video (hand-drawn doodle / simple-illustration channels like Zen, Nick Invest) end-to-end from a single topic. ASKS FACT-vs-STORY mode first (non-fiction educational vs fiction storytelling) and branches the whole run — built to serve multiple clients/channels, not one fixed format. Reverse-engineers a proven reference video's script format, writes a new script in that format, generates an ElevenLabs voiceover with timestamps, creates one styled Artlist (AI Toolkit) image per timestamp, and stitches everything with FFmpeg — fully automated, no human recording. Use when the user says "faceless video", "/faceless-video", "doodle video", "make a YouTube short/long-form in the Zen style", or wants an organic faceless-channel content piece. Composes with video-distribution-strategist (channel/launch) and video-director (when motion/edit polish is wanted instead of stills).

CleanExpo/Pi-Dev-Ops

The 15+ year brand director extension of `brand-guardian` specifically for video — frame-by-frame audit of brand-mark integrity, Gun Metal `#1a1a1a` + Candy Red `#dc143c` consistency, NO AI slop, NO Lucide icons, custom geometric marks ONLY, real logos correctly placed. PASS / FAIL gate before any client-facing video ships. Use after `video-colorist` completes the grade pass.

CleanExpo/Pi-Dev-Ops

The 15+ year Director-of-Photography persona (Roger Deakins / Emmanuel Lubezki / Hoyte van Hoytema-tier) that owns shot composition, lens psychology, motion language, and the decision of which source (Remotion / Hyperframes / stock cinematic) each scene uses. Extends the existing `remotion-designer` + `remotion-motion-language` skills with a frame-by-frame shot-language framework. Use when the user says "cinematography", "shot list", "framing", "DoP", "lens choice", or invoked by `video-director` Phase 2.

CleanExpo/Pi-Dev-Ops

The 15+ year colorist persona (Light Iron / Company 3 / The Mill-tier) that applies per-brand LUT + grade pass to every Unite-Group video. Closes the "raw Remotion render colours" gap — today Remotion outputs whatever colours BrandConfig declares with zero cinematic grade. Use when the user says "colour", "grade", "LUT", "look", "cinematic finish", or invoked by `video-director` Phase 3 (post-production) after `video-sound-designer` mixes audio.

CleanExpo/Pi-Dev-Ops

The Creative Director persona that owns brief intake, composition selection and narrative POV for every Unite-Group video. ENTRY POINT for the Video Agency: use for any video creation brief (explainer, promo, social cut, demo reel, case study, testimonial, client video). Dispatches the full production team: script-writer, cinematographer, editor, sound designer, colorist, brand-guardian.

CleanExpo/Pi-Dev-Ops

The 15+ year platform-native distribution expert (early TikTok creator economy + YouTube algorithm + LinkedIn organic reach + IG Reels native specialist) that owns per-platform aspect ratio + duration cap + caption format + hook density + thumbnail composition. Extends `remotion-marketing-strategist` with platform-native specs locked per BrandConfig. Use when the user says "which platform", "distribution", "channel-fit", "thumbnail", "captions", or invoked by `video-director` Phase 4 (QA + Delivery) for per-platform cuts.

CleanExpo/Pi-Dev-Ops

The 15+ year screenwriter persona (Pixar / Apple keynote / Nike spot tier) that engineers hooks (0-3s), retention beats (7-15s), narrative tension curves, and CTA placement. Extends the existing `remotion-screen-storyteller` skill with a structural framework lifted from Pixar's 22 Rules + Apple keynote architecture. Use when the user says "script", "voiceover", "narration", "hook", "story arc", or invoked by `video-director` Phase 2.

CleanExpo/Pi-Dev-Ops

The 15+ year sound designer persona (Skywalker Sound / Sound Lounge / Audio Network-tier) that mixes ElevenLabs voiceover with music bed, sound effects, ambient texture, and audio polish. Closes the single biggest gap in the existing Remotion pipeline — today voiceover is the ONLY audio; this skill adds music + SFX + mix. Use when the user says "sound design", "audio mix", "music bed", "SFX", "score this", or invoked by `video-director` Phase 3 (post-production).

CleanExpo/Pi-Dev-Ops

Converts a BrandResearch dossier into THREE artifacts — (1) typed BrandConfig TypeScript at Synthex/packages/brand-config/src/brands/{slug}.ts (runtime/behaviour — voice, voiceover, motion, audience, channel, forbiddenWords); (2) spec-conformant {slug}.design.md at Synthex/packages/brand-config/src/brands/{slug}.design.md (visual tokens — colour, typography, spacing, components, layout, elevation); (3) human-readable 9-section .md projection at Pi-Dev-Ops/remotion-studio/src/brands/{slug}.md derived from BOTH. Boundary contract at Pi-Dev-Ops/remotion-studio/src/brands/CONTRACT.md. Triggered after remotion-brand-research, or when the user pastes brand assets and says "codify". PRs are auto-merge:false — a human reviews before merge.

CleanExpo/Pi-Dev-Ops

Researches a portfolio company's visual identity from public sources (homepage, about page, marketing copy, GitHub README) and produces a structured BrandResearch dossier. Triggered when `Synthex/packages/brand-config/src/brands/{slug}.ts` (canonical home per RA-1985 / Synthex SYN-897) is missing, older than 90 days, or the user explicitly says "refresh brand for {brand}". Output feeds remotion-brand-codify.

CleanExpo/Pi-Dev-Ops

Generates a complete, accessible palette (primary, secondary, accent, 4-step neutral, semantic, and dark variant) from one to three hex anchors plus a colour-family classification. Validates WCAG-AA contrast for all text-on-background pairs. Triggered when a BrandConfig has fewer than 5 defined colours or contrast fails.

CleanExpo/Pi-Dev-Ops

Authors or extends a Remotion composition (.tsx) wired to BrandConfig + Storyboard + layout spec + motion. The actual builder skill — runs as a Sonnet-tier worker. Triggered after brand, storyboard, designer, and motion-language outputs are ready. Produces the file under remotion-studio/src/compositions/ and registers it in src/Root.tsx.

CleanExpo/Pi-Dev-Ops

Visual-design specialist for Remotion compositions. Sets layout grid, typography hierarchy, white-space, scene framing, and visual rhythm for a given composition + brand. Triggered after remotion-composition-builder for QA, or upfront when authoring a new composition type. Produces a layout spec consumed by remotion-composition-builder.

CleanExpo/Pi-Dev-Ops

Use when a Remotion video needs creative direction — hook, visual sequence, scene purpose, motion restraint, and CTA direction before render.

CleanExpo/Pi-Dev-Ops

Use when a Remotion video has timing, sync, transition, caption, pacing, or audio-fit risk and needs editing discipline before render.

CleanExpo/Pi-Dev-Ops

Use when /remotion-video needs existing Synthex ElevenLabs, brand-config, Remotion, output storage, Claude, or Hermes integration without adding vendors.

CleanExpo/Pi-Dev-Ops

Tunes a video's format and message for the target channel — LinkedIn, YouTube, Instagram Reel, internal training. Sets aspect ratio, total duration, hook timing, CTA timing, and pacing. Triggered when the brief mentions a specific channel or campaign goal. Output feeds remotion-screen-storyteller and remotion-composition-builder.

CleanExpo/Pi-Dev-Ops

Designs a brand-specific motion vocabulary — easing curves, default scene durations, signature entry/exit, transition frames. Each brand gets one signature move (rise / sweep / pulse / iris / whip) that recurs across compositions to build motion-recognition. Triggered when BrandConfig.motion is empty.

CleanExpo/Pi-Dev-Ops

/remotion-video one-shot Remotion command skill and ENTRY POINT for the Remotion Skills Package. Use for video, explainer, ad, promo, reel, intro, social cut, marketing, training, or launch videos. Reads the brief, classifies intent, enforces one single Synthex ElevenLabs voice, emits a production/wave plan, and dispatches the right sub-skills in topological order. Always invoked first.

相關技能