Agent skill

Yt Search Download

by joeseesun in joeseesun/yt-search-download

YouTube 视频搜索、下载视频、下载字幕工具。结合 YouTube Data API v3 进行高级搜索,yt-dlp 下载视频/音频/字幕。

MITAuto-check passed

Install Yt Search Download

skills CLI
$ npx skills add joeseesun/yt-search-download --skill yt-search-download -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install joeseesun/yt-search-download yt-search-download --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
yt-search-download
GitHub stars
117
Token cost
~1.3k tokens
SKILL.md length
185 words
Files
5 (incl. scripts)
Skills in repo
1
Repo updated
First seen
Licence
MIT

At a glance

YouTube 视频搜索、下载视频、下载字幕工具。结合 YouTube Data API v3 进行高级搜索,yt-dlp 下载视频/音频/字幕。

  • Works in 2 steps: YouTube API Key → yt-dlp(下载用)
  • SKILL.md covers 前置条件, 命令说明, 输出格式(Markdown 表格) and 典型工作流, plus 1 more section
  • Runs Python scripts from its folder; calls python3, yt-dlp and brew; reaches youtube.com; needs YT_BROWSE_API_KEY

What it does

Yt Search Download is an agent skill from joeseesun/yt-search-download. YouTube 视频搜索、下载视频、下载字幕工具。结合 YouTube Data API v3 进行高级搜索,yt-dlp 下载视频/音频/字幕。 核心能力:全站关键词搜索、频道浏览、按时间/播放量/相关度排序、下载视频、提取音频(MP3)、下载字幕(中英文)、查看视频详情。 触发场景(任何涉及 YouTube 的操作都应使用此 skill): - 搜索类:"搜索YouTube"、"YouTube搜索"、"找YouTube视频"、"搜索[频道名]最新视频"、"查找[人名]的YouTube"、"[人名]最近更新的YouTube"、"YouTube上有什么关于XXX的" - 频道浏览类:"浏览频道"、"看看[频道名]最新视频"、"[人名]最近发了什么视频"、"[人名]YouTube更新"、"查看[频道名]的视频列表" - 下载视频类:"下载YouTube"、"下载这个视频"、"下载YouTube视频"、"把这个视频下载下来"、"保存视频" - 下载音频类:"提取音频"、"下载音频"、"YouTube转MP3"、"只要音频" -…

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. The skill folder holds 6 other files, including scripts (for example `README.md` and `scripts/yt_search.py`).

It works with YouTube. The repository describes itself as: YouTube 视频搜索与下载工具 — Claude Code Skill | Search YouTube videos and download via yt-dlp. The licence is MIT.

Example prompts

  • “搜索YouTube”
  • “YouTube搜索”
  • “找YouTube视频”
  • “/yt-search-download”

Requirements

  • Python 3
  • A credential in YT_BROWSE_API_KEY

Workflow steps

2 steps, taken from the first numbered list in SKILL.md.

  1. YouTube API Key
  2. yt-dlp(下载用)

What it can do on your machine

Read from SKILL.md and the folder at commit 2b10938. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python3
    • yt-dlp
    • brew
    • pip

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    Hosts in commands or code, which the agent is likely to contact:

    • youtube.com

    Also links to:

    • console.cloud.google.com

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names these keys or tokens, usually read from environment variables:

    • YT_BROWSE_API_KEY

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Yt Search Download loads about 1.3k tokens when it runs. Until then it costs about 168 tokens; SKILL.md has 185 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~168
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from joeseesun/yt-search-download at commit 2b10938, republished under its MIT licence (© joeseesun). 185 words, ~1,289 tokens.

