Subhadip Sarkar

YouTube Transcript (yt-dlp captions)

データ分析v1.0.5
作者:Subhadip Sarkar更新日 2026-05-17全 6 バージョン · 最新版の公開日 2026-02-14youtube-transcript-yt-dlp@clawhub_itzsubhadip/youtube-transcript-yt-dlp
Web スクレイピング#Sqlite

AlphaMoatによると、2026-09時点でYouTube Transcript (yt-dlp captions)のダウンロード数は3,713、スター数は0で、AIスキル全体5,078件中2,885位、データ分析では399件中219位です。

インストール数
118
ダウンロード数
3713
スター数
-
総合順位
#2,885
全体の上位 57% · データ分析の上位 55%
プラットフォームインストール数ダウンロード数スター数コメント
ClawHub ↗1183707--
SkillHub ↗1173713-—

プラットフォームごとに集計方法と集計時点が異なります。

このスキルでできること

yt-dlp を使い、手動字幕を優先してから自動字幕に切り替えます。字幕がない場合は YouTube の transcript panel を試すことがあります。ソースでは、この版は第三者の文字起こしサービスを呼び出さず YouTube に直接接続すると説明されています。cookies ファイルは秘密情報として扱ってください。

資料公開日 2026-10-29

できること

  • 既存の YouTube 字幕を要約や検索用のテキストにする
  • 必要に応じてタイムスタンプやキャッシュを利用する

使う場面

  • ユーザーが YouTube リンクを提示し、字幕テキストや要約用の入力を必要とするとき

プロンプト例

スキルのドキュメントをもとに生成した例であり、実際の実行結果ではありません。

既存字幕からテキストを取得する方法と、字幕がない場合の動作を説明してください。動画へアクセスしないでください。

月次の推移

ダウンロード数3713
1780281838562026-03 · ダウンロード数 19232026-05 · ダウンロード数 29112026-06 · ダウンロード数 30702026-07 · ダウンロード数 33852026-08 · ダウンロード数 35642026-09 · ダウンロード数 371326-0326-09
スター数-
0112026-03 · スター数 -2026-05 · スター数 -2026-06 · スター数 -2026-07 · スター数 -2026-08 · スター数 -2026-09 · スター数 -26-0326-09

2026-09 から集計方法を変更し、同名スキルを作者ごとに分けて集計し、全スキルを対象にしました。破線は変更前の月で、変更後のデータとは直接比較せず、変更をまたぐ増減も計算していません。

月ダウンロード数前月比スター数
2026-093713—-
2026-083564+5.3%-
2026-073385+10.3%-
2026-063070+5.5%-
2026-052911—-
2026-031923—-

SKILL.md 原文

作者が公開した元のファイルをテキストのまま表示しています。AlphaMoat による編集や審査はしていません。リンクはクリックできません。コマンドは内容を確認してから実行してください。取得日 2026-10-23。

3.8 KB・ClawHub v1.0.5
---
name: yt_transcript
description: Extract YouTube video transcripts from existing captions (manual or auto-generated) using yt-dlp, with optional timestamps and local SQLite caching. Use when the user asks for a YouTube transcript, captions, subtitles, or wants to turn a YouTube link into text for summarization/search.
metadata: {"openclaw":{"requires":{"bins":["python3","yt-dlp"]},"os":["linux","darwin","win32"]}}
user-invocable: true
---

# YouTube Transcript (Captions-Only)

This skill extracts transcripts from **existing** YouTube captions.
すべて表示(全 95 行)

**Primary behavior**
- Prefer **manual subtitles** when available.
- Fall back to **auto-generated captions**.
- Output either:
  - **JSON** segments (default) or
  - **plain text** (`--text`)
- Cache results locally in **SQLite** for speed.

**Reliability behavior**
- If YouTube blocks anonymous access (bot-check), provide **cookies.txt**.
- If `yt-dlp` reports no captions for a video, the script tries a fallback:
  1) YouTube’s **transcript panel** (youtubei `get_transcript`) when accessible

This published version intentionally **does not** call third-party transcript providers.

**Privacy note:** This published version only contacts YouTube directly (via `yt-dlp` and the transcript panel fallback). It does **not** send video IDs/URLs to third-party transcript providers.

**Cookies:** Cookies are treated as secrets.
- The script supports `--cookies` / `YT_TRANSCRIPT_COOKIES`, but does **not** auto-load cookies from inside the skill directory.
- Store cookies under `~/.config/yt-transcript/`.

**Path safety:** This skill restricts `--cookies` and `--cache` paths to approved directories.
- cookies allowed under: `~/.config/yt-transcript/`
- cache allowed under: `{baseDir}/cache/` and `~/.config/yt-transcript/`

## How to run

Script path:
- `{baseDir}/scripts/yt_transcript.py`

Typical usage:
- `python3 {baseDir}/scripts/yt_transcript.py <youtube_url_or_id>`
- `python3 {baseDir}/scripts/yt_transcript.py <url> --lang en`
- `python3 {baseDir}/scripts/yt_transcript.py <url> --text`
- `python3 {baseDir}/scripts/yt_transcript.py <url> --no-ts`

Cookies (optional, but often required on VPS IPs):
- `python3 {baseDir}/scripts/yt_transcript.py <url> --cookies /path/to/youtube-cookies.txt`
- or set env var: `YT_TRANSCRIPT_COOKIES=/path/to/youtube-cookies.txt`

**Publishing safety note:** Cookies are optional, so `YT_TRANSCRIPT_COOKIES` is intentionally **not required** by skill metadata. Only set it if you need authenticated access.

**Best practice:** store cookies **outside** the skill folder (so you never accidentally publish them), e.g. `~/.config/yt-transcript/youtube-cookies.txt`, and point to it via `--cookies` or `YT_TRANSCRIPT_COOKIES`.

## What the script returns

### JSON mode (default)
A JSON object:
- `video_id`: 11-char id
- `lang`: chosen language
- `source`: `manual` | `auto` | `panel`
- `segments`: list of `{ start, duration, text }` (or text-only when `--no-ts`)

### Text mode (`--text`)
A newline-separated transcript.
- By default timestamps are included as `[12.34s]`.
- Use `--no-ts` to output only the text lines.

## Caching

Default cache DB:
- `{baseDir}/cache/transcripts.sqlite`

Cache key includes:
- `video_id`, `lang`, `source`, `include_timestamp`, `format`

## Cookie handling (important)

- Cookies must be in **Netscape cookies.txt** format.
- Treat cookies as **secrets**.
- **Never commit / publish cookies** to ClawHub.

Recommended local path (ignored by git/publish):
- `{baseDir}/cache/youtube-cookies.txt` (chmod 600)

## Notes (safety + reliability)

- Only accept a YouTube URL or an 11-character video ID.
- Do not forward arbitrary user-provided flags into the command.
- If `yt-dlp` is missing, instruct the user to install it (recommended):
  - install pipx
  - `pipx install yt-dlp`
  - ensure `yt-dlp` is on PATH

データ分析の人気スキル

データ月:2026-09 · ダウンロード数、スター数、インストール数は公開スキルレジストリ(ClawHub、SkillHub)から月単位で集計しています。詳しくはデータの方法論をご覧ください。