How mapleshaw/yt-dlp-downloader-skill works
Purpose and Invocation
This repository is a Cursor Agent Skill that translates natural-language download requests into yt-dlp operations. It is not a standalone application or service; Cursor loads the skill definition and may invoke its shell helper.
Primary entry points:
• SKILL.md — agent-facing operating instructions, request interpretation, and command guidance.
• scripts/download.sh — executable download helper.
• README.md — installation and user-facing usage contract.
Skill Runtime Boundary
Cursor is the orchestration runtime. A user asks Cursor to download video, audio, subtitles, or a target quality; Cursor follows SKILL.md to select arguments and execute the local helper or yt-dlp command.
The repository itself does not implement media extraction or site support. Those responsibilities are delegated to installed command-line dependencies:
• yt-dlp handles URL extraction, site-specific access, downloads, format selection, subtitles, and resume behavior.
• ffmpeg is required by yt-dlp for audio extraction/conversion.
Relevant paths:
• SKILL.md
• scripts/download.sh
Request-to-Command Translation
The central control flow is:
1. User supplies a media URL and optional intent (video, MP3/audio, subtitles, 720p/1080p/best).
2. Cursor interprets the request using SKILL.md.
3. Cursor constructs or delegates to scripts/download.sh.
4. The helper invokes yt-dlp with the selected download options.
5. Downloaded artifacts are written to the local download destination.
This places intent parsing in the Cursor agent layer, while format and network behavior remain in yt-dlp.
Download Execution Component
scripts/download.sh is the operational boundary between agent instructions and the host shell. It provides a stable invocation surface for media download actions and should own shell-level concerns such as argument forwarding, destination selection, and command execution.
Path:
• scripts/download.sh
The host must have executable shell support plus installed yt-dlp; failures from remote sites, authentication, or media conversion surface through this command boundary.
Access and Authentication Handling
The intended mitigation for YouTube HTTP 403 responses is browser-cookie extraction via yt-dlp (for example, --cookies-from-browser chrome). This crosses an important local-security boundary: yt-dlp accesses browser-managed authentication cookies on the user’s machine rather than storing credentials in this repository.
Paths defining this behavior:
• SKILL.md
• README.md
No credential store, API backend, proxy service, or account-management subsystem is present.
External Service and Media Boundaries
Input URLs can target YouTube, Bilibili, Twitter/X, TikTok, Vimeo, Twitch, and other sources supported upstream by yt-dlp. Site extraction logic is external and changes with the installed yt-dlp version, not this repository.
Output media is local filesystem content. Audio extraction introduces an additional processing stage through ffmpeg; subtitle acquisition remains a yt-dlp responsibility.
Installation and Distribution
The skill is distributed as a small directory intended for Cursor’s skills location (~/.cursor/skills/yt-dlp-downloader). Manual installation requires preserving the expected layout so the agent instructions can locate the helper.
Repository layout anchors:
• SKILL.md
• scripts/download.sh
• scripts/
Main entry points: SKILL.md Skill instructions · download.sh Download helper · README.md Usage contract
Components 12
Cursor Runtime
Agent orchestration and request interpretation.
- Download request · URL plus video, audio, subtitle, or quality intent.
- Cursor Agent · Loads the skill and executes download commands.
Skill Package
Installed under Cursor's skills directory.
- Skill instructions · Maps natural-language requests to yt-dlp options.
SKILL.md - Download helper · Forwards selected arguments and runs the download command.
scripts/download.sh - Usage contract · Defines installation, usage, and cookie guidance.
README.md - Cursor skills location · Expected skill directory layout for Cursor discovery.
Host & Upstream
Dependencies and remote media sources.
- Host shell · Runs the executable helper locally.
- yt-dlp · Performs extraction, format selection, downloads, subtitles, and resume.
- Browser cookies · Optionally read by yt-dlp for authenticated access.
- Media sites · YouTube and other sites supported by the installed yt-dlp version.
- ffmpeg · Required for audio extraction and conversion.
Local Output
- Downloaded media · Video, audio, and subtitle outputs at the selected destination.
Connections 13
- Download request → Cursor Agent: asks
- Cursor Agent → Skill instructions: follows
- Usage contract → Cursor skills location: documents installation
- Cursor skills location → Skill instructions: contains
- Skill instructions → Download helper: selects invocation
- Cursor Agent → Download helper: executes
- Download helper → Host shell: runs through
- Host shell → yt-dlp: invokes
- yt-dlp → Media sites: extracts from
- Browser cookies → yt-dlp: optional cookie extraction
- ffmpeg → yt-dlp: audio conversion
- yt-dlp → Downloaded media: writes
- Usage contract → Browser cookies: documents 403 mitigation