Download SKILL.mdSave it as .claude/skills/yt-search-download/SKILL.md (or your agent's skills folder). This skill also uses 4 other files; get the full folder from GitHub.
name
yt-search-download
description
YouTube 视频搜索、下载视频、下载字幕工具。结合 YouTube Data API v3 进行高级搜索,yt-dlp 下载视频/音频/字幕。 核心能力:全站关键词搜索、频道浏览、按时间/播放量/相关度排序、下载视频、提取音频(MP3)、下载字幕(中英文)、查看视频详情。 触发场景(任何涉及 YouTube 的操作都应使用此 skill): - 搜索类:"搜索YouTube"、"YouTube搜索"、"找YouTube视频"、"搜索[频道名]最新视频"、"查找[人名]的YouTube"、"[人名]最近更新的YouTube"、"YouTube上有什么关于XXX的" - 频道浏览类:"浏览频道"、"看看[频道名]最新视频"、"[人名]最近发了什么视频"、"[人名]YouTube更新"、"查看[频道名]的视频列表" - 下载视频类:"下载YouTube"、"下载这个视频"、"下载YouTube视频"、"把这个视频下载下来"、"保存视频" - 下载音频类:"提取音频"、"下载音频"、"YouTube转MP3"、"只要音频" - 下载字幕类:"下载字幕"、"提取字幕"、"获取字幕"、"下载YouTube字幕"、"中文字幕"、"英文字幕"、"提取文字"、"视频转文字"、"获取视频文本" - 视频信息类:"视频详情"、"视频信息"、"这个视频多长" 关键词匹配:只要用户消息中出现 "YouTube"、"油管"、"YT"、"yt" 加上搜索/下载/字幕/频道/视频等动作词,就应触发此 skill。

YouTube 搜索 & 下载

基于 YouTube Data API v3 进行高级搜索,配合 yt-dlp 下载。

前置条件

  1. YouTube API Key:

    bash
    echo $YT_BROWSE_API_KEY

    如果为空:Google Cloud Console → 启用 YouTube Data API v3 → 创建 API Key → 写入 ~/.zshrc:

    bash
    export YT_BROWSE_API_KEY=your_key
  2. yt-dlp(下载用):

    bash
    brew install yt-dlp   # macOS
    pip install yt-dlp     # 或 pip 安装

命令说明

脚本路径:~/.claude/skills/yt-search-download/scripts/yt_search.py

全站关键词搜索
bash
python3 scripts/yt_search.py search "关键词" -n 20
参数说明
-n 20最多返回条数(默认 20)
-o date按时间排序(默认 relevance)
-o viewCount按播放量排序(API 级,准确)
--sort-by views本地二次排序(按播放量降序)
--sort-by duration-asc本地排序:时长从短到长
--sort-by duration-desc本地排序:时长从长到短
--min-duration 30m过滤:最短时长(支持 30m、1h、1h30m、纯数字=分钟)
--max-duration 1h过滤:最长时长
--after 2024-01-01发布时间起
--before 2024-12-31发布时间止
-c @handle限定频道
-d显示简介
--jsonJSON 格式输出
浏览频道视频
bash
# 频道最新视频(按时间倒序)
python3 scripts/yt_search.py channel @channelHandle -n 10

# 频道内关键词搜索
python3 scripts/yt_search.py channel @channelHandle -q "关键词"

# 频道内按播放量排序
python3 scripts/yt_search.py channel @channelHandle -o viewCount

# 只看长视频(超过 1 小时)
python3 scripts/yt_search.py channel @channelHandle --min-duration 1h

# 只看短视频(30 分钟内),按时长升序
python3 scripts/yt_search.py channel @channelHandle --max-duration 30m --sort-by duration-asc

频道格式支持:@handle、https://youtube.com/@handle、频道 ID(UCxxxx)

下载视频
bash
# 最佳画质下载到 ~/Downloads
python3 scripts/yt_search.py download "VIDEO_URL"

# 指定画质
python3 scripts/yt_search.py download "VIDEO_URL" -q 1080p

# 指定目录
python3 scripts/yt_search.py download "VIDEO_URL" --dir ~/Desktop

# 仅下载音频(MP3)
python3 scripts/yt_search.py download "VIDEO_URL" --audio-only
视频详情查询
bash
python3 scripts/yt_search.py info "VIDEO_URL"

输出格式(Markdown 表格)

脚本已输出 Markdown 表格,AI 必须将每行的 【译】___ 替换为实际中文翻译后再呈现给用户。

最终呈现效果:

#标题(原文 → 中文译文)日期时长播放量
1Rick Beato: Greatest Guitarists...<br>里克·贝阿托:史上最伟大的吉他手2026-03-012h33m302.2K
2State of AI in 2026: LLMs, Coding...<br>2026年AI现状:大模型、编程、Scaling法则2026-01-314h25m741.7K

🔴 强制规范:

  • ✅ 保留原英文标题(作为可点击链接)
  • ✅ 【译】___ 替换为简洁中文译文(放在链接后同一单元格)
  • ✅ 所有视频逐行翻译,不得跳过
  • ❌ 不询问用户是否需要翻译(直接翻译)
  • ❌ 不把 【译】___ 原样输出给用户

典型工作流

找某频道最新视频并下载:

  1. channel @handle -n 10 → 浏览结果
  2. 问用户要下载哪个
  3. download "URL" → 保存到 ~/Downloads

搜索 + 按播放量筛选:

  1. search "关键词" -o viewCount -n 20

提取播客音频:

  1. search "播客名" -o date -n 5
  2. download "URL" --audio-only
下载字幕(默认同时输出 SRT + TXT)

标准流程:下载字幕转为 SRT,同时生成保留时间戳的 TXT(供 AI 总结用,时间戳有助于定位内容)。

bash
# Step 1:下载字幕并转为 SRT(英文优先,无则用自动字幕)
yt-dlp --cookies-from-browser chrome \
  --write-auto-sub --write-sub \
  --sub-lang en,zh-Hans \
  --convert-subs srt \
  --skip-download \
  -o "~/Downloads/%(title)s.%(ext)s" \
  "VIDEO_URL"
# 输出:~/Downloads/视频标题.en.srt 或 .zh-Hans.srt

# Step 2:从 SRT 生成 TXT(保留时间戳,仅去除序号和空行,供 AI 总结使用)
python3 -c "
import re, sys
srt = open(sys.argv[1]).read()
# 去除序号行(纯数字行),保留时间戳和字幕文本
txt = re.sub(r'^\d+\s*\n', '', srt, flags=re.MULTILINE)
txt = re.sub(r'\n{3,}', '\n\n', txt).strip()
txt_path = sys.argv[1].replace('.srt', '.txt')
open(txt_path, 'w').write(txt)
print(f'已保存:{txt_path}')
" ~/Downloads/视频标题.en.srt
# 输出:~/Downloads/视频标题.en.txt(格式:时间戳 + 字幕文本)

TXT 格式示例(保留时间戳,便于 AI 总结时引用具体时间点):

00:00:01,000 --> 00:00:04,000
Welcome to the Lex Fridman podcast.

00:00:05,000 --> 00:00:09,000
Today we're talking about the greatest guitarists of all time.

其他场景:

bash
# 仅中文字幕(SRT + TXT)
yt-dlp --cookies-from-browser chrome --write-auto-sub --write-sub \
  --sub-lang zh-Hans --convert-subs srt --skip-download \
  -o "~/Downloads/%(title)s.%(ext)s" "VIDEO_URL"

# 字幕 + 视频一起下载
yt-dlp --cookies-from-browser chrome --write-auto-sub --write-sub \
  --sub-lang en --convert-subs srt \
  -o "~/Downloads/%(title)s.%(ext)s" "VIDEO_URL"

规范:下载字幕时始终加 --convert-subs srt,下载完成后始终执行 Step 2 生成 TXT,让用户同时拿到 .srt(带时间轴)和 .txt(纯文本)两个文件。

高级用法(直接用 yt-dlp)

bash
# 列出可用格式
yt-dlp --cookies-from-browser chrome -F "VIDEO_URL"

# 下载整个播放列表
yt-dlp --cookies-from-browser chrome -o "~/Downloads/%(playlist_title)s/%(title)s.%(ext)s" "PLAYLIST_URL"

© joeseesun, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 4 other files (scripts) in the repository root of joeseesun/yt-search-download.

  • SKILL.md
  • LICENSE
  • README.md
  • scripts/__pycache__/yt_search.cpython-314.pyc
  • scripts/yt_search.py

Open the folder on GitHubat commit 2b10938

Compare with similar skills

Yt Search Download next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Yt Search Download compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Yt Search Download this skilljoeseesun/yt-search-download117—~1.3kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Banner Design Systemnextlevelbuilder/ui-ux-pro-max-skill135k1 repos~1.8kAutomated safety check: PassMIT
Agent ReachPanniantong/Agent-Reach95k—~1.4kAutomated safety check: PassMIT
Last30daysmvanhorn/last30days-skill64k—~7.9kAutomated safety check: NotesMIT
Baoyu URL To Markdownsdyckjq-lab/llm-wiki-skill2.5k2 repos~3.2kAutomated safety check: PassNone

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Banner Design System

    nextlevelbuilder/ui-ux-pro-max-skill

    Walks through designing a banner for social media, ads, a website hero or print, from gathering requirements to building 2 or 3 art-direction options in HTML and CSS.

    135k GitHub starsUsed in 1 repo~1.8k tokens
    Frontend & DesignAuto-check passed
  • Agent Reach

    Panniantong/Agent-Reach

    Routes web research and platform lookups across 16 sites, including Twitter, Reddit, YouTube, Bilibili, Xiaohongshu and GitHub, through one command-line tool.

    95k GitHub stars~1.4k tokensUpdated 3 days ago
    Productivity & AutomationAuto-check passed
  • Last30days

    mvanhorn/last30days-skill

    Research what people actually say about any topic in the last 30 days.

    64k GitHub stars~7.9k tokensUpdated yesterday
    Research & ScienceAuto-check: notes
  • Baoyu URL To Markdown

    sdyckjq-lab/llm-wiki-skill

    Fetch any URL and convert to markdown using Chrome CDP. An agent skill from sdyckjq-lab/llm-wiki-skill.

    2.5k GitHub starsUsed in 2 repos~3.2k tokens
    Knowledge ManagementAuto-check passed
  • Google SEO APIs

    AgriciDaniel/claude-seo

    Pulls real Google data for SEO work: Search Console, PageSpeed Insights, CrUX field data, the Indexing API and GA4 organic traffic, through /seo google commands.

    19k GitHub starsUsed in 1 repo~4.2k tokens
    Marketing & SEOAuto-check passed

Works with

Questions about Yt Search Download

What does Yt Search Download do?

YouTube 视频搜索、下载视频、下载字幕工具。结合 YouTube Data API v3 进行高级搜索,yt-dlp 下载视频/音频/字幕。. Yt Search Download is an agent skill from joeseesun/yt-search-download.

How do I install Yt Search Download in Claude Code?

Run `npx skills add joeseesun/yt-search-download --skill yt-search-download -a claude-code`. Or copy the skill folder (the joeseesun/yt-search-download repository) into .claude/skills/yt-search-download in your project. Claude Code loads it when a task matches its description.

How do I install Yt Search Download in Codex?

Run `npx skills add joeseesun/yt-search-download --skill yt-search-download -a codex`. Or copy the skill folder (the joeseesun/yt-search-download repository) into .agents/skills/yt-search-download in your project. Codex loads it when a task matches its description.

Can I use Yt Search Download in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add joeseesun/yt-search-download --skill yt-search-download -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/yt-search-download, .gemini/skills/yt-search-download, .github/skills/yt-search-download and .opencode/skills/yt-search-download in your project.

What does Yt Search Download need to run?

Going by SKILL.md and its folder, Yt Search Download needs Python for the scripts in its folder, the command-line tools its instructions call (python3, yt-dlp, brew and pip) and credentials named YT_BROWSE_API_KEY. Our summary lists: Python 3; A credential in YT_BROWSE_API_KEY.

Does Yt Search Download access the network?

SKILL.md names 2 domains. In commands or code: youtube.com; the agent is likely to contact it when it follows the instructions. As links in the text: console.cloud.google.com. This is read from the text; nothing was executed.

Is Yt Search Download safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Yt Search Download use?

Yt Search Download is published under the MIT licence (from the LICENSE file in the skill folder). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Yt Search Download use?

About 1.3k tokens (SKILL.md is roughly 5.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Yt Search Download?

Skills that share tags, products or a category with Yt Search Download: Markitdown (ImCa0/just-laws, 781 stars), Banner Design System (nextlevelbuilder/ui-ux-pro-max-skill, 135k stars), Agent Reach (Panniantong/Agent-Reach, 95k stars) and Last30days (mvanhorn/last30days-skill, 64k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Yt Search Download?

joeseesun (a GitHub user) maintains it in joeseesun/yt-search-download, which has 117 GitHub stars. The repository was last updated on March 6, 2026.

Source: joeseesun/yt-search-download on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.