Skip to content
Back to skills

Youtube Search

ASecurity

Search YouTube with yt-dlp and return structured results (title, channel, views, duration, date, URL), then fetch captions or download audio for a chosen video. Use when the user asks to "search youtube" or what is on YouTube about a topic, wants recent or most-viewed videos on a topic, wants videos from a specific channel, needs metadata for a YouTube URL, wants a YouTube video's captions or subtitles, or wants a video's audio downloaded to transcribe. Do NOT use for transcribing a local aud...

  • 95 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added November 9, 2026
developmentjavascriptpythonjavabashgit

Works with

  • cli

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned November 13, 2026

npx -y skills add henkisdabro/wookstar-claude-plugins --skill youtube-search --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Youtube Search?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Youtube Search
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/henkisdabro-youtube-search/badge)](https://www.skillsdirectory.com/skills/henkisdabro-youtube-search)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: youtube-search
description: Search YouTube with yt-dlp and return structured results (title, channel, views, duration, date, URL), then fetch captions or download audio for a chosen video. Use when the user asks to "search youtube" or what is on YouTube about a topic, wants recent or most-viewed videos on a topic, wants videos from a specific channel, needs metadata for a YouTube URL, wants a YouTube video's captions or subtitles, or wants a video's audio downloaded to transcribe. Do NOT use for transcribing a local audio file - use transcribe; for converting or editing media files - use ffmpeg-cli; for playing videos or for non-YouTube platforms.
argument-hint: <topic> [max_results]
allowed-tools: Bash, Read
---

# YouTube Search

Search YouTube through [yt-dlp](https://github.com/yt-dlp/yt-dlp) and present structured results. Users must respect YouTube's Terms of Service and copyright when downloading anything.

## Prerequisites

`yt-dlp` on PATH. Install with `brew install yt-dlp` (Homebrew also installs Deno), or `python3 -m pip install -U "yt-dlp[default]"` per the [installation wiki](https://github.com/yt-dlp/yt-dlp/wiki/Installation). Search and metadata work on their own; **downloads** additionally need ffmpeg (for `-x`) and a JavaScript runtime such as [Deno](https://deno.com) for YouTube's challenge solving - see the [EJS wiki](https://github.com/yt-dlp/yt-dlp/wiki/EJS) if a download fails with a challenge or "n function" error.

## Steps

1. **Parse the request** into a query, a result count (default 10) and any filters from the table below. Done when every constraint the user stated maps to a flag.
2. **Run the search** (allow up to 300 s for `--full` runs):

   ```bash
   uv run "${CLAUDE_SKILL_DIR}/scripts/yt_search.py" "<query>" -n 10 [options]
   ```

   Done when the script prints results, or prints "No results" and you have retried once with looser filters.
3. **Present the Markdown output as-is.** If the user wants more on one video, run `yt-dlp "<url>" --dump-json --no-download --no-warnings` and pick the fields they asked about. Done when the user has the results table and every field they asked for.
4. **Hand off** if the user wants the content of a video, not just the link - follow [Getting the words out of a video](#getting-the-words-out-of-a-video). Done when the captions file or the audio path is in hand.

## Options

| Flag | Default | Purpose |
|------|---------|---------|
| `-n, --max-results` | 10 | Maximum results to return |
| `--months N` | off | Only videos from the last N months. Implies `--full` |
| `--sort` | relevance | `relevance`, `views`, or `date` (`date` implies `--full`) |
| `--min-views` | - | Minimum view count |
| `--min-duration` / `--max-duration` | - | Duration bounds in seconds |
| `--channel` | - | Channel name, case-insensitive substring |
| `--json` | off | Clean JSON on stdout, safe to pipe to `jq` |
| `--full` | off | Visit each video: upload date, likes, comments, tags, description |

**Fast vs full mode.** Fast mode makes one request to the search results page and finishes in a few seconds, but YouTube's results page carries **no upload dates** (the Date column shows `?`). Full mode visits each video (roughly 3-5 s each, over-fetching 3x to survive filters) and is the only way to filter or sort by date. Reach for `--months` only when recency genuinely matters - for evergreen topics (talks, tutorials, fundamentals) the canonical videos are often years old.

## Search tactics

- `--min-duration 600` drops Shorts, clips and promos; `--min-duration 1800` keeps only long-form talks, interviews and podcasts.
- View count measures popularity, not quality. Weigh the channel too: conference, university and official author channels rarely produce noise.
- `"<person> <topic>"` returns videos *by* and *about* that person. To get only their own uploads, add `--channel "<exact channel name>"`.

## Getting the words out of a video

Check for captions first - they are faster and free:

```bash
yt-dlp --list-subs "<url>"
```

- **Captions exist:** fetch them as `.vtt` without downloading the video:

  ```bash
  yt-dlp --skip-download --write-subs --write-auto-subs --sub-langs en -P "<dir>" -o "%(id)s.%(ext)s" "<url>"
  ```

- **No captions, or the user wants an accurate transcript:** download the audio only, then hand the printed path to the **transcribe** skill:

  ```bash
  yt-dlp -x --audio-format m4a -P "<dir>" -o "%(id)s.%(ext)s" --print after_move:filepath "<url>"
  ```

  `--print after_move:filepath` prints the final file path on stdout - pass exactly that path to transcribe. Done when the `.m4a` exists at that path. For long videos, `--download-sections "*10:00-25:00"` grabs only a time range.

For trimming, splitting or re-encoding the downloaded file, use the **ffmpeg-cli** skill from this marketplace's `ffmpeg` plugin.

Files in this skill

  • SKILL.md4.6 KB
  • scripts/yt_search.py8.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.