Communitygithub.com

Biznomad/agent-skills

2つの動画を比較し、圧縮結果や品質の違いを分析するスキルです。PSNRやSSIMなどの品質メトリクスとフレームごとの視覚比較を含むインタラクティブなHTMLレポートを生成します。「動画を比較」「動画品質」「圧縮分析」「圧縮前/圧縮後」などのユーザー発言に対応します。

agent-skills とは?

このスキルは、オリジナル動画と圧縮動画のペアを比較し、圧縮の品質と効率を評価するためのインタラクティブなHTMLレポートを生成します。PSNR(ピーク信号対雑音比)とSSIM(構造的類似性指標)の2つの標準品質メトリクスを計算し、スライダー、サイドバイサイド、グリッドの3つの表示モードでフレームごとの比較を提供します。FFmpegを使用した動画メタデータの抽出、フレーム抽出、品質スコアの計算を行い、結果は自己完結型のHTMLファイルに出力されるため、オフラインでも動作します。スクリプトは自動検証機能を備え、FFmpegのインストール状況、ファイルの存在とサイズ、パスの安全性をチェックし、エラー時には明確な解決策を表示します。対応プラットフォームはmacOS、Ubuntu/Debian、Windowsで、Python 3.8以上とFFmpegが必要です。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Biznomad/agent-skills/tree/HEAD/video-comparer

お気に入りのAIに質問する

このエージェントスキルを事前に読み込んだ状態で新しいチャットを開きます。

ドキュメント

Video Comparer

概要

2つの動画を比較し、圧縮結果を分析するインタラクティブなHTMLレポートを生成します。このスクリプトは動画メタデータを抽出し、品質メトリクス(PSNR、SSIM)を計算し、スライダー、サイドバイサイド、グリッドの3つの表示モードでフレームごとの視覚比較を作成します。

このスキルを使用するタイミング

以下の場合にこのスキルを使用してください:

  • オリジナル動画と圧縮動画を比較する
  • 動画圧縮の品質と効率を分析する
  • コーデックのパフォーマンスやビットレート削減の影響を評価する
  • ユーザーが「動画を比較」「動画品質」「圧縮分析」「圧縮前/圧縮後」に言及している

基本的な使い方

基本コマンド

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-strings、pathlibを使用)

動画仕様

  • 対応形式: .mp4(推奨)、.mov、.avi、.mkv、.webm
  • ファイルサイズ制限: 1動画あたり500MB(設定変更可能)
  • 処理時間: 一般的な動画で約1〜2分。再生時間とフレーム間隔によって変動

スクリプトの動作

自動検証

スクリプトは以下を自動的に検証します:

  • FFmpeg/FFprobeのインストールと使用可能性
  • ファイルの存在、拡張子、サイズ制限
  • パスの安全性(ディレクトリトラバーサルを防止)

検証に失敗した場合、解決策を示す明確なエラーメッセージが表示されます。

品質メトリクス

スクリプトは2つの標準品質メトリクスを計算します:

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.

関連スキル