Communitygithub.com

Anhvu1107/all-agent-skill

リクエストがVideodb(動画・音声の認識、インデックス、編集)に該当する場合は、常にこのスキルを使用してください。

all-agent-skill とは?

このスキルは、VideoDBプラットフォームを活用した包括的な動画・音声認識、インデックス、検索、編集ワークフローを提供します。具体的には、ファイルやURLからの動画取り込み、デスクトップキャプチャ、ライブストリーム監視、タイムライン編集が可能です。主な機能として、音声・シーン・キーワードによる高精度な検索(タイムスタンプ付き再生可能な証拠リンクを生成)、字幕生成・翻訳・焼き込み、テキスト/画像オーバーレイ、BGMやナレーションの追加が含まれます。Python SDKを通じてサーバーサイドで効率的に処理されるため、ffmpegなどのローカルツールは不要です。セットアップは APIキーの設定のみで完了し、macOSでのデスクトップキャプチャやRTSPライブストリームのリアルタイム監視にも対応しています。エラーハンドリングや一般的な落とし穴への対応もドキュメント化されており、迅速なデバッグが可能です。

対応✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Anhvu1107/all-agent-skill/tree/HEAD/.agent/skills/videodb

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

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

ドキュメント

VideoDB スキル

選択的読み取りルール

まず以下を確認:

  • references/senior-master-standard.md
  • references/usage-routing.md
  • references/quality-checklist.md

その後、ユーザーの実際のタスクに一致する継承済みドキュメント、スクリプト、アセット、または例のみを読み込みます。

動画、ライブストリーム、デスクトップセッションのための認識 + メモリ + アクション。

以下の目的でこのスキルを使用します:

使用タイミング

  • ファイル、URL、デスクトップセッション、またはライブストリームからの動画・音声認識、インデックス、検索、タイムライン編集が必要な場合。
  • タスクにタイムスタンプ、検索可能な証拠、字幕、クリップ、オーバーレイ、またはリアルタイム監視アラートが含まれる場合。
  • 取り込み、理解、取得、メディアアクションを1つのワークフローで組み合わせたい場合。

1) デスクトップ認識

  • 画面、マイク、システムオーディオをキャプチャするデスクトップセッションの開始/停止
  • ライブコンテキストをストリーミングし、エピソードセッションメモリを保存
  • 発言内容と画面で起こっていることに基づいてリアルタイムアラート/トリガーを実行
  • セッションサマリー、検索可能なタイムライン、再生可能な証拠リンクを生成

2) 動画取り込み + ストリーム

  • ファイルまたはURLを取り込み、再生可能なWebストリームリンクを返す
  • トランスコード/正規化: コーデック、ビットレート、fps、解像度、アスペクト比

3) インデックス + 検索 (タイムスタンプ + 証拠)

  • 視覚、音声、キーワードの各インデックスを構築
  • 正確な瞬間をタイムスタンプと再生可能な証拠とともに検索して返す
  • 検索結果からクリップを自動作成

4) タイムライン編集 + 生成

  • 字幕: 生成、翻訳、焼き込み
  • オーバーレイ: テキスト/画像/ブランディング、モーションキャプション
  • オーディオ: BGM、ナレーション、吹き替え
  • タイムライン操作によるプログラム的な合成とエクスポート

5) ライブストリーム (RTSP) + 監視

  • RTSP/ライブフィードに接続
  • リアルタイムの視覚および音声理解を実行し、監視ワークフロー向けにイベント/アラートを発行

一般的な入力

  • ローカルファイルパス、公開URL、またはRTSP URL
  • デスクトップキャプチャリクエスト: 開始 / 停止 / セッションの要約
  • 必要な操作: 理解のためのコンテキスト取得、トランスコード仕様、インデックス仕様、検索クエリ、クリップ範囲、タイムライン編集、アラートルール

一般的な出力

  • ストリーム URL
  • タイムスタンプと証拠リンクを含む検索結果
  • 生成されたアセット: 字幕、音声、画像、クリップ
  • ライブストリーム用のイベント/アラートペイロード
  • デスクトップセッションサマリーとメモリエントリ

