Communitygithub.com

fake-screencast

將靜態螢幕截圖轉換為模擬的螢幕錄影(TSX)——一個虛假的螢幕錄製,帶有動畫游標、更新中的瀏覽器網址列、頁面切換、濾鏡交叉淡變、平滑滾動和肯·伯恩斯縮放效果。

fake-screencast 是什麼?

這是一個專為 AI 代理開發人員設計的技能,用於從靜態螢幕截圖生成逼真的模擬螢幕錄影。它主要用於製作 Web 應用程式、儀表板或設定頁面的操作導覽,而不需要實際錄製螢幕。此技能基於 Remotion 框架中的 `screencast.tsx` 組件,支援自訂游標動畫、URL 變更、頁面導航和濾鏡效果。開發人員可以透過定義 `ScreencastPage` 陣列和游標關鍵影格,精確控制每個動作的時機和位置,從而與旁白同步。它適用於 Claude Code、Cursor 或 Codex 等開發工具,並與 `make-tsx` 工作流程整合,以處理時間軸、渲染和烘焙操作。

相容平台~Claude Code~Codex CLI✓Cursor
npx skills add https://github.com/raisaksham377-bot/youtube-shorts-ai-editor/tree/HEAD/.claude/skills/fake-screencast

在你喜歡的 AI 中提問

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

說明文件

fake-screencast — 螢幕截圖 → 模擬螢幕錄影

讓螢幕截圖導覽看起來像真實的螢幕錄影:持久的瀏覽器 chrome,帶有每頁變更的網址列、沿貝茲曲線移動到每個點擊目標並在點擊時產生漣漪效果的自訂游標、以硬切換方式進行的頁面導覽(URL 路徑變更)、以短交叉淡變方式實現的頁面內濾鏡效果(URL 查詢參數變更)、平滑滾動、緩慢的肯·伯恩斯縮放聚焦於重點元素,以及持續的漂移,使其看起來不像幻燈片。以 TSX 為優先:可控制、可重新渲染、可在不同影片中重複使用。

這是在 make-tsx(步驟 2)內部使用的場景構建技術。使用 make-tsx 處理 timeline.json / render / bake 機制以及與文字同步的原則;使用 vidtsx-2d-generator 處理維持 Remotion 檔案不崩潰的低層級規則(僅基於影格、單調的 interpolate、Easing.bezier、禁止 useState/useEffect)。你在此處編寫的鏡頭將遵循這些規則。

何時使用此工具(決策閘門)

  • 虛假螢幕錄影(此技能) — 你擁有或可以截取狀態的螢幕截圖,並且想要一個可控的導覽(游標路徑、高亮、縮放、與旁白同步的時機)。這是 P4 級別的“用於配置的真實 UI”,僅為模擬。最佳使用場景是導覽內容側重於位置所在/操作步驟,而不是原始速度。
  • 真實螢幕錄影 — 僅在重點是真正的證據時使用:真實的延遲、即時結果的出現、你無法可信地偽造的東西。在實際錄影到位之前,留下一個明確標記的 pending_recording 佔位符(參見 make-tsx)。
  • 單一靜態頁面克隆 — 如果是單一頁面,無需導航/游標(例如,你只想高亮或滾動瀏覽的定價頁面),請直接使用 lib/browser.tsx 中的 WebBrowserFrame。不要動用螢幕錄影機制。

步驟 1 — 獲取螢幕截圖(詢問使用者)

告知使用者你需要的確切鏡頭清單(每個游標停留的頁面或狀態一張截圖),然後等待他們。要求如下:

  • 已登入 / 真實資料、實際的產品 UI,並以一致的視窗大小擷取(理想為 ~1920 寬)。
  • 每個狀態一張,包括中間狀態:未篩選的清單和其篩選後的結果算作兩張截圖(交叉淡變可以營造出“已套用搜尋”的效果)。
  • 對於長頁面的真實滾動瀏覽,你需要一張高的擷取(整個頁面,包含摺頁以下的部分)——單一視窗截圖無法真正滾動(你最多只能偽造幾像素的漂移)。如果場景需要,請說明並要求提供高版截圖。
  • 按名稱詢問任何缺少的視圖(例如,“篩選至 X 的模型列表”、“切換 Y 後的設定頁面”)。

將它們儲存到 media/library/images/<service>/,並使用清晰的名稱(例如 account-home.png、workers-ai.png、models-all.png、models-flux.png)。在頁面中將其引用為 library/images/<service>/<name>.png(這是組件期望的 staticFile 相對路徑)。

