Communitygithub.com

ASoudy/AGS

YouTube動画のトランスクリプトを取得し、yt-dlpによる字幕発見、VTTクリーンアップ、メタデータフロントマター、キャプチャシードスタブを備えた、クエリ可能なマークダウンボールトに格納します。

AGS とは?

このスキルは、YouTubeの動画URLを入力として受け取り、yt-dlpを利用してトランスクリプト(字幕)を抽出し、マークダウンのボールトに構造化されたナレッジエントリとして保存します。手動字幕と自動生成字幕の両方を優先順位付けして処理し、VTTのタイミングマーカーを除去してクリーンな散文として整形します。動画のメタデータ(タイトル、チャンネル、アップロード日、再生時間など)をフロントマターに付与し、チャンネル名と動画タイトルに基づいたパス(External Inputs/YouTube/<channel-slug>/<YYYY-MM-DD>-<video-slug>.md)に保存します。さらに、トランスクリプト内の特定のトリガーキーワード(決定、フレームワーク、モデル、原則など)をスキャンし、それらに対応するキャプチャシードスタブをMeta/Capturesに作成します。これにより、後続のスキル(知識グラフ抽出、音声フィンガープリント学習、コンテンツ再利用、アクションアイテム抽出など)がボールト内のエントリに対して動作できるようになります。スキルは一度に1つの動画URLのみを処理し、字幕がない場合はメタデータのみのスタブノートを書き込みます。

対応~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ASoudy/AGS/tree/HEAD/AGAS/plugins/antigravity-awesome-skills-claude/skills/ingest-youtube

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

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

ドキュメント

ingest-youtube — YouTube-to-vault コネクタ

YouTube のトランスクリプトを、クエリ可能な型付きメモリエントリとしてマークダウンボールトに取り込みます。後続のスキル(知識グラフ抽出、音声フィンガープリント学習、コンテンツ再利用、アクションアイテム抽出)がこれを利用できます。

ingest-slack、ingest-whatsapp、ingest-notion、ingest-linear、ingest-github、ingest-gmail と同じパターンです。YouTube を追加するということは、新しいノーマライザーが追加されただけで、アーキテクチャが新しくなったわけではありません。

使用するタイミング

  • ユーザーが YouTube の URL を貼り付けて、トランスクリプトまたは要約を求めた場合
  • ユーザーが /ingest-youtube <url> と入力して1本の動画を指定した場合
  • ユーザーがトーク、ポッドキャスト、キーノートをキャプチャ、同期、取り込み、文字起こし、またはボールトにプルするよう依頼した場合

使用してはいけないケース:

  • 実際の動画ファイル自体をダウンロードする場合(yt-dlp を直接 -f best オプションで使用)
  • チャンネル全体の取り込みや --days ウィンドウでの処理(このスクリプトは一度に1つの動画 URL のみを取り込みます)
  • ライブストリーム(トランスクリプトが安定していません)
  • YouTube 以外のソース(Vimeo、Twitch、Twitter Spaces にはそれぞれ専用のコネクタがあります)
  • ボールトファイルを必要としない1回限りのトランスクリプト読み取り(yt-dlp --write-auto-sub を直接実行し、標準出力にパイプ)

動作の仕組み

  1. 入力を1つの YouTube 動画 URL として解析します。
  2. yt-dlp がインストールされているか確認します。インストールされていない場合、スクリプトはインストール手順を表示して終了します: brew install yt-dlp(macOS)または pip3 install --user yt-dlp。
  3. yt-dlp --list-subs <url> を呼び出して、利用可能な字幕を一覧表示します。
  4. 字幕の優先順位: 手動字幕 > 自動生成キャプション。手動字幕は作成者が提供する句読点と話者ラベルを保持します。自動生成字幕は大文字で句読点がありません。
  5. 最も優先順位の高い字幕を、yt-dlp --write-sub --sub-lang <lang> --skip-download で VTT としてダウンロードします。デフォルトの言語設定: en,es(英語優先、スペイン語が次)。
  6. VTT のタイミングマーカーを削除し、クリーンな散文パラグラフに結合します。重複する行を除去します(自動生成 VTT は行が2重になることがあります)。ソースに話者ラベルがあった場合は保持します。
  7. yt-dlp --print-json --skip-download で動画メタデータ(タイトル、チャンネル、アップロード日、再生時間、video_id、URL)を取得します。
  8. チャンネル名と動画タイトルをスラッグ化します。External Inputs/YouTube/<channel-slug>/<YYYY-MM-DD>-<video-slug>.md に書き込みます。
  9. トランスクリプトからトリガーキーワード(decision、framework、model、principle、"the lesson is"、playbook、anti-pattern、case study)をスキャンします。一致するものごとに、Meta/Captures/<YYYY-MM-DD>-youtube-<channel-slug>-<video-id>.md にライティングシードスタブを作成し、そのシードがキャプチャアグリゲーターに届くようにします。
  10. サマリーを表示します: ファイルパス、トランスクリプトの単語数、言語、検出されたシード。

呼び出し方法

python3 ingest.py <youtube-url> [--vault <path>] [--lang <code>]

デフォルト:

  • --vault: $VAULT_ROOT 環境変数、またはカレントディレクトリ
  • --lang: en,es(英語優先、スペイン語が次。一般的なバイリンガルデフォルトに適合)
  • --whisper: 将来のフォールバックフラグとして受け入れられますが、このバージョンでは字幕がない場合にスタブを作成します

出力契約

ボールトファイル External Inputs/YouTube/<channel-slug>/<YYYY-MM-DD>-<video-slug>.md には以下のフロントマターが含まれます:

