Skip to content
Back to skills

Youtube Search

ASecurity

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.

  • 3 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added October 9, 2026
ai-agentsbashapi

Works with

  • claude code
  • api
  • mcp

Security analysis

A100/100

Scanned October 9, 2026

npx -y skills add TheVeller/claude-skills --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/theveller-youtube-search/badge)](https://www.skillsdirectory.com/skills/theveller-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 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.
---

# 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

```bash
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:

```markdown
## 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"

```bash
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.

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.

Comments

Loading comments…

Newsletter

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