步驟 2 — 函式庫 API(remotion/src/lib/screencast.tsx)

<Screencast pages cursor clicks box glow favicon appearAt />。座標使用分數,以便在調整大小時保持有效:

  • 游標 x/y 和點擊漣漪 → 視窗分數(頁面區域 在 網址列下方,範圍 0..1)。
  • 縮放 fx/fy → 圖片分數(平移的 transform-origin)。
import { Screencast, ScreencastPage, CursorKey } from '../../lib/screencast';

const PAGES: ScreencastPage[] = [
  { img: 'library/images/svc/home.png',  url: 'app.svc.com/…/home',        tabTitle: '首頁 | Svc',    enterAt: 0 },
  { img: 'library/images/svc/list.png',  url: 'app.svc.com/…/items',       tabTitle: '項目 | Svc',   enterAt: 130, transition: 'cut' },       // 導航 → 硬切換 + 新路徑
  { img: 'library/images/svc/filtered.png', url: 'app.svc.com/…/items?q=x', tabTitle: '項目 | Svc',  enterAt: 262, transition: 'crossfade', transitionFrames: 5,   // 頁面內篩選 → 交叉淡變 + 相同路徑 + 查詢參數
    drift: 0.01, zoom: { from: 1.0, to: 1.4, fx: 0.32, fy: 0.52, range: [266, 289] } },  // 肯·伯恩斯縮放至重點卡片
];

const CURSOR: CursorKey[] = [   // {frame, x, y} 使用視窗分數;每個段之間有緩動效果
  { frame: 0, x: 0.60, y: 0.42 }, { frame: 128, x: 0.09, y: 0.68 }, /* … */ { frame: 294, x: 0.36, y: 0.52 },
];
const CLICKS = [130, 206, 255]; // 產生漣漪效果的影格(放置在抵達關鍵影格處)

export const compositionConfig = { id: 'SvcRecording', durationInSeconds: 10.0, fps: 30, width: 1920, height: 1080 };
const SvcRecording = () => <Screencast pages={PAGES} cursor={CURSOR} clicks={CLICKS} />;
export default SvcRecording;

頁面欄位:img, url, tabTitle, enterAt(必填);transition?: 'cut'|'crossfade'(預設 cut)、transitionFrames?(預設 5)、scroll?: {to, range:[a,b], from?}(圖片 px translateY)、zoom?: {from,to,fx,fy,range:[a,b]}、drift?(預設 0.02 — 表示“活著”的持續緩慢推動)。Screencast 屬性:box?(預設 {x:60,y:63,w:1800,h:954})、glow?、appearAt?、favicon?(預設 Cloudflare 雲端圖示 — 對於其他服務請傳入你自己的)。

步驟 3 — 時機與座標

  • 影格 0 = 鏡頭的 master_in_s。對於 t 秒處的旁白提示:frame = round((t − master_in_s) × fps)。在 edited-transcript.json 中搜尋確切的詞語開始/結束時間(毫秒)。將點擊 / 頁面 enterAt 設定在詞語前幾影格,以便 結果 與詞語同時出現;將肯·伯恩斯縮放的 zoom.range 的結束點對齊重點詞語。
  • 從螢幕截圖中找到點擊目標的分數:元素的像素位置 ÷ 圖片寬度/高度 ≈ 視窗分數(圖片填滿頁面區域,頂部對齊,寬度自適應)。將游標的抵達關鍵影格設定在那裡,並在抵達後約 2 影格處加上點擊影格。然後渲染並查看(步驟 4)— 微調分數直到指標位於元素上。
  • 將每個頁面/游標移動序列對應到其提示:在介紹台詞時停留在儀表板 → 游標緩動到側邊欄項目並在該項目被提及時點擊 → 下一頁出現 → 在重點詞語被唸出時縮放到重點處。

常見陷阱(每個都花了一次渲染來發現)

  • 零高度包含塊。 WebBrowserFrame 將子元素包裹在一個 transform div 中,該 div 成為絕對定位子元素的包含塊,並摺疊為 0 高度。因此,頁面圖層需要明確的區域尺寸(來自 box 的 width/height),而不是 inset:0——函式庫已經處理了這一點;如果你擴展它,請保持這樣做。
  • 導航與篩選的區別是逼真度的關鍵。 頁面變更 = 硬切換 + 不同的 URL 路徑。頁面內搜尋/篩選 = 短交叉淡變 + 相同路徑(附加查詢參數)。混淆這兩者會看起來很假。
  • 單一視窗螢幕截圖無法滾動 — 改用 drift + 肯·伯恩斯 zoom 來偽造“生動感”。只在你擁有高版擷取時才使用真正的 scroll。
  • 預覽時使用 --scale=1 渲染(1080p,適用於 bake.py);最終 4K60 版本使用 --scale=2 重新渲染。
  • 游標熱點(尖端)靠近指標 SVG 的左上角;函式庫會為此進行微調。如果指標看起來偏移了幾像素,請調整目標分數,而不是 SVG。