標準プロンプト (例)

  • 「デスクトップキャプチャを開始し、パスワードフィールドが表示されたらアラートを出して。」
  • 「セッションを録画し、終了時に実行可能なサマリーを生成して。」
  • 「このファイルを取り込み、再生可能なストリームリンクを返して。」
  • 「このフォルダをインデックスし、人が写っているすべてのシーンを見つけて、タイムスタンプを返して。」
  • 「字幕を生成し、焼き込んで、軽めのBGMを追加して。」
  • 「このRTSP URLに接続し、人がゾーンに入ったらアラートを出して。」

Pythonコードの実行

VideoDBコードを実行する前に、プロジェクトディレクトリに移動して環境変数を読み込んでください:

from dotenv import load_dotenv
load_dotenv(".env")

import videodb
conn = videodb.connect()

これにより VIDEO_DB_API_KEY が以下の場所から読み込まれます:

  1. 環境変数 (すでにエクスポートされている場合)
  2. カレントディレクトリのプロジェクト .env ファイル

キーがない場合、videodb.connect() は自動的に AuthenticationError を発生させます。

短いインラインコマンドで済む場合は、スクリプトファイルを作成しないでください。

インラインPython (python -c "...") を記述する場合は、適切にフォーマットされたコードを常に使用し、セミコロンを使用して文を区切り、読みやすくしてください。3文を超える場合は、代わりにヒアドキュメントを使用してください:

python << 'EOF'
from dotenv import load_dotenv
load_dotenv(".env")

import videodb
conn = videodb.connect()
coll = conn.get_collection()
print(f"動画数: {len(coll.get_videos())}")
EOF

セットアップ

ユーザーが「videodb をセットアップして」などと依頼した場合:

1. SDKのインストール

pip install "videodb[capture]" python-dotenv

Linux で videodb[capture] が失敗した場合は、capture 拡張なしでインストール:

pip install videodb python-dotenv

2. APIキーの設定

ユーザーは以下のいずれかの方法で VIDEO_DB_API_KEY を設定する必要があります:

  • ターミナルでエクスポート (Claudeを起動する前): export VIDEO_DB_API_KEY=あなたのキー
  • プロジェクト .env ファイル: プロジェクトの .env ファイルに VIDEO_DB_API_KEY=あなたのキー を保存

無料のAPIキーは https://console.videodb.io で取得できます (50回の無料アップロード、クレジットカード不要)。

APIキーを自分で読み取り、書き込み、または処理しないでください。常にユーザーに設定させてください。

クイックリファレンス

メディアのアップロード

# URL
video = coll.upload(url="https://example.com/video.mp4")

# YouTube
video = coll.upload(url="https://www.youtube.com/watch?v=VIDEO_ID")

# ローカルファイル
video = coll.upload(file_path="/path/to/video.mp4")

文字起こし + 字幕

# force=True で、動画がすでにインデックスされている場合のエラーをスキップ
video.index_spoken_words(force=True)
text = video.get_transcript_text()
stream_url = video.add_subtitle()

動画内検索

from videodb.exceptions import InvalidRequestError

video.index_spoken_words(force=True)

# search() は結果がない場合 InvalidRequestError を発生させます。
# 必ず try/except でラップし、「No results found」を空として扱います。
try:
    results = video.search("プロダクトデモ")
    shots = results.get_shots()
    stream_url = results.compile()
except InvalidRequestError as e:
    if "No results found" in str(e):
        shots = []
    else:
        raise

シーン検索

import re
from videodb import SearchType, IndexType, SceneExtractionType
from videodb.exceptions import InvalidRequestError

# index_scenes() には force パラメータがありません — シーンインデックスがすでに
# 存在する場合はエラーを発生させます。エラーから既存のインデックスIDを抽出します。
try:
    scene_index_id = video.index_scenes(
        extraction_type=SceneExtractionType.shot_based,
        prompt="このシーンの視覚的な内容を説明してください。",
    )
except Exception as e:
    match = re.search(r"id\s+([a-f0-9]+)", str(e))
    if match:
        scene_index_id = match.group(1)
    else:
        raise

# score_threshold を使用して低関連のノイズをフィルタリング (推奨: 0.3以上)
try:
    results = video.search(
        query="ホワイトボードに書いている人",
        search_type=SearchType.semantic,
        index_type=IndexType.scene,
        scene_index_id=scene_index_id,
        score_threshold=0.3,
    )
    shots = results.get_shots()
    stream_url = results.compile()
except InvalidRequestError as e:
    if "No results found" in str(e):
        shots = []
    else:
        raise