---
type: external-input
source: youtube
video_id: <11桁のID>
url: https://www.youtube.com/watch?v=<id>
channel: <チャンネル名>
channel_url: https://www.youtube.com/<ハンドル>
title: <動画タイトル>
upload_date: <YYYY-MM-DD>
duration_seconds: <整数>
language: <ISOコード>
subtitle_source: manual | auto | whisper
word_count: <整数>
ingested_at: <ISO 8601 タイムスタンプ>
---

本文は、クリーニングされたトランスクリプトが段落散文として記述されます。ソースに話者ラベルがある場合は、ターンごとに **<話者>:** <テキスト> の形式でフォーマットします。

冪等性

同じ動画 URL を再取り込みすると、同じボールトファイルが上書きされます。シードスタブのファイル名は video_id をハッシュ化するため、同じソース動画からは再実行時にも同じスタブファイル名が生成されます。再実行は更新を行い、決して重複しません。

字幕がない場合

yt-dlp --list-subs が手動または自動字幕を返さない場合、スクリプトはエラーで終了する代わりに、動画メタデータとソース URL を含むスタブボールトノートを作成します。--whisper フラグは将来のローカル文字起こしフォールバック用に予約されており、現在はフォールバックが実装されていないことを報告します。

手動でフォールバックするには、yt-dlp でオーディオをダウンロードし、ローカルの Whisper ワークフローで文字起こしを行い、取り込みを再実行する前にキャプションまたはトランスクリプトテキストを追加してください。

制限事項

  • 1回の実行で1つの YouTube 動画 URL のみを取り込みます。チャンネルハンドル、プレイリスト、--days ウィンドウは対象外です。
  • yt-dlp が返す字幕に依存します。字幕がない動画は、トランスクリプトではなくメタデータスタブが生成されます。
  • このバージョンでは動画ファイルのダウンロードや組み込みの Whisper 文字起こしは行いません。
  • ネットワークの可用性、YouTube の字幕アクセス、ローカルの yt-dlp の動作が取り込みの成否を左右します。

受け入れテスト

YouTube に最初にアップロードされた動画で実行:

python3 ingest.py "https://www.youtube.com/watch?v=jNQXAC9IVRw" --vault /tmp/test

期待される出力:

Wrote 39 words to /tmp/test/External Inputs/YouTube/jawed/2005-04-24-me-at-the-zoo.md. Language: en. Subtitle source: manual.

出力ファイルには有効なフロントマターとクリーンな散文本文が含まれています。

依存関係

  • yt-dlp(必須): brew install yt-dlp または pip3 install --user yt-dlp でインストール
  • whisper-cpp(このスクリプト外での手動フォールバック用。オプション)

ソース

adelaidasofia/ai-brain-starter にバンドルされています。これは AI エージェントの検証ハーネスであり、メモリが破損するのではなく蓄積されるようにします。このスキルは、ingest-* 系のボールトコネクタファミリーの一部です。

Individual skills in this repo

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

ASoudy/AGS

Advanced JavaScript animation library skill for creating complex, high-performance web animations.

ASoudy/AGS

Astropy is the core Python package for astronomy, providing essential functionality for astronomical research and data analysis.

ASoudy/AGS

Build content-focused websites with Astro — zero JS by default, islands architecture, multi-framework components, and Markdown/MDX support.

ASoudy/AGS

One sentence - what this skill does and when to invoke it

ASoudy/AGS

Audit and fix animation performance issues including layout thrashing, compositor properties, scroll-linked motion, and blur effects. Use when animations stutter, transitions jank, or reviewing CSS/JS animation performance.

ASoudy/AGS

Internationalization and localization patterns. Detecting hardcoded strings, managing translations, locale files, RTL support.

ASoudy/AGS

Expert in building portfolios that actually land jobs and clients - not just showing work, but creating memorable experiences. Covers developer portfolios, designer portfolios, creative portfolios, and portfolios that convert visitors into opportunities.

ASoudy/AGS

Generates high-converting Next.js/React landing pages with Tailwind CSS. Uses PAS, AIDA, and BAB frameworks for optimized copy/components (Heroes, Features, Pricing). Focuses on Core Web Vitals/SEO.

ASoudy/AGS

AI-powered animation tool for creating motion in logos, UI, icons, and social media assets.

ASoudy/AGS

CRITICAL: Use for Makepad animation system. Triggers on: makepad animation, makepad animator, makepad hover, makepad state, makepad transition, "from: { all: Forward", makepad pressed, makepad 动画, makepad 状态, makepad 过渡, makepad 悬停效果

ASoudy/AGS

Comprehensive patterns for Next.js 14+ App Router architecture, Server Components, and modern full-stack React development.

ASoudy/AGS

Next.js App Router principles. Server Components, data fetching, routing patterns.

ASoudy/AGS

Expert integration of Supabase Auth with Next.js App Router

ASoudy/AGS

React and Next.js 14+ application development with App Router, Server Components, TypeScript, Tailwind CSS, and modern frontend patterns.

ASoudy/AGS

Best practices for Remotion - Video creation in React

ASoudy/AGS

Generate walkthrough videos from Stitch projects using Remotion with smooth transitions, zooming, and text overlays

ASoudy/AGS

Seek and analyze video content using Memories.ai Large Visual Memory Model for persistent video intelligence

ASoudy/AGS

Writes complete, structured landing pages optimized for SEO ranking, AEO citation, and visitor conversion. Activate when the user wants to write or generate a landing page for a product, service, or offer.

ASoudy/AGS

Three.js animation - keyframe animation, skeletal animation, morph targets, animation mixing. Use when animating objects, playing GLTF animations, creating procedural motion, or blending animations.

ASoudy/AGS

Skill for discovering and researching autonomous AI agents, tools, and ecosystems using the AgentFolio directory.

関連スキル