Token导航 LogoToken导航TokenDH.com
研究检索操作浏览器github未标认证来源可访问clear审计提醒

youtube-transcribe-skillYouTube 转录技巧

Agent Skill

youtube-transcribe-skill 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

3,321

周安装

137

GitHub Stars

1,509

下载量

1,085
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:youtube-transcribe-skill(YouTube 转录技巧)
来源仓库:https://github.com/feiskyer/claude-code-settings
仓库路径:skills/youtube-transcribe-skill
安装命令:
npx skills add https://github.com/feiskyer/claude-code-settings --skill youtube-transcribe-skill
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/feiskyer/claude-code-settings --skill youtube-transcribe-skill

简介

转录 YouTube 视频音频为文本内容。

  • 适合字幕生成、内容索引或语音分析。
  • 通过 npx skills add 命令从仓库安装。
  • 应关注准确率与多语言支持能力。适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。
  • youtube-transcribe-skill 属于研究检索类 Skill,可作为该场景下的辅助能力补充。

SKILL.md

YouTube Transcript Extraction

Extract subtitles/transcripts from a YouTube video URL and save them as a local file.

Input YouTube URL: $ARGUMENTS

Step 1: Verify URL

Confirm the input is a valid YouTube URL (supports youtube.com/watch?v=, youtu.be/, and youtube.com/shorts/ formats). If no URL is provided via arguments, check the conversation context for a YouTube link.

Step 2: CLI Quick Extraction (Priority Attempt)

Use command-line tools to quickly extract subtitles.

2.1 Check Tool Availability

Execute which yt-dlp.

  • If yt-dlp is found, proceed to 2.2.
  • If yt-dlp is not found, skip to Step 3.

2.2 Get Video Title

yt-dlp --cookies-from-browser=chrome --get-title "[VIDEO_URL]"
  • Tip: Always add --cookies-from-browser to avoid sign-in restrictions. Default to chrome.
  • If it fails with a browser error (e.g., "Could not open Chrome"), ask the user to specify their available browser (e.g., firefox, safari, edge) and retry.

2.3 Download Subtitles

yt-dlp --cookies-from-browser=chrome --write-auto-sub --write-sub --sub-lang zh-Hans,zh-Hant,en --skip-download --output "<Video Title>.%(ext)s" "[VIDEO_URL]"

2.4 Convert to Plain Text

yt-dlp saves subtitles as .vtt or .srt files. Convert the downloaded file to plain Timestamp Text format:

  1. Read the downloaded subtitle file (.vtt or .srt).
  2. Strip VTT/SRT headers, styling tags, and duplicate lines.
  3. Save as <Video Title>.txt with one Timestamp Text entry per line.

2.5 Verify Results

  • Exit code 0: Convert and save the subtitle file, then report completion.
  • Exit code non-0:

- If error is related to browser/cookies, ask user for correct browser and retry. - If other errors (e.g., video unavailable), proceed to Step 3.

Step 3: Browser Automation (Fallback)

When the CLI method fails or yt-dlp is missing, use Chrome DevTools MCP to extract subtitles via browser UI automation.

3.1 Check Tool Availability

Check if Chrome DevTools MCP tools are available (look for tools matching chrome__new_page or similar).

If Chrome DevTools MCP is not available and yt-dlp was not found in Step 2, stop and notify the user: "Unable to proceed. Please either install yt-dlp (for fast CLI extraction) or configure Chrome DevTools MCP (for browser automation)."

3.2 Open Video Page

Use Chrome DevTools MCP new_page to open the video URL.

3.3 Analyze Page State

Use Chrome DevTools MCP take_snapshot to read the page accessibility tree.

3.4 Expand Video Description

The "Show transcript" button is usually hidden within the collapsed description area.

  1. Search the snapshot for a button labeled "...more", "...更多", or "Show more" (in the description block below the video title).
  2. Use Chrome DevTools MCP click to click that button.

3.5 Open Transcript Panel

  1. Use Chrome DevTools MCP take_snapshot to get the updated UI.
  2. Search for a button labeled "Show transcript", "显示转录稿", or "内容转文字".
  3. Use Chrome DevTools MCP click to click that button.
  4. If the button is not found, the video may not have a transcript available — notify the user and stop.

3.6 Extract Content via DOM

Directly reading the accessibility tree for long transcript lists is slow and token-heavy. Use Chrome DevTools MCP evaluate_script to run this JavaScript instead:

() => {
  const segments = document.querySelectorAll("ytd-transcript-segment-renderer");
  if (!segments.length) return "BUFFERING";
  return Array.from(segments)
    .map((seg) => {
      const time = seg.querySelector(".segment-timestamp")?.innerText.trim();
      const text = seg.querySelector(".segment-text")?.innerText.trim();
      return `${time} ${text}`;
    })
    .join("\n");
};

If it returns "BUFFERING", wait a few seconds and retry (up to 3 attempts).

3.7 Save and Cleanup

  1. Save the extracted text as <Video Title>.txt.
  2. Use Chrome DevTools MCP close_page to release resources.

Output Requirements

  • Save the subtitle file to the current working directory.
  • Filename format: <Video Title>.txt
  • File content format: Each line should be Timestamp Subtitle Text.
  • Report upon completion: file path, subtitle language, and total number of lines.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Claude Code

28.41%
按下载量换算308

OpenCode

24.4%
按下载量换算265

Antigravity

17.41%
按下载量换算189

Gemini CLI

11.53%
按下载量换算125

Cursor

7.7%
按下载量换算84

Codex

3.68%
按下载量换算40

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

操作浏览器

该 Skill 可能涉及浏览器控制能力,使用时可能读取或操作网页内容,需要在受控环境中确认权限边界。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills