with one click
tubescribe
// YouTube video summarizer with speaker detection, formatted documents, and audio output. Use when user sends a YouTube URL or asks to summarize/transcribe a YouTube video.
// YouTube video summarizer with speaker detection, formatted documents, and audio output. Use when user sends a YouTube URL or asks to summarize/transcribe a YouTube video.
[HINT] Download the complete skill directory including SKILL.md and all related files
| name | TubeScribe |
| description | YouTube video summarizer with speaker detection, formatted documents, and audio output. Use when user sends a YouTube URL or asks to summarize/transcribe a YouTube video. |
Turn any YouTube video into a polished document + audio summary.
Drop a YouTube link ā get a beautiful transcript with speaker labels, key quotes, timestamps that link back to the video, and an audio summary you can listen to on the go.
When user sends a YouTube URL:
DO NOT BLOCK ā spawn and move on instantly.
Run setup to check dependencies and configure defaults:
python skills/tubescribe/scripts/setup.py
This checks: summarize CLI, pandoc, ffmpeg, Kokoro TTS
Spawn ONE sub-agent that does the entire pipeline:
sessions_spawn(
task=f"""
## TubeScribe: Process {youtube_url}
ā ļø CRITICAL: Do NOT install any software.
No pip, brew, curl, venv, or binary downloads.
If a tool is missing, STOP and report what's needed.
Run the COMPLETE pipeline ā do not stop until all steps are done.
### Step 1: Extract
```bash
python3 skills/tubescribe/scripts/tubescribe.py "{youtube_url}"
Note the video_id from the output (e.g., "Source: /tmp/tubescribe_ABC123_source.json" ā video_id is ABC123).
Read /tmp/tubescribe_<video_id>_source.json and note:
Write to /tmp/tubescribe_<video_id>_output.md:
# **<title>**## **Participants** ā table with bold headers:
| **Name** | **Role** | **Description** |
|----------|----------|-----------------|
## **Summary** ā 3-5 paragraphs of prose## **Key Quotes** ā 5 best with clickable YouTube timestamps. Format each as:
"Quote text here." - [12:34](https://www.youtube.com/watch?v=ID&t=754s)
"Another quote." - [25:10](https://www.youtube.com/watch?v=ID&t=1510s)
Use regular dash -, NOT em dash ā. Do NOT use blockquotes >. Plain paragraphs only.## **Viewer Sentiment** (if comments exist)## **Best Comments** (if comments exist) ā Top 5, NO lines between them:
Comment text here.
*- ā² 123 @AuthorName*
Next comment text here.
*- ā² 45 @AnotherAuthor*
Attribution line: dash + italic. Just blank line between comments, NO --- separators.## **Full Transcript** ā merge segments, speaker labels, clickable timestampsClean the title for filename (remove special chars), then:
pandoc /tmp/tubescribe_<video_id>_output.md -o ~/Documents/TubeScribe/<safe_title>.docx
Read ~/.tubescribe/config.json to check audio.tts_engine and kokoro.path.
tts_engine is "kokoro": activate Kokoro from the configured path, generate with voice blend from config, save as MP3 to the configured output folder.tts_engine is "builtin": use say command (macOS) to generate audio.audio.enabled is false: skip this step.python3 skills/tubescribe/scripts/tubescribe.py --cleanup <video_id>
open ~/Documents/TubeScribe/
Tell what was created: DOCX name, MP3 name + duration, video stats. """, label="tubescribe", runTimeoutSeconds=900, cleanup="delete" )
**After spawning, reply immediately:**
> š¬ TubeScribe is processing - I'll let you know when it's ready!
Then continue the conversation. The sub-agent notification announces completion.
## Configuration
Config file: `~/.tubescribe/config.json`
```json
{
"output": {
"folder": "~/Documents/TubeScribe",
"open_folder_after": true,
"open_document_after": false,
"open_audio_after": false
},
"document": {
"format": "docx",
"engine": "pandoc"
},
"audio": {
"enabled": true,
"format": "mp3",
"tts_engine": "builtin"
},
"kokoro": {
"path": "~/.openclaw/tools/kokoro",
"voice_blend": { "af_heart": 0.6, "af_sky": 0.4 },
"speed": 1.05
},
"processing": {
"subagent_timeout": 600,
"cleanup_temp_files": true
}
}
| Option | Default | Description |
|---|---|---|
output.folder | ~/Documents/TubeScribe | Where to save files |
output.open_folder_after | true | Open output folder when done |
output.open_document_after | false | Auto-open generated document |
output.open_audio_after | false | Auto-open generated audio summary |
| Option | Default | Values | Description |
|---|---|---|---|
document.format | docx | docx, html, md | Output format |
document.engine | pandoc | pandoc | Converter for DOCX (falls back to HTML) |
| Option | Default | Values | Description |
|---|---|---|---|
audio.enabled | true | true, false | Generate audio summary |
audio.format | mp3 | mp3, wav | Audio format (mp3 needs ffmpeg) |
audio.tts_engine | builtin | builtin, kokoro | TTS engine (builtin = macOS say) |
| Option | Default | Description |
|---|---|---|
kokoro.path | ~/.openclaw/tools/kokoro | Kokoro repo location |
kokoro.voice_blend | {af_heart: 0.6, af_sky: 0.4} | Custom voice mix |
kokoro.speed | 1.05 | Playback speed (1.0 = normal, 1.05 = 5% faster) |
| Option | Default | Description |
|---|---|---|
processing.subagent_timeout | 600 | Seconds for sub-agent (increase for long videos) |
processing.cleanup_temp_files | true | Remove /tmp files after completion |
| Option | Default | Description |
|---|---|---|
comments.max_count | 50 | Number of comments to fetch |
comments.timeout | 90 | Timeout for comment fetching (seconds) |
| Option | Default | Description |
|---|---|---|
queue.stale_minutes | 30 | Consider a processing job stale after this many minutes |
~/Documents/TubeScribe/
āāā {Video Title}.html # Formatted document (or .docx / .md)
āāā {Video Title}_summary.mp3 # Audio summary (or .wav)
After generation, opens the folder (not individual files) so you can access everything.
Required:
summarize CLI ā brew install steipete/tap/summarizeOptional (better quality):
pandoc ā DOCX output: brew install pandocffmpeg ā MP3 audio: brew install ffmpegyt-dlp ā YouTube comments: brew install yt-dlpTubeScribe checks these locations (in order):
| Priority | Path | Source |
|---|---|---|
| 1 | which yt-dlp | System PATH |
| 2 | /opt/homebrew/bin/yt-dlp | Homebrew (Apple Silicon) |
| 3 | /usr/local/bin/yt-dlp | Homebrew (Intel) / Linux |
| 4 | ~/.local/bin/yt-dlp | pip install --user |
| 5 | ~/.local/pipx/venvs/yt-dlp/bin/yt-dlp | pipx |
| 6 | ~/.openclaw/tools/yt-dlp/yt-dlp | TubeScribe auto-install |
If not found, setup downloads a standalone binary to the tools directory. The tools directory version doesn't conflict with system installations.
When user sends multiple YouTube URLs while one is processing:
python skills/tubescribe/scripts/tubescribe.py --queue-status
# Add to queue instead of starting parallel processing
python skills/tubescribe/scripts/tubescribe.py --queue-add "NEW_URL"
# ā Replies: "š Added to queue (position 2)"
# Check if more in queue
python skills/tubescribe/scripts/tubescribe.py --queue-next
# ā Automatically pops and processes next URL
| Command | Description |
|---|---|
--queue-status | Show what's processing + queued items |
--queue-add URL | Add URL to queue |
--queue-next | Process next item from queue |
--queue-clear | Clear entire queue |
python skills/tubescribe/scripts/tubescribe.py url1 url2 url3
Processes all URLs sequentially with a summary at the end.
The script detects and reports these errors with clear messages:
| Error | Message |
|---|---|
| Invalid URL | ā Not a valid YouTube URL |
| Private video | ā Video is private ā can't access |
| Video removed | ā Video not found or removed |
| No captions | ā No captions available for this video |
| Age-restricted | ā Age-restricted video ā can't access without login |
| Region-blocked | ā Video blocked in your region |
| Live stream | ā Live streams not supported ā wait until it ends |
| Network error | ā Network error ā check your connection |
| Timeout | ā Request timed out ā try again later |
When an error occurs, report it to the user and don't proceed with that video.
tubescribe url1 url2 url3