Teach Your Claude Code to Generate Ebooks & Lead Magnets
Real templates, real CSS systems, real PDF export workflows. Everything below is from the actual skill file. Read it, learn it, then download the complete version.
What this skill file teaches Claude
Drop one markdown file into your repo. Claude Code learns how to generate professional lead magnets from plain English prompts.
Content Generation
AI writes full chapters from topic outlines with examples and data points.
Brand-Consistent Design
HTML/CSS ebooks styled with your brand system automatically.
PDF Export
Print-ready PDFs via Puppeteer with cover pages, TOC, and page numbers.
Landing Pages
Gated download pages with email capture and CRM integration.
Multiple Formats
Ebooks, checklists, templates, worksheets, cheat sheets, case studies.
Download Tracking
Every download logged as a CRM event with lead source attribution.
What a high-converting lead magnet looks like
Every ebook follows the same proven structure. Here's each section with its purpose.
Cover Page
Title, subtitle, author name, and brand logo. First impression matters — make it bold, clean, and instantly readable. Use your brand colors.
Table of Contents
Clickable chapter links so readers can jump to what matters. Scannable structure shows the value at a glance. 3-7 chapters is ideal.
Chapter Content
Core content with real examples, data points, and callout boxes. Each chapter should teach one clear concept and include an actionable takeaway.
Key Takeaways
Bullet point summary of the most important insights. Readers skim this first to decide if it's worth reading the full guide. Make every bullet specific.
Call to Action
Single, clear next step: book a call, join a waitlist, or try the product. Never end an ebook without telling the reader what to do next.
Anatomy of a gated download page
Every lead magnet needs a landing page that converts visitors into email subscribers. Here's a real example with each element labeled.
The lead magnet agent
These rules go into departments/marketing/agents/lead-magnet-generator.md. Claude Code follows them when generating every lead magnet.
Readers download lead magnets to solve problems. Every section should give them something they can do immediately. Cut anything that doesn't teach or inspire action.
All styling comes from packages/brand/css/ebook-print.css. This ensures every ebook looks consistent and can be re-branded by changing one config file.
A 5-page guide still needs these three elements. The cover makes it feel professional. The TOC makes it scannable. The CTA converts readers to leads.
"Set up SPF, DKIM, and DMARC records" is good. "Improve email deliverability" is bad. Every item should be completable in one sitting.
"Stop Paying $500/mo for Tools AI Can Replace" beats "A Guide to AI-Native Business Tools." Lead with what the reader gains, not what you wrote.
Even early-stage: "Downloaded by 50+ founders this week" works. Social proof reduces friction at the email gate. Update the number as downloads grow.
How the pipeline works
Six stages. From topic idea to gated download page. Every stage feeds the next -- one repo, zero exports.
Brand System
Every lead magnet uses the same CSS from packages/brand/css/ebook-print.css. Change the brand config once, update every ebook automatically.
CRM Integration
Every download fires a webhook to your CRM. Contact record is created with lead_source, lead_magnet_name, and timestamp. Your sales team sees what each prospect downloaded.
Repurposable
One ebook becomes 5 LinkedIn carousels, 3 blog posts, and a checklist. AI breaks down chapters into standalone content pieces automatically.
Build lead magnets with plain English
Tell Claude Code what to create. It writes the content, designs the layout, exports to PDF, and builds the landing page.
Generated ebook: "How to Replace Your SaaS Stack with AI Agents" Format: Ebook (15 pages, HTML/CSS) Brand: SoloStack neo-brutalist (ebook-print.css) Structure: ├── Cover page ├── Table of contents ├── Ch 1: The SaaS Problem (3 pages) ├── Ch 2: The AI-Native Alternative (3 pages) ├── Ch 3: Building Your Stack (4 pages) ├── Ch 4: Real Cost Comparison (2 pages) ├── Key Takeaways (1 page) └── CTA: Join Waitlist (1 page) ✓ 15 pages generated ✓ 6 code examples included ✓ 3 comparison tables ✓ Brand CSS applied → Preview at localhost:3000/ebook-preview
Exported and published:
PDF: departments/marketing/content/ebooks/saas-replacement-guide.pdf
✓ 15 pages, 2.4 MB
✓ Cover page with brand styling
✓ Clickable table of contents
✓ Page numbers in footer
Landing page: /lead-magnets/saas-replacement-guide
✓ Headline: "Stop Paying $500/mo for Tools AI Can Replace"
✓ 5 bullet points (what's inside)
✓ Email capture form (Netlify Forms)
✓ Download count tracker
✓ CRM webhook configured
→ Live at trysolostack.com/lead-magnets/saas-replacement-guide Generated checklist: "Cold Email Deliverability Checklist"
Format: Checklist (1 page, print-ready)
✓ 12 checklist items across 4 categories:
Domain Setup (3 items)
Email Content (3 items)
Sending Patterns (3 items)
Monitoring (3 items)
✓ Brand CSS applied
✓ PDF exported: deliverability-checklist.pdf (340 KB)
✓ Can be used as email attachment or landing page download
→ Attach to cold email sequences or gate on landing page. Formats & distribution
The skill file supports multiple lead magnet formats and distribution channels to maximize reach.
| Format | Pages | Best Use Case |
|---|---|---|
| Ebook / Guide | 10-30 | Deep-dive educational content |
| Checklist | 1-3 | Quick-reference action items |
| Template | 2-5 | Fill-in-the-blank frameworks |
| Cheat Sheet | 1-2 | Reference cards, shortcuts |
Distribution rules
Get the full skill file
Everything above is 80% of the skill file. Download the complete version with full templates, CSS systems, PDF export code, and landing page setup instructions.
Common questions
Keep building your content stack
Related Solutions
More tools and workflows from across SoloStack
Marketing Funnel
Learn how TOFU, MOFU, and BOFU content drives revenue.
ReplaceReplace HubSpot
Full CRM with contacts, deals, email sequences, and analytics. $3/mo vs $800/mo.
ReplaceReplace ConvertKit
Creator email marketing without the monthly fee. Sequences and landing pages.
Free ToolFree CRM
Unlimited contacts, zero per-seat pricing. AI-managed CRM in your repo.
Ready to build lead magnets that convert?
Join the waitlist and get early access to the full SoloStack lead magnet system.
Join Waitlist →