
Youtube Transcript
- 248 installs
- 2.3k repo stars
- Updated June 6, 2026
- badlogic/pi-skills
Pull YouTube video transcripts for competitive research, tutorial mining, quote extraction, and grounding agent answers in spoken source material.
About
youtube-transcript from badlogic/pi-skills enables agents to retrieve transcript text from YouTube videos for research, summarization, and content reuse. It supports early discovery and ongoing agent workflows that need reliable access to spoken video material.
- Extracts YouTube captions and transcripts
- Speeds competitive and tutorial research
- Grounds agents in video source text
- Useful for content repurposing pipelines
- Avoids manual copy from video players
Youtube Transcript by the numbers
- 248 all-time installs (skills.sh)
- Ranked #2,575 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
npx skills add https://github.com/badlogic/pi-skills --skill youtube-transcriptAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 248 |
|---|---|
| repo stars | ★ 2.3k |
| Last updated | June 6, 2026 |
| Repository | badlogic/pi-skills ↗ |
What it does
Pull YouTube video transcripts for competitive research, tutorial mining, quote extraction, and grounding agent answers in spoken source material.
Files
YouTube Transcript
Fetch transcripts from YouTube videos.
Setup
cd {baseDir}
npm installUsage
{baseDir}/transcript.js <video-id-or-url>Accepts video ID or full URL:
EBw7gsDPAYQhttps://www.youtube.com/watch?v=EBw7gsDPAYQhttps://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 resultNotes
- Requires the video to have captions/transcripts available
- Works with auto-generated and manual transcripts
{
"name": "youtube-transcript",
"version": "1.0.0",
"type": "module",
"dependencies": {
"youtube-transcript-plus": "^1.0.4"
}
}
#!/usr/bin/env node
import { YoutubeTranscript } from 'youtube-transcript-plus';
const videoId = process.argv[2];
if (!videoId) {
console.error('Usage: transcript.js <video-id-or-url>');
console.error('Example: transcript.js EBw7gsDPAYQ');
console.error('Example: transcript.js https://www.youtube.com/watch?v=EBw7gsDPAYQ');
process.exit(1);
}
// Extract video ID if full URL is provided
let extractedId = videoId;
if (videoId.includes('youtube.com') || videoId.includes('youtu.be')) {
const match = videoId.match(/(?:v=|youtu\.be\/)([a-zA-Z0-9_-]{11})/);
if (match) {
extractedId = match[1];
}
}
try {
const transcript = await YoutubeTranscript.fetchTranscript(extractedId);
for (const entry of transcript) {
const timestamp = formatTimestamp(entry.offset / 1000);
console.log(`[${timestamp}] ${entry.text}`);
}
} catch (error) {
console.error('Error fetching transcript:', error.message);
process.exit(1);
}
function formatTimestamp(seconds) {
const h = Math.floor(seconds / 3600);
const m = Math.floor((seconds % 3600) / 60);
const s = Math.floor(seconds % 60);
if (h > 0) {
return `${h}:${m.toString().padStart(2, '0')}:${s.toString().padStart(2, '0')}`;
}
return `${m}:${s.toString().padStart(2, '0')}`;
}