步驟 4 — 驗證,然後交回給 make-tsx

  • 在每個提示處渲染 + 截圖(永遠不要只截一張靜止圖):node remotion/scripts/render-all.mjs --scale=1 <Id>,然後使用 ffmpeg 提取游標在目標上的影格、每個點擊影格、頁面變更影格以及縮放重點影格的畫面。確認指標落在元素上、URL 正確更改,並且縮放正確框住目標。迭代調整分數/影格並重新渲染。
  • 然後按照 make-tsx 進行其餘步驟:更新 timeline.json(交換/重新調整時間跨度,刪除任何 pending_recording 註解)、python tools/bake.py,以及對合成後的影格進行抽樣檢查,檢查該鏡頭相對於真實主版本在節拍處以及兩個邊界處的情況。
  • 如果你改進了組件(例如每頁的 favicon、真正的欄位文字輸入、字幕圖層),請將其推回 lib/screencast.tsx,以便未來的影片可以繼承這些改進。

規範形狀 — 複製此編排

一個看起來像真實螢幕錄影的動作序列,跨越約 4 個捕獲頁面和約 10 秒:

  1. 停留在登陸頁面,旁白進行設定(一個 drift 的節拍,永遠不要有凍結的影格)。
  2. 游標緩動到側邊欄項目,並在命名該項目的詞語上點擊——點擊應落在名詞上,而不是之前。
  3. 硬切換到該頁面,URL 路徑變更。這是一個導航。
  4. 輸入篩選條件 → 短交叉淡變,帶有附加查詢參數的相同路徑。這不是一個導航,將其渲染為導航是最大的破綻。
  5. 肯·伯恩斯縮放到重點處,恰好與重點詞語被唸出的時間一致。

在構建之前先閱讀 remotion/src/lib/screencast.tsx — 它是引擎,其屬性就是上述每個動作的文件。頁面陣列、游標關鍵影格、每頁的 URL 和縮放都在那裡有類型定義。

Individual skills in this repo

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

raisaksham377-bot/youtube-shorts-ai-editor

Makes this repo's videos look like YOUR channel instead of the house default — interviews you for palette, fonts, wordmark, motion energy, delivery specs and SFX taste, then rewrites brand.md + remotion/src/brand.ts + remotion/src/fonts.ts together and renders a proof card so you SEE it. Use whenever the user wants to set up or change their brand, rebrand the repo, "make it my colors/fonts", change the accent color, set their wordmark, adjust the motion feel, or asks why their videos look like someone else's. Run it once before the first video. Not for per-video art direction (that is /make-tsx) and not for thumbnails, which are deliberately louder than the brand (that is /packaging).

raisaksham377-bot/youtube-shorts-ai-editor

Build a split-frame vertical Short/Reel (1080x1920) from talking-head footage — real face cropped into the bottom half throughout, bespoke motion-graphic beats + word-by-word captions in the top half. Use when the user wants a "vertical short", "reel", "9:16 video", "split-frame" format, asks to keep their face on screen the whole time while graphics play above it, wants an in-context app/UI mockup moment (like clicking a button in a browser) without cutting away from their face, or hits caption-pill-covers-my-face / no-GPU-rendering / audio-duration-mismatch problems while building one. Covers the crop-offset technique for framing the face, the caption-pill safe zone, the top-half-only UI-mockup scene pattern, the full pipeline from raw footage to final SFX mix, and the environment gotchas (no NVIDIA GPU, AAC priming gap, comp-native transcode). Topic-agnostic — this is a layout/technique skill, not tied to any one video's content. Builds on /clean-cut, /make-tsx conventions, and /suggest-sfx; doesn't rep...

raisaksham377-bot/youtube-shorts-ai-editor

