| name | ai-pdf-builder |
| description | AI-powered PDF generator for legal docs, pitch decks, and reports. SAFEs, NDAs, term sheets, whitepapers. npx ai-pdf-builder. Works with Claude, Cursor, GPT, Copilot. |
| version | 1.2.3 |
| bins | ["pandoc","pdflatex"] |
| keywords | pdf-generator, ai-pdf, legal-docs, pitch-deck, startup-docs, investor-docs, ai-writing, document-automation, ycombinator, safe-agreement, nda, term-sheet, whitepaper, ai, ai-agent, ai-coding, llm, cursor, claude, claude-code, gpt, copilot, vibe-coding, mcp, agentic, coding-agent |
AI PDF Builder
YC-style docs in seconds. AI-powered PDF generator for legal documents, pitch decks, and professional reports.
Generate SAFEs, NDAs, term sheets, whitepapers, and memos from simple prompts. Works with Claude, GPT, Cursor, and AI coding agents. Perfect for:
- Whitepapers & Litepapers
- Term Sheets
- SAFEs & NDAs
- Memos & Reports
- Legal Agreements
What's New in v1.1.0
- AI Content Generation - Generate documents from prompts using Claude
--company Flag - Inject company name directly via CLI
enhance Command - Improve existing content with AI
summarize Command - Generate executive summaries from documents
- Content Sanitization - Automatic cleanup of AI-generated content
Requirements
This skill requires Pandoc and LaTeX (pdflatex) to generate PDFs.
Run npx ai-pdf-builder check to verify your system.
macOS
brew install pandoc
brew install --cask basictex
sudo tlmgr install collection-fontsrecommended fancyhdr titlesec enumitem xcolor booktabs longtable geometry hyperref graphicx setspace array multirow
Linux (Debian/Ubuntu)
sudo apt-get install pandoc texlive-latex-recommended texlive-fonts-recommended texlive-latex-extra
For other Linux distros, install the equivalent packages via your package manager.
Windows
winget install --id JohnMacFarlane.Pandoc -e
winget install --id MiKTeX.MiKTeX -e
mpm --install=fancyhdr,titlesec,enumitem,xcolor,booktabs,longtable,geometry,hyperref,graphicx,setspace,array,multirow
Verify Installation
pandoc --version
pdflatex --version
npx ai-pdf-builder check
For AI Features: Set your Anthropic API key.
export ANTHROPIC_API_KEY="your-key-here"
Usage
Check System
npx ai-pdf-builder check
Generate via CLI
npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf
npx ai-pdf-builder generate whitepaper ./content.md -o output.pdf --company "Acme Corp"
AI Content Generation (New!)
npx ai-pdf-builder ai whitepaper "Write a whitepaper about decentralized identity" -o identity.pdf
npx ai-pdf-builder ai whitepaper "AI in healthcare" -o healthcare.pdf --company "HealthTech Inc"
npx ai-pdf-builder ai termsheet "Series A for a fintech startup" -o termsheet.pdf
npx ai-pdf-builder ai memo "Q4 strategy update" -o memo.pdf --company "TechCorp"
Enhance Existing Content (New!)
npx ai-pdf-builder enhance ./draft.md -o enhanced.md
npx ai-pdf-builder enhance ./draft.md -o enhanced.pdf --pdf
Summarize Documents (New!)
npx ai-pdf-builder summarize ./long-document.md -o summary.md
npx ai-pdf-builder summarize ./report.pdf -o summary.pdf --pdf
Generate via Code
import { generateWhitepaper, generateTermsheet, generateSAFE, aiGenerate, enhance, summarize } from 'ai-pdf-builder';
const aiResult = await aiGenerate('whitepaper',
'Write about blockchain scalability solutions',
{ company: 'ScaleChain Labs' }
);
const result = await generateWhitepaper(
'# My Whitepaper\n\nContent here...',
{ title: 'Project Name', author: 'Your Name', version: 'v1.0', company: 'Acme Corp' }
);
if (result.success) {
fs.writeFileSync('whitepaper.pdf', result.buffer);
}
const enhanced = await enhance(existingMarkdown);
const summary = await summarize(longDocument);
const termsheet = await generateTermsheet(
'# Series Seed Term Sheet\n\n## Investment Amount\n\n$500,000...',
{ title: 'Series Seed', subtitle: 'Your Company Inc.', company: 'Investor LLC' }
);
const safe = await generateSAFE(
'# Simple Agreement for Future Equity\n\n...',
{ title: 'SAFE Agreement', subtitle: 'Your Company Inc.' }
);
Document Types
| Type | Function | Best For |
|---|
whitepaper | generateWhitepaper() | Technical docs, litepapers |
memo | generateMemo() | Executive summaries |
agreement | generateAgreement() | Legal contracts |
termsheet | generateTermsheet() | Investment terms |
safe | generateSAFE() | SAFE agreements |
nda | generateNDA() | Non-disclosure agreements |
report | generateReport() | Business reports |
proposal | generateProposal() | Business proposals |
Custom Branding
const result = await generateWhitepaper(content, metadata, {
customColors: {
primary: '#E85D04',
secondary: '#14B8A6',
accent: '#0D0D0D'
},
fontSize: 11,
margin: '1in',
paperSize: 'letter'
});
Agent Instructions
When a user asks to generate a PDF:
- Check what type of document they need (whitepaper, term sheet, memo, etc.)
- Determine if they want AI generation or have existing content
- Get the content - either from their message, a file, or use AI to generate
- Ask for metadata if not provided (title, author, company name)
- Use
--company flag to inject company branding
- Check if Pandoc is installed:
which pandoc
- If Pandoc missing, provide install instructions or suggest cloud API
- Generate the PDF using the appropriate function
- Send the PDF file to the user
AI Commands Quick Reference:
ai <type> "<prompt>" - Generate new document from prompt
enhance <file> - Improve existing content
summarize <file> - Create executive summary
--company "Name" - Add company branding to any command
Links
Built by @NextXFrontier & @DLhugly