← ClaudeAtlas

dev-documentlisted

Document generation (PDF, DOCX, XLSX, PPTX). Trigger when the user wants to create a document, generate a report, export to PDF/Word/Excel/PowerPoint, or produce an office file.
christopherlouet/claude-base · ★ 4 · Data & Documents · score 80
Install: claude install-skill christopherlouet/claude-base
# Document Generation ## Goal Create professional documents in different formats: PDF, DOCX, XLSX, PPTX. ## Supported formats | Format | Extension | Recommended tool | Usage | |--------|-----------|------------------|-------| | **PDF** | `.pdf` | puppeteer, wkhtmltopdf, markdown-pdf | Reports, invoices, formal docs | | **Word** | `.docx` | docx (npm), python-docx | Editable documents, specifications | | **Excel** | `.xlsx` | exceljs, openpyxl | Tabular data, numeric reports | | **PowerPoint** | `.pptx` | pptxgenjs, python-pptx | Presentations, pitch decks | ## Instructions per format ### PDF - Generation from HTML/Markdown ```bash # Option 1: Puppeteer (Node.js) npm install puppeteer # Option 2: wkhtmltopdf (CLI) wkhtmltopdf input.html output.pdf # Option 3: markdown-pdf (Markdown -> PDF) npm install markdown-pdf ``` ```typescript // Puppeteer - HTML to PDF import puppeteer from 'puppeteer'; async function generatePDF(htmlContent: string, outputPath: string) { const browser = await puppeteer.launch(); const page = await browser.newPage(); await page.setContent(htmlContent, { waitUntil: 'networkidle0' }); await page.pdf({ path: outputPath, format: 'A4', margin: { top: '20mm', right: '15mm', bottom: '20mm', left: '15mm' }, printBackground: true, }); await browser.close(); } ``` ### DOCX - Word documents ```typescript // npm install docx import { Document, Packer, Paragraph, TextRun, HeadingLevel } from 'docx'; import * as fs from 'fs';