Voice/audio cleanup step of the AI Video Editor pipeline — diagnose a video's background noise, pick the right denoise method, and produce a cleaned master (voice isolated, levels preserved, video stream copied). Use when the user wants to "clean the audio / voice", "remove background noise", "denoise", "isolate voice", fix outdoor/room/water/hum/hiss noise, run ElevenLabs Voice Isolator or local RNNoise, A/B denoise methods, or produce a cleaned master for a video-N in this repo. Covers diagnosing the noise (spectrogram + levels), choosing eleven vs rnnoise by noise type, the sample A/B, tools/clean_voice.py, preserving levels (RMS-match, not LUFS), and rewiring the pipeline to the clean master. Not the SFX/music mix (that is /suggest-sfx + the final-mix step) and not the cut (that is /clean-cut).

raisaksham377-bot/youtube-shorts-ai-editor

Step 1 of the AI Video Editor pipeline — turn raw talking-head footage into a clean master cut. Use when the user wants to "clean cut", "cut the raw footage", "remove filler / dead air / bad takes", "tighten the pacing", produce cuts.json, run the cut editor, or render a cleaned preview/master for a video-N project in this repo. Covers audio extraction, AssemblyAI transcription, authoring cuts.json (keeps/cuts/fluff categorized), the cut policy (content-aggressive, pause-natural ~0.5s), QA + review docs, the local cut-editor UI, tight/natural previews, the final 4K60 render, and producing edited-transcript.json as the handoff to /make-tsx. Not for building TSX overlays (that is /make-tsx) or the raw TSX authoring rules (that is vidtsx-2d-generator).

raisaksham377-bot/youtube-shorts-ai-editor

Step 2 of the AI Video Editor pipeline — build the visual beats (Remotion TSX shots) over a project's master cut and bake a composited preview. Use when the user wants to add/edit overlays or full-screen animation segments, "make a shot / beat", implement an edit plan or a v2 update, retime a beat to the narration, re-render shots, or re-bake the video-N preview in this repo. Covers reading the plan + edited-transcript + brand + reusable kit, authoring shots library-first, syncing reveals to word times, updating timeline.json (cutaway vs overlay), rendering, verifying by screenshot, and baking with tools/bake.py. Defers raw TSX authoring rules to vidtsx-2d-generator and the cut itself to clean-cut.

raisaksham377-bot/youtube-shorts-ai-editor

Generates click-optimized YouTube packaging — 3 thumbnail bets under one fixed title, engineered for YouTube's built-in A/B/C thumbnail test, plus a value-forward description, then renders the thumbnails as real images. Use this whenever you want to package a long-form video or turn a video idea into titles and thumbnails. Triggers include how would you package this, title ideas for, thumbnail concept, package this video, A/B variations, and make this clickable. Calibrates to your channel's own CTR data if you have it. Long-form only, never Shorts. Not for non-YouTube copywriting.

raisaksham377-bot/youtube-shorts-ai-editor

Step 4 of the AI Video Editor pipeline — the SFX pass. Analyze a video's beats + narration and propose tasteful sound effects synced to them, drawing from (and growing) a shared, reusable SFX library, then render an SFX-mixed audition preview. Use when the user wants to "add SFX / sound effects", "suggest sfx", "score the transitions", "sound-design this beat", generate/source sound effects, build or extend the sfx library/catalog, author or audit a sfx-plan, or mix SFX over a video-N preview in this repo. Covers reading timeline + edited-transcript + brand §10, the library-first flow, generating misses with the ElevenLabs Sound Effects API, the per-video sfx-plan.json, the hard user-audit gate, and mixing with tools/mix_sfx.py (light voice ducking). Not the music bed (that is the final-mix step) and not the visual beats (that is /make-tsx).

raisaksham377-bot/youtube-shorts-ai-editor

Generate production-ready 2D TSX video files for VidTSX (Remotion-based) from a shot, scene, or video description. Use whenever the user wants to create or generate a VidTSX video, a 2D TSX shot or scene, an animated clip, title card, or rendered motion graphic — including when they describe a visual animation they want built, or say "make a shot", "build this scene", "generate the TSX", or "turn this into a video". Covers the mandatory file structure and composition config, dimension presets (horizontal/vertical/square), six style presets (minimalist, memphis, neo-brutalism, glassmorphism, neon, corporate), and the hard rules that keep renders from crashing, covering frame-based animation only (no useState/useEffect/setTimeout), strictly monotonic interpolate ranges, Easing.bezier not wrapper syntax, and the chroma-js and @remotion/paths import gotchas. Not for 3D/three.js compositions, general React work, or editing video files.

相關技能