본문으로 건너뛰기
cccskills
무료GitHub에 공개

video-frame-reader

動画ファイルからキーフレームを抽出し、重複除去・最適化した上で内容を分析するスキル。「動画の中身を見て」「キーフレームを抽出」「この動画を分析して」等で発動。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(8)

  • SKILL.md4.0 KB
  • .gitignore110 B
  • agents/openai.yaml148 B
  • extract_keyframes.py6.6 KB
  • README.md2.5 KB
  • scripts/extract_keyframes.py5.3 KB
  • SKILL.en.md3.7 KB
  • SKILL.es.md4.4 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Video Frame Reader

Extract keyframes from video, present token cost, then analyze.

Requirements

  • ffmpeg (for frame extraction)
  • Python 3 + Pillow + numpy

Workflow

1. Capture User Intent

Clearly understand why the user wants the video analyzed:

  • Example: "The screen transition behavior looks wrong"
  • Example: "I want to check the response after button click"
  • Example: "Help me identify performance issues"

This intent becomes important context for the analysis.

2. Install Dependencies (First Time Only)

# uv で依存関係をインストール
uv add Pillow numpy --quiet

3. Extract Keyframes

uv run python skills/video-frame-reader/scripts/extract_keyframes.py "<video_path>"

Output example (JSON):

{
  "keyframe_count": 52,
  "image_size": "266x576",
  "total_tokens": 10400,
  "cost_usd_opus": 0.156,
  "cost_usd_sonnet": 0.031,
  "cost_usd_haiku": 0.0104,
  "files": ["/.../key_0001.jpg", ...]
}

4. Present Cost

After extraction, present the following to the user:

Keyframe extraction complete:
- Frames extracted: {keyframe_count}
- Image size: {image_size}
- Estimated tokens: {total_tokens}
- Cost estimate: Haiku ${cost_usd_haiku} / Sonnet ${cost_usd_sonnet} / Opus ${cost_usd_opus}

Proceed with frame analysis?

5. Invoke Subagent After Approval

After user approval, invoke subagent using Task tool:

Task(
  subagent_type="general-purpose",
  model="haiku",
  description="Frame analysis",
  prompt="""
[User Intent]
{Intent captured in Step 1}

[Frame Image Files]
{List of paths from files array}

Analyze the above frame images and identify issues/behaviors according to the user's intent.
"""
)

Benefits of this approach:

  • ✅ User intent is included in analysis context
  • ✅ Subagent can focus on intent-specific efficient analysis
  • ✅ Processed in independent context for better token efficiency

Options

OptionDefaultDescription
-t, --threshold0.85Similarity threshold (higher = more frames kept)
-q, --quality30JPEG quality (1-100)
-s, --scale0.3Resize scale
-o, --output<video_name>_keyframes/Output directory

Token Reduction Example

# More aggressive reduction (lower threshold, quality, and size)
python3 extract_keyframes.py video.mp4 -t 0.75 -q 20 -s 0.2

Overview

動画ファイルからキーフレームを自動抽出し、重複除去・最適化した上で内容を分析するスキルです。トークンコストを事前提示し、ユーザー承認後にサブエージェントで分析を実行します。

Troubleshooting

エラー解決方法
ffmpeg not foundbrew install ffmpeg(Mac)または apt install ffmpeg(Linux)でインストール
No keyframes extracted--threshold を下げる(例: 0.75)ことでより多くのフレームを抽出

Success Criteria

  • キーフレーム画像が出力ディレクトリに保存されている
  • トークンコスト見積もりがJSON形式で表示されている
  • ユーザーの分析意図に沿った結果が返却されている

Usage

上記「Workflow」セクションを参照。基本例:

# キーフレーム抽出
python3 skills/video-frame-reader/scripts/extract_keyframes.py "video.mp4"

# トークン削減オプション付き
python3 skills/video-frame-reader/scripts/extract_keyframes.py "video.mp4" -t 0.75 -q 20 -s 0.2

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

A/Bテストや実験の設計・実装を支援するスキル。 「A/Bテストを設計して」「スプリットテストしたい」「仮説を立ててテストしたい」「バリアントを比較」等のリクエストで発動。 トラッキング実装は analytics-tracking を参照。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

minicoohei/ai-agent-camp3462026년 10월 7일 업데이트

マルチエージェントシステムのアーキテクチャ設計ツールキット。 「エージェントを設計して」「マルチエージェント構成」「エージェントのアーキテクチャ」「オーケストレーション設計」等のリクエストで発動。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

minicoohei/ai-agent-camp3462026년 10월 7일 업데이트

ai-agent-campのローカル環境セットアップを確認するスキル。 「セットアップ確認」「環境チェック」「初期設定できてる?」「インストール確認」「依存関係チェック」等のリクエストで発動。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

minicoohei/ai-agent-camp3462026년 10월 7일 업데이트

ai-agent-campのスラッシュコマンドをCodexでルーティングするスキル。 「/start-0-1を実行」「スラッシュコマンドを使いたい」「コマンドルーティング」「Cursorのコマンドを使いたい」等のリクエストで発動。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

minicoohei/ai-agent-camp3462026년 10월 7일 업데이트

ai-agent-campの環境変数・認証情報を安全に管理するスキル。 「APIキーを設定」「.envを管理」「環境変数の設定」「credential managerを使いたい」「秘密情報の管理」等のリクエストで発動。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

minicoohei/ai-agent-camp3462026년 10월 7일 업데이트

ai-agent-campリポジトリの案内・オリエンテーションスキル。 「リポジトリ案内」「次のレッスンは?」「どこから始める」「ツールの違い」「aiagent概要」等のリクエストで発動。

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

minicoohei/ai-agent-camp3462026년 10월 7일 업데이트

minicoohei의 스킬 모두 보기

이 스킬의 문제 신고