ytdlp

ytdlp is a command for Claude Code from trtmn/agent-plugins. It costs 0 tokens per session (403 once invoked), scanned A, original, Unlicense.

A command that downloads a YouTube video, thumbnail, or subtitles using yt-dlp, a tool for retrieving media from YouTube and other supported sites.

In plain words
What is it for?
It is for downloading media from a URL, including thumbnail-only or subtitle requests, with optional video conversion and media-server syncing through the related workflow.
Why use it?
It keeps the download workflow in one command and moves verbose download and conversion output into a background task.

Command for Claude Code

Written for Claude Code: $CLAUDE_PLUGIN_ROOT variable. Also seen: reads .claude/ paths; mentions subagents.

Runs only inside its plugin — its command needs a path that Claude Code sets for a plugin’s own hooks and for nothing else. Install the plugin, not this.

Part of the yt-dlp plugin — 1 skill, 1 command shipped together

Good fit It is for downloading media from a URL, including thumbnail-only or subtitle requests, with optional video conversion and media-server syncing through the related workflow.

Compare 6 commands from other repositories ↓
Install

Getting it into your agent

This one installs as part of its plugin. Adding the marketplace and installing the plugin brings it with everything else the plugin ships.

Claude Code
/plugin marketplace add trtmn/agent-plugins
Claude Code
/plugin install yt-dlp

Made for: Claude Code.

Or install yt-dlp, the plugin that ships this one along with the rest of its 1 skill, 1 command.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for ytdlp

README.md
[![agentmods](https://agentmods.dev/badge/commands/trtmn/agent-plugins/ytdlp/github.svg)](https://agentmods.dev/commands/trtmn/agent-plugins/ytdlp)
Your own site
<a href="https://agentmods.dev/commands/trtmn/agent-plugins/ytdlp"><img src="https://agentmods.dev/badge/commands/trtmn/agent-plugins/ytdlp/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for ytdlp

Your own site · 80×15
<a href="https://agentmods.dev/commands/trtmn/agent-plugins/ytdlp"><img src="https://agentmods.dev/badge/commands/trtmn/agent-plugins/ytdlp.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 403 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.00403
Opus 5.5 $0.00000 $0.00161
Sonnet 5.5 $0.00000 $0.00081
Haiku 4.5 $0.00000 $0.00040

Measured 25d ago against content hash d35f2caf0013, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

ytdlp scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 25d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/yt-dlp/commands/ytdlp.md · 26 lines

What it actually says

Download a YouTube video (or thumbnail/subtitles) via yt-dlp, using the yt-dlp skill's workflow. $ARGUMENTS holds the URL and any flags exactly as the user typed them, e.g. --thumbnails-only https://youtube.com/watch?v=....

  1. Check first-time setup has been done:

    test -d "$HOME/.claude/yt-dlp"
    

    If missing, create it (mkdir -p ~/.claude/yt-dlp) and tell the user remote sync / Jellyfin integration are optional — see the yt-dlp skill's "First-time setup" section if they want those wired up. Downloads work with zero configuration.

  2. Delegate the run to a background Haiku subagent (per the skill's "How to run" section) so verbose yt-dlp/ffmpeg/rsync output never enters your context:

    • subagent_type: general-purpose
    • model: haiku
    • run_in_background: true
    • Prompt:
      Run this command and report back ONLY: the video title(s), whether each download
      succeeded, whether any Apple TV conversion happened, and the final sync/Jellyfin
      result. Do not paste raw ffmpeg/yt-dlp progress output.
      
      cd ~/.claude/yt-dlp && uv run --with yt-dlp --with click --with requests --with python-dotenv \
        python3 "$CLAUDE_PLUGIN_ROOT/skills/yt-dlp/scripts/ytdlp.py" $ARGUMENTS
      
  3. Tell the user the download is running in the background and you'll report when it finishes — do not poll or block on it.

  4. When the notification arrives, relay the subagent's summary. If the user explicitly asked to watch live output instead, run the command directly in the foreground rather than delegating.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 25d ago First seen · 26 lines · 0 tokens per session scan A d35f2caf0013

Subscribe to this mod's changes

ytdlp is a command published in the GitHub repository trtmn/agent-plugins (2 stars, last pushed 11d ago), licensed Unlicense. It costs nothing until one of its globs matches a file; then it loads 403 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-24.