Communitygithub.com

ComeOnOliver/skillshub

使用 yt-dlp 下载并处理 YouTube 视频转录文本。适用于提取字幕、生成视频摘要或处理视频内容。

skillshub 是什么?

该技能用于从 YouTube 视频中提取和转录字幕,支持手动字幕、自动生成字幕以及使用 Whisper 进行音频转写的回退方案。它首先检查 yt-dlp 是否安装,然后列出可用的字幕语言,优先尝试下载手动字幕,若不可用则自动回退到自动生成字幕。最后,技能会清理 VTT 文件中的时间戳和重复行,生成干净的纯文本转录。该技能支持 macOS、Linux 和 Python 环境,并提供了完整的错误处理表格和示例用例,如课程视频摘要和多语言字幕提取。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/doyajin174/youtube-transcript

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

YouTube 转录文本下载器

从 YouTube 视频中提取和处理字幕的技能。

优先级顺序

1. 确认 yt-dlp 已安装
2. 检查可用的字幕列表
3. 优先尝试手动字幕
4. 回退到自动生成的字幕
5. 最后手段:Whisper 转换

要求

# macOS
brew install yt-dlp

# Linux
sudo apt install yt-dlp

# 通用
pip install yt-dlp

工作流程

步骤 1:检查字幕列表

yt-dlp --list-subs "VIDEO_URL"

步骤 2:下载手动字幕(推荐)

# 韩语字幕
yt-dlp --write-sub --sub-lang ko --skip-download "VIDEO_URL"

# 英文字幕
yt-dlp --write-sub --sub-lang en --skip-download "VIDEO_URL"

步骤 3:自动生成字幕(回退)

yt-dlp --write-auto-sub --sub-lang ko --skip-download "VIDEO_URL"

步骤 4:VTT 转文本

# 从 VTT 文件中移除时间戳
sed '/^[0-9]/d; /^$/d; /-->/d' subtitle.ko.vtt > transcript.txt

输出处理

去重

自动生成的字幕由于渐进式字幕常有重复:

# 移除重复行
seen = set()
unique_lines = []
for line in lines:
    if line not in seen:
        seen.add(line)
        unique_lines.append(line)

生成摘要

利用提取的字幕进行:

  • 核心内容摘要
  • 按时间戳生成章节
  • 提取主要关键词

示例

示例 1:课程视频摘要

用户:总结这个 YouTube 课程视频 - https://youtube.com/watch?v=xxx

Claude:
1. 使用 yt-dlp 下载字幕
2. 将 VTT 转换为文本
3. 生成核心内容摘要
4. 提供按时间戳的目录

示例 2:多语言字幕提取

用户:同时提取这个视频的英文/韩文字幕

Claude:
1. 使用 --list-subs 确认可用语言
2. 为每种语言下载字幕
3. 提供整理好的文本文件

错误处理

错误原因解决方案
yt-dlp not found未安装使用 brew/apt/pip 安装
No subtitles available无字幕建议使用 Whisper
Invalid URLURL 错误检查 URL 格式
Video unavailable私有或已删除通知用户

Whisper 回退

如果完全没有字幕(需要用户确认):

# 检查文件大小
yt-dlp --print filesize "VIDEO_URL"

# 用户批准后下载音频
yt-dlp -x --audio-format mp3 "VIDEO_URL"

# 使用 Whisper 转写
whisper audio.mp3 --language ko --model base

注意:会消耗带宽/处理时间,必须获得用户确认

Individual skills in this repo

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

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

相关技能