/SKILL.md
Transform YouTube videos into beautifully formatted ebook articles with transcripts
npx skillsauth add hoangtheelegant/youtube-to-ebook youtube-to-ebookInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Transform YouTube videos from your favorite channels into well-written magazine-style articles, delivered as an EPUB ebook.
Ask: "Set up YouTube to ebook for me"
I'll guide you through:
| Command | Description |
|---------|-------------|
| python main.py | Generate ebook from latest videos |
| python main.py --channels | Edit channel list |
| python dashboard.py | Launch web dashboard |
youtube-newsletter/
├── get_videos.py # Fetch latest videos
├── get_transcripts.py # Extract transcripts
├── write_articles.py # Transform to articles
├── send_email.py # Create EPUB & send
├── main.py # Run full pipeline
├── channels.txt # Your channel list
└── .env # API keys
Problem: Filtering by duration doesn't work—some Shorts are longer than 60 seconds.
Solution: Check if the /shorts/ URL resolves:
def is_youtube_short(video_id):
shorts_url = f"https://www.youtube.com/shorts/{video_id}"
response = requests.head(shorts_url, allow_redirects=True, timeout=5)
return "/shorts/" in response.url
Problem: YouTube Search API doesn't return truly chronological results.
Solution: Use the channel's uploads playlist via playlistItems API:
# Get uploads playlist ID from channel
channel_info = youtube.channels().list(
part="contentDetails",
forHandle=handle
).execute()
uploads_playlist_id = channel_info["items"][0]["contentDetails"]["relatedPlaylists"]["uploads"]
# Fetch from uploads playlist (always chronological)
youtube.playlistItems().list(
part="snippet",
playlistId=uploads_playlist_id,
maxResults=15
).execute()
Problem: YouTubeTranscriptApi.get_transcript() no longer works.
Solution: Use instance method:
from youtube_transcript_api import YouTubeTranscriptApi
ytt_api = YouTubeTranscriptApi()
transcript = ytt_api.fetch(video_id)
Problem: Fetching many transcripts quickly triggers rate limits.
Solution: Add 2-second delays between requests:
import time
for video in videos:
transcript = get_transcript(video["video_id"])
time.sleep(2)
Problem: Auto-transcripts misspell names and technical terms.
Solution: Include video title and description in Claude's context—these usually have correct spellings.
Problem: GitHub Actions and cloud servers are blocked by YouTube for transcript fetching.
Solution: Run automation locally on your Mac using launchd:
<!-- ~/Library/LaunchAgents/com.youtube.ebook.plist -->
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.youtube.ebook</string>
<key>ProgramArguments</key>
<array>
<string>/usr/bin/python3</string>
<string>/path/to/main.py</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Weekday</key>
<integer>3</integer>
<key>Hour</key>
<integer>7</integer>
</dict>
</dict>
</plist>
Edit the prompt in write_articles.py to change article tone:
Add Gmail credentials to .env to receive ebooks via email:
[email protected]
GMAIL_APP_PASSWORD=your-app-password
┌─────────────┐ ┌──────────────┐ ┌───────────────┐ ┌────────────┐
│ Fetch Videos│───▶│Get Transcripts│───▶│Write Articles │───▶│Create EPUB │
│ (YouTube API)│ │(Transcript API)│ │ (Claude AI) │ │ (ebooklib) │
└─────────────┘ └──────────────┘ └───────────────┘ └────────────┘
The generated EPUB contains:
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.
development
Run, watch, debug, and extend OpenClaw QA testing with qa-lab and qa-channel. Use when Codex needs to execute the repo-backed QA suite, inspect live QA artifacts, debug failing scenarios, add new QA scenarios, or explain the OpenClaw QA workflow. Prefer the live OpenAI lane with regular openai/gpt-5.4 in fast mode; do not use gpt-5.4-pro or gpt-5.4-mini unless the user explicitly overrides that policy.
development
End-to-end Parallels smoke, upgrade, and rerun workflow for OpenClaw across macOS, Windows, and Linux guests. Use when Codex needs to run, rerun, debug, or interpret VM-based install, onboarding, gateway smoke tests, latest-release-to-main upgrade checks, fresh snapshot retests, or optional Discord roundtrip verification under Parallels.