/best-skills:ebookfrom best-skills
Generate professional, sell-ready PDF ebooks from any topic, YouTube channel, or website. Researches content via web scraping, YouTube analysis, and /last30days skill. Uses Gemini Pro for content writing and image generation. Produces premium PDF with cover art, professional typography, and custom design matching the creator's branding. Use when the user says 'ebook', 'e-book', 'create an ebook', 'generate a PDF book', 'digital product from YouTube', 'ebook from topic', or wants to create a sellable digital product (PDF guide, mini-course book, lead magnet).
Ships in best-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Generate sell-ready PDF ebooks from a topic, YouTube channel, or website. Uses Gemini Pro for content + images, WeasyPrint for PDF rendering.
| Command | What it does |
|---|---|
/ebook [topic] | Create ebook from a topic |
/ebook [youtube-url] | Create ebook from YouTube channel content |
/ebook [website-url] | Create ebook from website/blog content |
/ebook [topic] --pages 50 | Specify page count |
/ebook [topic] --lang en | Specify language (default: fr) |
GATHER INFO → RESEARCH → BRAND ANALYSIS → OUTLINE → WRITE CHAPTERS → GENERATE IMAGES → ASSEMBLE HTML → RENDER PDF
Ask the user for:
If the user provides only a topic or URL, infer reasonable defaults and proceed.
Run research in parallel using multiple sources:
Scrape the channel to understand the creator's content, voice, and expertise:
# Get channel video list with titles and descriptions
yt-dlp --flat-playlist --print "%(id)s|%(title)s|%(view_count)s|%(description).200s" \
"[CHANNEL_URL]/videos" 2>/dev/null | sort -t'|' -k3 -nr | head -20
Download and read thumbnails to understand visual branding:
# Get channel banner/avatar for brand colors
yt-dlp --write-thumbnail --skip-download --convert-thumbnails png \
-o "/tmp/ebook_yt_%(id)s" "[TOP_VIDEO_URL]" 2>/dev/null
Transcribe 2-3 top videos (use WebFetch on auto-generated transcript URLs or summarize descriptions) to capture the creator's voice, frameworks, and key teachings.
Use WebFetch to scrape:
Use the /last30days skill to research the topic:
Also use WebSearch for:
Compile all research into a structured brief:
From YouTube/website, identify:
If no source to analyze, ask the user or use a fallback palette. See references/design-system.md for palette options and font pairings.
Based on brand analysis, set:
PALETTE: {primary, secondary, accent, text, background}
FONTS: {heading_font, body_font, accent_font}
STYLE: {dark|light}
FORMAT: {trade|a4} (trade = 6x9in for ebooks, a4 for guides)
Select the appropriate structure template from references/ebook-structures.md based on page count and content type.
Call Gemini 2.5 Pro to generate a detailed outline. See references/prompts.md — Phase 1 prompt.
curl -s "https://generativelanguage.googleapis.com/v1beta/models/gemini-2.5-pro:generateContent?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "OUTLINE_PROMPT_HERE"}]}],
"generationConfig": {"temperature": 0.8, "maxOutputTokens": 8192}
}' > /tmp/ebook_outline.json
Extract the text response:
python3 -c "
import json
with open('/tmp/ebook_outline.json') as f:
data = json.load(f)
print(data['candidates'][0]['content']['parts'][0]['text'])
"
Show the outline to the user for approval before proceeding.
For each chapter, call Gemini 2.5 Pro with the chapter writing prompt from references/prompts.md — Phase 2.
Critical rules:
/tmp/ebook_ch_N.htmlGenerate the introduction first (Phase 3 prompt), then chapters, then conclusion (Phase 6 prompt).
After generating each chapter, verify:
Generate the cover illustration using Gemini 3 Pro Image. See references/prompts.md — Phase 4.
curl -s -o /tmp/ebook_cover_raw.json \
"https://generativelanguage.googleapis.com/v1beta/models/gemini-3-pro-image-preview:generateContent?key=$GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"contents": [{"parts": [{"text": "COVER_PROMPT_HERE"}]}],
"generationConfig": {"responseModalities": ["IMAGE", "TEXT"]}
}'
python3 scripts/extract_gemini_image.py /tmp/ebook_cover_raw.json /tmp/ebook_cover.png
Generate 1 illustration per chapter using Phase 5 prompt. Run in parallel for speed.
The cover image has NO text. Composite title + author name using HTML/CSS in the final assembly (WeasyPrint handles this perfectly with the cover page styling).
Build a single HTML file that WeasyPrint will convert to PDF.
<!DOCTYPE html>
<html lang="{LANG}">
<head>
<meta charset="UTF-8">
<style>
:root {
--primary: {PRIMARY};
--secondary: {SECONDARY};
--accent: {ACCENT};
--text: {TEXT_COLOR};
--bg: {BG_COLOR};
--accent-5: {ACCENT}0D;
--accent-20: {ACCENT}33;
}
@import url('https://fonts.googleapis.com/css2?family={HEADING_FONT}:wght@700;800&family={BODY_FONT}:wght@400;500;600&display=swap');
body { font-family: '{BODY_FONT}', sans-serif; }
h1, h2, h3 { font-family: '{HEADING_FONT}', sans-serif; }
</style>
</head>
<body>
<!-- COVER PAGE -->
<div class="cover">
<img class="cover-bg" src="/tmp/ebook_cover.png" alt="">
<div class="cover-content" style="color: white; text-shadow: 0 2px 20px rgba(0,0,0,0.8);">
<h1>{TITLE}</h1>
<div class="subtitle">{SUBTITLE}</div>
<div class="author">{AUTHOR_NAME}</div>
</div>
</div>
<!-- TABLE OF CONTENTS -->
<div class="toc">
<h2>Table des matieres</h2>
<!-- Generate TOC entries from chapters -->
</div>
<!-- CHAPTERS -->
<!-- Insert each chapter HTML here -->
<div class="chapter-opener">
<div class="chapter-number">01</div>
<h1>{Chapter Title}</h1>
<p class="chapter-intro">{Chapter summary quote}</p>
<img class="chapter-illustration" src="/tmp/ebook_ch1_img.png" alt="">
</div>
<!-- Chapter content -->
<div class="page-break"></div>
<!-- ABOUT AUTHOR -->
<div class="about-author">
<img class="author-photo" src="{AUTHOR_PHOTO}" alt="{AUTHOR_NAME}">
<h2>A propos de l'auteur</h2>
<p>{AUTHOR_BIO}</p>
</div>
<!-- CTA PAGE -->
<div class="cta-page">
<h2>{CTA_HEADLINE}</h2>
<p class="cta-text">{CTA_TEXT}</p>
<div class="cta-box">{CTA_BUTTON_TEXT}</div>
<p>{CTA_URL}</p>
</div>
</body>
</html>
Save the assembled HTML to {OUTPUT_DIR}/ebook.html.
pip3 install weasyprint 2>/dev/null
python3 scripts/generate_pdf.py {OUTPUT_DIR}/ebook.html {OUTPUT_DIR}/{SLUG}.pdf --format trade
Verify the PDF:
# Check file size and page count
python3 -c "
from weasyprint import HTML
doc = HTML(filename='{OUTPUT_DIR}/ebook.html').render()
print(f'Pages: {len(doc.pages)}')
"
ls -lh {OUTPUT_DIR}/{SLUG}.pdf
Open the PDF for the user:
open {OUTPUT_DIR}/{SLUG}.pdf
Show the user:
Offer iterations:
Default directory: ~/Documents/ebook/
Files produced:
{slug}.pdf — The final ebook (main deliverable)ebook.html — Source HTML (for future edits)cover.png — Cover artworkch_N_img.png — Chapter illustrationsgemini-2.5-pro (best quality for long-form writing)gemini-3-pro-image-preview (best for illustrations)$GEMINI_API_KEY (must be exported in environment)pip3 install weasyprint (auto-installed if missing)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub smaroc/best-skills-marketplace --plugin best-skills26 skills in this plugin
/adsComprehensive paid advertising audit and optimization for any business type. Performs full multi-platform audits (Google Ads, Meta Ads, LinkedIn Ads, TikTok Ads, Microsoft Ads), single-platform deep analysis, conversion tracking health checks, creative quality assessment, budget allocation optimization, bidding strategy evaluation, and compliance verification. Industry detection for SaaS, e-commerce, local service, B2B enterprise, info products, mobile app, real estate, healthcare, finance, and agency. Triggers on: "ads", "PPC", "paid advertising", "Google Ads", "Meta Ads", "Facebook Ads", "LinkedIn Ads", "TikTok Ads", "Microsoft Ads", "Bing Ads", "ad audit", "campaign audit", "ROAS", "conversion tracking", "creative fatigue", "bid strategy".
/ads-static-generatorGenerate upload-ready static ad creatives from a single URL. Researches Facebook Ads Library for competitor inspiration, analyzes winning patterns, then batch-generates professional branded ad visuals with Gemini Pro. Number of creatives is configurable (default 20). Brand name and real products are always visible on every creative. Use when user says 'ads statiques', 'créatives', 'generate ads', 'static ads', 'ad creatives', 'créer des pubs', 'batch ads', 'publicités statiques', or wants to create multiple ad visuals.
Other plugins' skills for the same job