タイムライン編集

重要: タイムラインを構築する前に、必ずタイムスタンプを検証してください:

  • start は 0 以上である必要があります (負の値は黙って受け入れられますが、壊れた出力を生成します)
  • start は end より小さい必要があります
  • end は video.length 以下である必要があります
from videodb.timeline import Timeline
from videodb.asset import VideoAsset, TextAsset, TextStyle

timeline = Timeline(conn)
timeline.add_inline(VideoAsset(asset_id=video.id, start=10, end=30))
timeline.add_overlay(0, TextAsset(text="終わり", duration=3, style=TextStyle(fontsize=36)))
stream_url = timeline.generate_stream()

動画のトランスコード (解像度/品質の変更)

from videodb import TranscodeMode, VideoConfig, AudioConfig

# サーバーサイドで解像度、品質、またはアスペクト比を変更
job_id = conn.transcode(
    source="https://example.com/video.mp4",
    callback_url="https://example.com/webhook",
    mode=TranscodeMode.economy,
    video_config=VideoConfig(resolution=720, quality=23, aspect_ratio="16:9"),
    audio_config=AudioConfig(mute=False),
)

アスペクト比のリフレーム (ソーシャルプラットフォーム向け)

警告: reframe() は低速なサーバーサイド操作です。長い動画の場合は数分かかり、タイムアウトする可能性があります。ベストプラクティス:

  • 可能な限り start/end を使用して短いセグメントに制限する
  • フルレングスの動画の場合は、callback_url を非同期処理に使用する
  • まず Timeline で動画をトリミングし、その短い結果をリフレームする
from videodb import ReframeMode

# 常に短いセグメントのリフレームを優先:
reframed = video.reframe(start=0, end=60, target="vertical", mode=ReframeMode.smart)

# フルレングス動画の非同期リフレーム (Noneを返し、webhook経由で結果を受け取る):
video.reframe(target="vertical", callback_url="https://example.com/webhook")

# プリセット: "vertical" (9:16), "square" (1:1), "landscape" (16:9)
reframed = video.reframe(start=0, end=60, target="square")

# カスタム寸法
reframed = video.reframe(start=0, end=60, target={"width": 1280, "height": 720})

生成メディア

image = coll.generate_image(
    prompt="山の上の夕日",
    aspect_ratio="16:9",
)

エラーハンドリング

from videodb.exceptions import AuthenticationError, InvalidRequestError

try:
    conn = videodb.connect()
except AuthenticationError:
    print("VIDEO_DB_API_KEY を確認してください")

try:
    video = coll.upload(url="https://example.com/video.mp4")
except InvalidRequestError as e:
    print(f"アップロード失敗: {e}")

よくある落とし穴

シナリオエラーメッセージ解決策
すでにインデックス済みの動画をインデックスSpoken word index for video already existsvideo.index_spoken_words(force=True) を使用して、すでにインデックス済みの場合はスキップ
シーンインデックスがすでに存在Scene index with id XXXX already existsエラーから re.search(r"id\s+([a-f0-9]+)", str(e)) で既存の scene_index_id を抽出
検索で一致なしInvalidRequestError: No results found例外をキャッチし、空の結果として扱う (shots = [])
リフレームがタイムアウト長い動画で無期限にブロックstart/end でセグメントを制限するか、非同期用に callback_url を渡す
タイムラインで負のタイムスタンプ壊れたストリームを黙って生成VideoAsset を作成する前に必ず start >= 0 を検証
generate_video() / create_collection() が失敗Operation not allowed または maximum limitプラン制限付き機能 — ユーザーにプラン制限について通知

追加ドキュメント

リファレンスドキュメントは、このSKILL.mdファイルと同じディレクトリの reference/ ディレクトリにあります。必要に応じてGlobツールを使用して見つけてください。

画面録画 (デスクトップキャプチャ)

録画セッション中にWebSocketイベントをキャプチャするには ws_listener.py を使用します。デスクトップキャプチャはmacOSのみサポートされています。

クイックスタート

  1. リスナーを起動: python scripts/ws_listener.py &
  2. WebSocket IDを取得: cat /tmp/videodb_ws_id
  3. キャプチャコードを実行 (完全なワークフローは reference/capture.md を参照)
  4. イベントの書き込み先: /tmp/videodb_events.jsonl

イベントのクエリ

