Communitygithub.com

Biznomad/agent-skills

用於比較兩部影片、分析壓縮結果或品質差異的技能。能產生互動式 HTML 報告,提供品質指標 (PSNR、SSIM) 和逐幀視覺比較。當使用者提及「比較影片」、「影片品質」、「壓縮分析」、「壓縮前/後」或要求對壓縮影片進行品質評估時觸發。

agent-skills 是什麼?

這項技能提供了一個強大的影片比較工具,專門用於分析壓縮前後的影片品質差異。它會自動提取影片元數據,計算 PSNR 和 SSIM 等關鍵品質指標,並生成一個自包含的互動式 HTML 報告。報告內含逐幀視覺比較、滑桿、並排和網格三種檢視模式,以及縮放控制功能。此工具對於需要評估編解碼器效能、位元率降低影響或驗證壓縮品質的開發者與影片工程師特別有用。支援 macOS、Ubuntu/Debian 與 Windows 平台,並能處理常見的影片格式;所有驗證與錯誤處理都已內建,確保安全可靠的執行。

相容平台~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Biznomad/agent-skills/tree/HEAD/video-comparer

在你喜歡的 AI 中提問

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

說明文件

影片比較器

概述

比較兩部影片並產生一個互動式 HTML 報告,用以分析壓縮結果。該腳本會提取影片元數據、計算品質指標 (PSNR、SSIM),並以三種檢視模式(滑桿、並排、網格)建立逐幀視覺比較。

何時使用此技能

在以下情況使用此技能:

  • 比較原始影片與壓縮後的影片
  • 分析影片壓縮品質與效率
  • 評估編解碼器效能或位元率降低的影響
  • 使用者提及「比較影片」、「影片品質」、「壓縮分析」或「壓縮前/後」

核心用法

基本指令

python3 scripts/compare.py original.mp4 compressed.mp4

產生 comparison.html,包含:

  • 影片參數(編解碼器、解析度、位元率、時長、檔案大小)
  • 品質指標(PSNR、SSIM、大小/位元率降低百分比)
  • 逐幀比較(預設:每 5 秒擷取一幀)

指令選項

# 自訂輸出檔案
python3 scripts/compare.py original.mp4 compressed.mp4 -o report.html

# 自訂幀間隔(數值越大,幀數越少,處理越快)
python3 scripts/compare.py original.mp4 compressed.mp4 --interval 10

