Communitygithub.com

MengTo/Skills

從 Codex 應用程式內瀏覽器截圖,製作出流暢的 60 fps 4:3 4K 瀏覽器螢幕錄影風格影片,支援瀏覽器範圍裁切、自然的 macOS 游標樣式、精心設計的點擊動作、縮放追蹤構圖、ffprobe/縮圖驗證,以及可選的原生錄製相容性檢查。

Skills 是什麼?

這項技能專為 AI 代理(如 Codex)設計,可將瀏覽器操作過程轉化為高品質的螢幕錄影。它不使用傳統的螢幕錄製 MCP,而是透過瀏覽器 API 取得截圖,再以 Python 腳本將其渲染成專業級影片。這使得錄製不受桌面環境限制,更可靠且易於重現。技能支援 4K 4:3 解析度、60 fps 幀率,並能生成帶有真實 macOS 游標、細微點擊動畫及智慧縮放追蹤的影片,非常適合製作 Dribbble/UI 靈感展示或產品示範。它定義了從瀏覽器控制、截圖保存、游標與鏡頭動畫,到最終的 ffprobe 驗證的完整工作流程。此技能完全自包含,只要安裝了技能資料夾與必要的本地工具(Python/Pillow/ffmpeg),即可在另一個 Codex 實例上直接執行渲染腳本。

相容平台~Claude Code✓Codex CLI✓Cursor
npx skills add https://github.com/MengTo/Skills/tree/HEAD/agent-skills/codex/browser-video-recording

在你喜歡的 AI 中提問

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

說明文件

瀏覽器影片錄製

依賴模型

將工作流程分為三個層次:

  1. 瀏覽器控制與來源影格:透過 Browser 技能/MCP 使用 Codex 應用程式內瀏覽器。當使用者要求 Codex 瀏覽器或專案要求不使用 Chrome 時,請勿使用 Chrome。瀏覽器層提供真實的螢幕截圖以及真實的點擊/滾動/導航狀態。
  2. 本地影片渲染器:使用隨附的 Python 腳本將螢幕截圖渲染成 MP4,包含自然的 macOS 游標、微妙的點擊縮放效果以及平穩的縮放追蹤構圖。這不需要螢幕錄製 MCP。
  3. 可選的原生錄製器整合:僅在可呼叫且對啟動/停止實際應用程式錄製或開啟生成的專案明確有用時,才使用原生錄製 MCP。如果無法使用、被封鎖或無法捕捉 Codex 瀏覽器畫面,則回退至截圖轉影片渲染器,並說明回退原因。

自包含執行

只要安裝了完整的技能資料夾(包含 scripts/render_browser_demo.py),此技能足以讓另一個 Codex 實例執行 Python 渲染。Codex 應執行隨附的腳本,而非重新建立渲染器。

所需的本地工具:

  • python3
  • Python 套件 Pillow
  • ffmpeg 和 ffprobe

可選的 macOS 游標提取使用 swift 和 /usr/sbin/screencapture。如果這些工具不可用,請透過 cursor_asset 提供透明 PNG,並在設定中設定 cursor_hotspot。

仍然需要 Browser 技能/MCP 來獲取最新的 Codex 應用程式內瀏覽器截圖。如果無法使用,請使用可用的最佳瀏覽器自動化截圖來源,並說明回退情況。

可選的原生錄製器支援

對於原生應用程式錄製,請驗證 MCP 是否支援:

  • 使用 frameRate: 60。
  • 使用 resolutionRawValue: "4K"。
  • 對於區域錄製,使用 ratioPresetRawValue: "4:3"。
  • 當裁切到內嵌瀏覽器視口時,使用明確的 selectedRegionOnScreen。

對於本地渲染器,4K 4:3 意味著 3840x2880。如果原生錄製器暴露了 4K 列舉,則將其視為應用程式端的解析度預設,並在透過該 MCP 錄製時搭配 4:3 區域選擇。

捕獲工作流程

首先使用 browser:control-in-app-browser。載入其文件後,使用 Node/browser API 驅動應用程式內瀏覽器:

  • 將視口設定為 1920x1440 以獲得 4:3 4K 輸出,然後在完成前重置它。
  • 導航到請求的頁面並執行實際的點擊、返回、搜尋和滾動。
  • 在每個重要的狀態變更後保存僅限瀏覽器的螢幕截圖。使用類似 01-results-top.png、02-after-card-click.png、03-back-results.png 的名稱。
  • 記錄每個點擊/滾動目標的視口座標。最終的游標路徑應落在這些點上,暫停,點擊,然後移動到下一個有意義的點。

除非使用者明確需要系統 UI,否則避免桌面座標自動化。Codex 瀏覽器的可見性可能無法暴露可捕捉的 macOS 畫面;來自瀏覽器 API 的螢幕截圖是可靠的來源。

動作規則

讓游標感覺有目的性:

  • 使用稀疏的、大部分是直線的游標路徑。
  • 在目標上短暫暫停後再點擊。
  • 不要在不相關的 UI 上遊走。
  • 讓頁面轉換發生在點擊之後,而不是之前。
  • 僅使用微妙的點擊回饋:縮放下降/反彈,除非要求,否則不使用裝飾性圓圈。
  • 讓縮放追蹤比游標更平穩。鏡頭應構圖點擊的內容,而不是追逐每一個微小的滑鼠移動。

