
Youtube Live Chat
- 65 installs
- 112 repo stars
- Updated July 8, 2026
- pamelafox/presentation-skills
Helps with ai & agent building tasks.
About
youtube-live-chat is a Claude Code skill for ai & agent building. It helps solo builders move faster with AI-assisted coding.
- youtube-live-chat
- AI & Agent Building
- AI-coding skill
Youtube Live Chat by the numbers
- 65 all-time installs (skills.sh)
- +2 installs in the week ending Aug 4, 2026 (Skillselion tracking)
- Ranked #6,042 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/pamelafox/presentation-skills --skill youtube-live-chatAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 65 |
|---|---|
| repo stars | ★ 112 |
| Last updated | July 8, 2026 |
| Repository | pamelafox/presentation-skills ↗ |
What it does
Helps with ai & agent building tasks.
Files
YouTube Live Chat Downloader
Download live chat messages from YouTube videos using yt-dlp.
Usage
Run the script with a YouTube URL or video ID:
uv run .agents/skills/youtube-live-chat/get_live_chat.py "VIDEO_URL_OR_ID"With timestamps:
uv run .agents/skills/youtube-live-chat/get_live_chat.py "VIDEO_URL_OR_ID" --timestampsOutput to a specific file:
uv run .agents/skills/youtube-live-chat/get_live_chat.py "VIDEO_URL_OR_ID" --output chat.txtSupported URL Formats
https://www.youtube.com/watch?v=VIDEO_IDhttps://www.youtube.com/live/VIDEO_IDhttps://youtu.be/VIDEO_IDhttps://youtube.com/embed/VIDEO_ID- Raw video ID (11 characters)
Output Format
- Without timestamps (default):
[author]: messageformat - With timestamps:
[HH:MM:SS] [author]: messageformat
Output
- If you were asked to save the chat to a specific file, save it to the requested file.
- If no output file was specified, use the YouTube video ID with a
-livechat.txtsuffix.
Notes
- Works with live streams currently in progress
- Works with past streams that have chat replay enabled
- Some videos may not have live chat available
- Super chats and memberships are included with their message text
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.10"
# dependencies = ["yt-dlp>=2024.0.0"]
# ///
"""
Download live chat from a YouTube video.
Usage:
uv run get_live_chat.py <video_id_or_url> [--timestamps] [--output FILE]
"""
import sys
import json
import tempfile
import argparse
from pathlib import Path
from yt_dlp import YoutubeDL
def format_timestamp(ms: int) -> str:
"""Convert milliseconds to HH:MM:SS format."""
if ms is None or ms < 0:
return "00:00:00"
seconds = ms // 1000
hours = int(seconds // 3600)
minutes = int((seconds % 3600) // 60)
secs = int(seconds % 60)
return f"{hours:02d}:{minutes:02d}:{secs:02d}"
def parse_chat_json(json_path: Path, with_timestamps: bool = False) -> str:
"""Parse the live chat JSON file from yt-dlp."""
lines = []
with open(json_path, 'r', encoding='utf-8') as f:
for line in f:
line = line.strip()
if not line:
continue
try:
data = json.loads(line)
except json.JSONDecodeError:
continue
# Navigate to the chat item
replay_action = data.get('replayChatItemAction', {})
actions = replay_action.get('actions', [])
offset_ms = int(replay_action.get('videoOffsetTimeMsec', 0))
for action in actions:
add_action = action.get('addChatItemAction', {})
item = add_action.get('item', {})
# Handle regular text messages
renderer = item.get('liveChatTextMessageRenderer')
if renderer:
author = renderer.get('authorName', {}).get('simpleText', 'Unknown')
message_runs = renderer.get('message', {}).get('runs', [])
text = ''.join(run.get('text', '') for run in message_runs)
if text:
if with_timestamps:
timestamp = format_timestamp(offset_ms)
lines.append(f"[{timestamp}] [{author}]: {text}")
else:
lines.append(f"[{author}]: {text}")
return '\n'.join(lines)
def get_live_chat(video_url: str, with_timestamps: bool = False) -> str:
"""Fetch and format live chat for a YouTube video using yt-dlp."""
with tempfile.TemporaryDirectory() as tmpdir:
output_template = str(Path(tmpdir) / 'chat')
ydl_opts = {
'skip_download': True,
'writesubtitles': True,
'subtitleslangs': ['live_chat'],
'outtmpl': output_template,
'quiet': True,
'no_warnings': True,
}
with YoutubeDL(ydl_opts) as ydl:
ydl.download([video_url])
# Find the downloaded chat file
chat_file = Path(tmpdir) / 'chat.live_chat.json'
if not chat_file.exists():
raise ValueError("No live chat available for this video")
return parse_chat_json(chat_file, with_timestamps)
def main():
parser = argparse.ArgumentParser(description='Download YouTube live chat')
parser.add_argument('video', help='YouTube video URL or video ID')
parser.add_argument('--timestamps', '-t', action='store_true',
help='Include timestamps in output')
parser.add_argument('--output', '-o', help='Output file path')
args = parser.parse_args()
try:
# yt-dlp handles all URL formats directly
video_url = args.video
if not video_url.startswith('http'):
video_url = f"https://www.youtube.com/watch?v={args.video}"
chat = get_live_chat(video_url, with_timestamps=args.timestamps)
if args.output:
with open(args.output, 'w', encoding='utf-8') as f:
f.write(chat)
print(f"Chat saved to {args.output}", file=sys.stderr)
else:
print(chat)
except Exception as e:
print(f"Error: {e}", file=sys.stderr)
sys.exit(1)
if __name__ == '__main__':
main()
Related skills
AI & Agent Buildingagents