home / skills / badlogic / pi-skills / youtube-transcript
This skill fetches YouTube transcripts for a video and enables quick summarization and analysis effortlessly.
npx playbooks add skill badlogic/pi-skills --skill youtube-transcriptReview the files below or copy the command above to add this skill to your agents.
---
name: youtube-transcript
description: Fetch transcripts from YouTube videos for summarization and analysis.
---
# YouTube Transcript
Fetch transcripts from YouTube videos.
## Setup
```bash
cd {baseDir}
npm install
```
## Usage
```bash
{baseDir}/transcript.js <video-id-or-url>
```
Accepts video ID or full URL:
- `EBw7gsDPAYQ`
- `https://www.youtube.com/watch?v=EBw7gsDPAYQ`
- `https://youtu.be/EBw7gsDPAYQ`
## Output
Timestamped transcript entries:
```
[0:00] All right. So, I got this UniFi Theta
[0:15] I took the camera out, painted it
[1:23] And here's the final result
```
## Notes
- Requires the video to have captions/transcripts available
- Works with auto-generated and manual transcripts
This skill fetches transcripts from YouTube videos for summarization, analysis, or downstream processing. It accepts either a video ID or a full YouTube URL and returns timestamped transcript lines. It supports both auto-generated and manually provided captions when they are available.
You provide a video identifier or URL and the script queries YouTube caption data for that video. It parses the available caption tracks and outputs a simple, timestamped transcript format. If no captions exist, the tool reports that a transcript is unavailable.
What input formats are accepted?
You can pass a plain video ID (e.g., EBw7gsDPAYQ), a full watch URL, or a youtu.be short link.
Does it work with auto-generated captions?
Yes. The tool supports both auto-generated and manual captions if they exist for the video.
What happens if a video has no captions?
The script will report that no transcript is available. You can then choose to run an external speech-to-text step.