import json
events = [json.loads(l) for l in open("/tmp/videodb_events.jsonl")]

# すべての文字起こしを取得
transcripts = [e["data"]["text"] for e in events if e.get("channel") == "transcript"]

# 過去5分間の視覚的説明を取得
import time
cutoff = time.time() - 300
recent_visual = [e for e in events 
                 if e.get("channel") == "visual_index" and e["unix_ts"] > cutoff]

ユーティリティスクリプト

完全なキャプチャワークフローについては、reference/capture.md を参照してください。

VideoDBが操作をサポートしている場合、ffmpeg、moviepy、またはローカルエンコーディングツールを使用しないでください。 以下はすべてVideoDBによってサーバーサイドで処理されます — トリミング、クリップの結合、音声または音楽のオーバーレイ、字幕の追加、テキスト/画像オーバーレイ、トランスコード、解像度変更、アスペクト比変換、プラットフォーム要件に合わせたリサイズ、文字起こし、メディア生成。ローカルツールへのフォールバックは、reference/editor.md の制限事項にリストされている操作 (トランジション、速度変更、クロップ/ズーム、カラーグレーディング、音量ミキシング) に対してのみ行ってください。

何を使うべきか

問題VideoDBの解決策
プラットフォームが動画のアスペクト比または解像度を拒否video.reframe() または VideoConfig を使用した conn.transcode()
Twitter/Instagram/TikTok 用に動画をリサイズする必要があるvideo.reframe(target="vertical") または target="square"
解像度を変更する必要がある (例: 1080p → 720p)VideoConfig(resolution=720) を使用した conn.transcode()
動画に音声/音楽をオーバーレイする必要があるTimeline 上の AudioAsset
字幕を追加する必要があるvideo.add_subtitle() または CaptionAsset
クリップを結合/トリミングする必要があるTimeline 上の VideoAsset
ナレーション、音楽、または効果音を生成する必要があるcoll.generate_voice(), generate_music(), generate_sound_effect()

リポジトリ

https://github.com/video-db/skills

メンテナー: VideoDB

制限事項

  • このスキルは、タスクが上記で説明された範囲に明確に一致する場合にのみ使用してください。
  • 出力を環境固有の検証、テスト、または専門家によるレビューの代わりとして扱わないでください。
  • 必要な入力、権限、安全境界、または成功基準が不足している場合は、立ち止まって明確化を求めてください。

Individual skills in this repo

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

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches 007: Security audit, hardening, threat modeling (STRIDE/PASTA), Red/Blue Team, OWASP checks, code review, incident response, and infrastructure security for any project.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Agentfolio: Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Animejs Animation: Advanced JavaScript animation library skill for creating complex, high-performance web animations.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astropy: Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Astro: Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Emotional ARC Designer: One sentence - what this skill does and when to invoke it

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Fixing Motion Performance: Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches I18n Localization: Internationalization and localization patterns.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Interactive Portfolio: Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches JQ: Expert jq usage for JSON querying, filtering, transformation, and pipeline integration.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Landing Page Generator: Generates high-converting Next.js/React landing pages with Tailwind CSS.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches LEX: Centralized ''Truth Engine'' for cross-jurisdictional legal context (US, EU, CA) and contract scaffolding.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Magic Animator: AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Makepad Animation: CRITICAL: Use for Makepad animation system.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs APP Router Patterns: Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

Anhvu1107/all-agent-skill

ALWAYS use this when the user mentions Nextjs Best Practices, asks to build, debug, review, document, automate, test, configure, migrate, or make decisions in this domain, or the task clearly depends on Nextjs Best Practices; scope: Next.js App Router principles. Apply the bundled workflow, references, scripts, Senior Master standard, and Codex strict review gate before final output.

Anhvu1107/all-agent-skill

description: ALWAYS use this when the work is specifically about modern Next.js or React architecture, data flow, rendering strategy, routing, or performance-sensitive frontend behavior.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches Nextjs Supabase Auth: Expert integration of Supabase Auth with Next.js App Router

Anhvu1107/all-agent-skill

ALWAYS use this when the task involves reading, extracting, splitting, merging, rotating, creating, validating, OCR-ing, form-filling, or otherwise producing or modifying PDF files.

Anhvu1107/all-agent-skill

ALWAYS use this when the request matches React Nextjs Development: React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

関連スキル