# 批次比較
for original in originals/*.mp4; do
    compressed="compressed/$(basename "$original")"
    output="reports/$(basename "$original" .mp4).html"
    python3 scripts/compare.py "$original" "$compressed" -o "$output"
done

需求

系統相依性

FFmpeg 與 FFprobe(影片分析與幀提取所需的工具):

# macOS
brew install ffmpeg

# Ubuntu/Debian
sudo apt update && sudo apt install ffmpeg

# Windows
# 從 https://ffmpeg.org/download.html 下載
# 或使用:winget install ffmpeg

Python 3.8+(使用型別提示、f-string、pathlib)

影片規格

  • 支援格式: .mp4(建議)、.mov、.avi、.mkv、.webm
  • 檔案大小限制: 每個影片 500MB(可配置)
  • 處理時間: 一般影片約需 1-2 分鐘;視時長與幀間隔而定

腳本行為

自動驗證

腳本會自動驗證:

  • FFmpeg/FFprobe 是否已安裝且可用
  • 檔案是否存在、副檔名及大小限制
  • 路徑安全性(防止目錄遍歷攻擊)

驗證失敗時會顯示清晰的錯誤訊息與解決指引。

品質指標

腳本計算兩個標準品質指標:

PSNR(峰值訊號雜訊比): 像素層級的相似度測量(20-50 dB 範圍,越高越好)

SSIM(結構相似性指標): 感知層級的相似度測量(0.0-1.0 範圍,越高越好)

詳細的解讀範圍與品質門檻,請參閱 references/video_metrics.md。

幀提取

腳本會以指定的間隔(預設:5 秒)提取幀,將其縮放至一致的高度(800px)以利比較,並以 base64 資料 URL 嵌入至自包含的 HTML 中。處理完成後會自動清除暫存檔案。

輸出報告

產生的 HTML 報告包含:

  • 滑桿模式: 拖曳以揭示原始與壓縮畫面(預設)
  • 並排模式: 同時顯示以進行直接比較
  • 網格模式: 緊湊的 2 欄佈局
  • 縮放控制: 50%-200% 放大倍率
  • 自包含格式(無需伺服器,可離線使用)

重要實作細節

安全性

腳本實作了:

  • 路徑驗證(絕對路徑,防止目錄遍歷)
  • 指令注入防護(不使用 shell=True,驗證參數)
  • 資源限制(檔案大小、逾時)
  • 自訂例外:ValidationError、FFmpegError、VideoComparisonError

常見錯誤情境

「找不到 FFmpeg」:透過平台套件管理器安裝 FFmpeg(請參閱需求章節)

「檔案過大」:比較前先壓縮影片,或調整 scripts/compare.py 中的 MAX_FILE_SIZE_MB

「操作逾時」:調高 FFMPEG_TIMEOUT 常數,或使用較大的 --interval 值(處理較少幀)

「幀數不符」:影片時長/幀率不同;腳本會自動截斷至最少幀數並顯示警告

配置

腳本包含可調整的常數,用於檔案大小限制、逾時、幀尺寸與提取間隔。若要自訂行為,請編輯 scripts/compare.py 頂部的常數。如需詳細的配置選項及其影響,請參閱 references/configuration.md。

參考資料

請查閱以下檔案以取得詳細資訊:

  • references/video_metrics.md:品質指標解讀(PSNR/SSIM 範圍、壓縮目標、位元率指南)
  • references/ffmpeg_commands.md:FFmpeg 指令參考(元數據提取、幀提取、疑難排解)
  • references/configuration.md:腳本配置選項與可調整常數
  • assets/template.html:用於自訂檢視模式與樣式的 HTML 報告範本

Individual skills in this repo

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

Biznomad/agent-skills

Landing page quality assessment for paid advertising campaigns. Evaluates message match, page speed, mobile experience, trust signals, form optimization, and conversion rate potential. Use when user says "landing page", "post-click experience", "landing page audit", "conversion rate", or "landing page optimization".

Biznomad/agent-skills

TikTok Ads deep analysis covering creative quality, tracking, bidding, campaign structure, and TikTok Shop. Evaluates 25 checks with emphasis on creative-first strategy, safe zone compliance, and Smart+ campaigns. Use when user says "TikTok Ads", "TikTok marketing", "TikTok Shop", "Spark Ads", "Smart+", or "TikTok campaign".

Biznomad/agent-skills

YouTube Ads specific analysis covering campaign types, creative quality, audience targeting, and measurement. Evaluates video ad performance across skippable, non-skippable, bumper, Shorts, and Demand Gen formats. Use when user says "YouTube Ads", "video ads", "pre-roll", "bumper ads", "YouTube campaign", or "Shorts ads".

Biznomad/agent-skills

Help users get promoted at work. Use when someone is preparing for a promotion conversation, building their case for advancement, trying to understand what's blocking their promotion, or figuring out how to get to the next level in their career.

Biznomad/agent-skills

CSS animation adapter patterns for HyperFrames. Use when authoring CSS keyframes, animation-delay based timing, animation-fill-mode, animation-play-state, or CSS-only motion that HyperFrames must seek deterministically during preview and rendering.

Biznomad/agent-skills

Video and audio processing with FFmpeg. Use for format conversion, resizing, compression, audio extraction, and preparing assets for Remotion. Triggers include converting GIF to MP4, resizing video, extracting audio, compressing files, or any media transformation task.

Biznomad/agent-skills

Read-only queue dashboard for workspace-aware ship. Shows which VERSION slots are currently claimed by open PRs, which sibling Conductor workspaces have WIP work likely to ship soon, and what slot /ship would pick next. No mutations — just a snapshot. Use when asked to "landing report", "what's in the queue", "show me open PRs", or "which version do I claim next". (gstack)

Biznomad/agent-skills

HyperFrames CLI dev loop — `npx hyperframes` for scaffolding (init), validation (lint, inspect), preview, render, and environment troubleshooting (doctor, browser, info, upgrade). Use when running any of these commands or troubleshooting the HyperFrames build/render environment. For asset preprocessing commands (`tts`, `transcribe`, `remove-background`), invoke the `hyperframes-media` skill instead.

Biznomad/agent-skills

Asset preprocessing for HyperFrames compositions — text-to-speech narration (Kokoro), audio/video transcription (Whisper), and background removal for transparent overlays (u2net). Use when generating voiceover from text, transcribing speech for captions, removing the background from a video or image to use as a transparent overlay, choosing a TTS voice or whisper model, or chaining these (TTS → transcribe → captions). Each command downloads its own model on first run.

Biznomad/agent-skills

Install and wire registry blocks and components into HyperFrames compositions. Use when running hyperframes add, installing a block or component, wiring an installed item into index.html, or working with hyperframes.json. Covers the add command, install locations, block sub-composition wiring, component snippet merging, and registry discovery.

Biznomad/agent-skills

Create video compositions, animations, title cards, overlays, captions, voiceovers, audio-reactive visuals, and scene transitions in HyperFrames HTML. Use when asked to build any HTML-based video content, add captions or subtitles synced to audio, generate text-to-speech narration, create audio-reactive animation (beat sync, glow, pulse driven by music), add animated text highlighting (marker sweeps, hand-drawn circles, burst lines, scribble, sketchout), or add transitions between scenes (crossfades, wipes, reveals, shader transitions). Covers composition authoring, timing, media, and the full video production workflow. For dev-loop CLI commands (init, lint, inspect, preview, render) see the hyperframes-cli skill; for asset preprocessing commands (tts, transcribe, remove-background) see the hyperframes-media skill.

Biznomad/agent-skills

Still-to-video conversion guide: model selection, motion prompting, and camera movement. Covers Wan 2.5 i2v, Seedance, Fabric, Grok Video with when to use each. Use for: animating images, creating video from stills, adding motion, product animations. Triggers: image to video, i2v, animate image, still to video, add motion to image, image animation, photo to video, animate still, wan i2v, image2video, bring image to life, animate photo, motion from image

Biznomad/agent-skills

>- The Landing Page Audit skill performs comprehensive evaluations of post-click experiences, combining technical performance analysis with conversion rate optimization (CRO) assessment.

Biznomad/agent-skills

Write high-converting landing page copy using proven frameworks like PAS (Problem-Agitate-Solution), AIDA, and StoryBrand. Creates headlines, value propositions, CTAs, and full page sections optimized for conversion. Use when users need landing page copy, sales page content, or marketing website text.

Biznomad/agent-skills

Optimize landing pages for higher conversion rates using proven frameworks and design patterns. Use when designing, reviewing, or improving landing pages, hero sections, pricing pages, CTAs, or when the user asks about conversion optimization.

Biznomad/agent-skills

Read-only queue dashboard for workspace-aware ship. (gstack)

Biznomad/agent-skills

Building promotion cases, brag documents, tracking wins, and self-advocacy for career advancement. Use when preparing for promotions, documenting accomplishments, or building your case for advancement.

Biznomad/agent-skills

Best practices for Remotion - Video creation in React

Biznomad/agent-skills

Translate an existing Remotion (React-based) video composition into a HyperFrames HTML composition. Use ONLY when the user explicitly asks to port, convert, migrate, translate, or rewrite a Remotion composition as HyperFrames (e.g. "port my Remotion project to HyperFrames"). Do NOT use when (a) authoring a NEW HyperFrames composition (even if A/B-testing a Remotion video); (b) Remotion is mentioned in passing; (c) Remotion code is shared as reference, not for translation; (d) the user wants "the same video as my Remotion one" without explicitly asking to migrate the source — treat as a fresh HyperFrames build. When in doubt, default to the `hyperframes` skill. Detects unsupported patterns (useState, useEffect side effects, async calculateMetadata, third-party React component libraries, `@remotion/lambda`) and recommends the runtime interop escape hatch instead of a lossy translation.

Biznomad/agent-skills

Produce programmable videos with Remotion using scene planning, asset orchestration, and validation gates for automated, brand-consistent video content.

相關技能