agentleFS
TheVellerTheVeller/claude-skills/skills/research/youtube-search/SKILL.md

youtube-search

Skill4 starsChanged 14 days agoMITView on GitHub

Search YouTube for videos via yt-dlp and return structured results (title, channel, views, duration, description) for analysis. Use when the user wants to search YouTube, find top videos on a topic, or pull video metadata.

14 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use youtube-transcript.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • dandacompanySkill

    youtube-transcript

    Extract YouTube video transcripts/subtitles using yt-dlp. Handles rate limiting, auto-generated captions, multiple languages, and VTT parsing.

    Also in 5 projects that use this

The file

We split this skill into the rules it gives an agent

6 rules. 0 are common, 5 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 13 edited versions we read keep these.

  • 5

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Search YouTube for videos and return structured results using yt-dlp.

    line 8
  2. Distinctive:

    Use this skill when the user wants to:

    line 12
  3. Distinctive:

    Search YouTube for videos on a topic

    line 13
  4. Distinctive:

    When triggered, call the Bash tool to run yt-dlp with the search query.

    line 20
  5. Distinctive:

    Search results may not include view counts (YouTube API limitation with yt-dlp search)

    line 82
  6. Very specific:

    If view counts are needed: yt-dlp --dump-json "https://www.youtube.com/watch?v={id}"

    line 84

“Common” is measured: kept by at least 6 in 10 of the 13 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

YouTube Search Skill

Search YouTube for videos and return structured results using yt-dlp.

Trigger

Use this skill when the user wants to:

  • Search YouTube for videos on a topic
  • Find top YouTube videos about a query
  • Research what's popular on YouTube about a subject
  • Get video metadata (views, channel, duration, description) for analysis

How to Use

When triggered, call the Bash tool to run yt-dlp with the search query.

Basic Search

yt-dlp "ytsearch10:{QUERY}" \
  --dump-json \
  --no-download \
  --flat-playlist \
  --no-warnings \
  2>/dev/null

Each line of output is a JSON object. Parse and return structured results.

Result Fields to Extract

From each JSON object, extract:

  • id → YouTube video ID
  • title → Video title
  • url → Full URL: https://www.youtube.com/watch?v={id}
  • view_count → Number of views (may be null for search results)
  • channel → Channel name
  • channel_url → Channel URL
  • duration → Duration in seconds (convert to MM:SS)
  • description → First 300 chars of description
  • upload_date → Date in YYYYMMDD format
  • like_count → Likes (may be null)

Output Format

Return results as a structured markdown list:

## YouTube Search Results: "{query}"

Found {N} videos

| # | Title | Channel | Views | Duration |
|---|-------|---------|-------|----------|
| 1 | [Title](URL) | Channel Name | 1.2M | 12:34 |
...

### Full Details

**1. [Video Title](URL)**
- Channel: Channel Name
- Views: 1,234,567
- Duration: 12:34
- Published: 2024-03-15
- Description: First 300 chars...

Parameters

  • query — Search query string (required)
  • limit — Number of results (default: 10, max: 50)
  • sort_by — Sort preference: relevance (default), views, date

Notes

  • yt-dlp is installed at /opt/homebrew/bin/yt-dlp
  • Search results may not include view counts (YouTube API limitation with yt-dlp search)
  • For view counts, a second pass fetching individual video metadata may be needed
  • If view counts are needed: yt-dlp --dump-json "https://www.youtube.com/watch?v={id}"

Example Usage

User: "Search YouTube for the top 5 videos about Claude Code MCP servers"

yt-dlp "ytsearch5:Claude Code MCP servers" --dump-json --no-download --flat-playlist --no-warnings 2>/dev/null

Parse JSON output → return structured table + details.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.