預設視覺目標:

  • 從合成器提取的真實 macOS 指標,或現有的透明游標素材。
  • 游標比例 3.0,與常用於編輯過的示範錄影中的大游標風格相符。
  • 點擊動畫強度 15,以獲得微妙的點擊縮放下降效果。
  • 旋轉強度最高 8deg,僅來自水平速度。

渲染腳本

使用 scripts/render_browser_demo.py 進行確定性 60 fps 4:3 4K 輸出:

python3 /path/to/browser-video-recording/scripts/render_browser_demo.py \
  --config /tmp/browser-demo-config.json \
  --output /tmp/browser-demo-4x3-4k-60fps.mp4

生成入門設定:

python3 /path/to/browser-video-recording/scripts/render_browser_demo.py --write-template

設定提供:

  • shots:狀態名稱到截圖 PNG 路徑的映射。
  • scene_starts:[time, shotName, transition] 條目。
  • cursor_keys:[time, x, y] 視口座標條目。
  • camera_keys:[time, x, y, zoom] 條目。
  • click_times:點擊時間戳記。
  • duration、fps、output_size、source_size、cursor_scale。

偏好的預設值:

{
  "fps": 60,
  "output_size": [3840, 2880],
  "source_size": [1920, 1440]
}

如果省略了 cursor_asset,腳本會短暫顯示純色覆蓋層,並使用 screencapture 將真實的當前 macOS 游標提取到一個透明 PNG 中。這是本地渲染支援,不是 MCP 依賴。

驗證

始終驗證生成的影片:

ffprobe -v error \
  -show_entries stream=codec_name,width,height,r_frame_rate \
  -show_entries format=duration,size \
  -of json /path/to/output.mp4

提取至少一個影片中間的縮圖並檢查:

ffmpeg -y -ss 8 -i /path/to/output.mp4 -frames:v 1 -update 1 /tmp/browser-demo-thumb.png

確認:

  • 解析度是請求的輸出,通常為 4:3 4K 的 3840x2880。
  • 幀率為 60/1 或等效值。
  • 時長符合要求。
  • 游標可見、自然且位於目標上。
  • 影片已裁切為瀏覽器內容,而非桌面。
  • 瀏覽器視口覆蓋已重置。

Individual skills in this repo

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

MengTo/Skills

Generate ElevenLabs text-to-speech audio from scripts or inline text using local voice profiles. Use when the user asks for ElevenLabs, text-to-speech, TTS, narration, voiceover, speech audio, or voice generation; load voice names, voice ids, emails, owners, and account-specific defaults only from local config outside the skill.

MengTo/Skills

Profile, audit, and optimize frontend page performance with emphasis on animation work, memory-leak risks, long-session slowdowns, CSS animations, canvas/WebGL requestAnimationFrame loops, marquees, skeletons, GSAP/Three/Matter effects, timers, listeners, and observers. Use when the user asks to make animations performant, pause offscreen animations, look for memory leaks, profile pages that slow the computer over time, fix janky scrolling, reduce CPU/GPU use, or repeat the "only play in view" optimization on React/Vite/Next/frontend pages using Codex Browser.

MengTo/Skills

Turn a reference video into a super detailed recreation or inspiration prompt. Use when the user provides, mentions, uploads, links, or points to a video and asks to analyze the design, UI, animations, transitions, scroll interactions, typography, colors, assets, WebGL/Three.js, storytelling, section-by-section behavior, or to create a prompt/article that recreates the page, app, interaction, or motion system.

MengTo/Skills

Create an on-scroll animation trigger using IntersectionObserver with Tailwind-friendly animation classes and keyframes. Use when asked for scroll-reveal, animate-on-scroll, or sequencing element animations when they enter the viewport.

MengTo/Skills

Use when designing or implementing product-grade web motion like Stripe, Linear, Apple, and Vercel. Covers motion principles, easing/duration defaults, choreography patterns, scroll/hover interactions, performance, accessibility (reduced motion), and implementation guidance.

MengTo/Skills

Create premium cinematic web motion systems with GSAP, ScrollTrigger, and Lenis. Use for luxury editorial websites, creative studio portfolios, Awwwards-style interactions, smooth scroll reveals, staggered text, parallax, pinned sections, magnetic hover states, custom cursors, and mouse-reactive layered movement.

MengTo/Skills

Create cinematic scroll-driven landing pages with Lenis smooth scrolling, GSAP ScrollTrigger, scroll-linked progression, staggered text reveals, sticky card stacks, parallax backgrounds, scroll-scrubbed transitions, footer reveals, and immersive preloaders. Use when analyzing or building premium editorial scroll experiences, sticky project stacks, kinetic typography, or section-by-section storytelling.

MengTo/Skills

Use when designing or rewriting a high-converting SaaS pricing page (structure, plan design, copywriting, SEO/AEO, FAQs, layout patterns, experiments). Includes checklists, templates, and common pitfalls.

MengTo/Skills

Use when creating or refining WebGL-heavy landing pages and you need to steer toward a specific visual outcome (premium, technical, playful, cinematic) while balancing conversion clarity, performance, and implementation complexity.

相關技能