documents

cerico's avatarfrom cerico

Generate PDF and Word documents programmatically. Use for invoices, reports, contracts, or data exports.

⭐0stars🔀0forks📁View on GitHub🕐Updated Jan 2, 2026

When & Why to Use This Skill

This Claude skill enables the programmatic generation of professional PDF and Word (DOCX) documents. It streamlines business workflows by automating the creation of high-quality invoices, detailed reports, legal contracts, and data exports directly from application data or HTML templates using industry-standard libraries like React-PDF and Puppeteer.

Use Cases

  • Automated Invoicing: Generate and format PDF invoices automatically based on transaction data for immediate client delivery.
  • Dynamic Business Reporting: Transform raw application data into structured, visually appealing PDF reports for stakeholders.
  • Legal and Contract Automation: Programmatically populate Word document templates with specific client details to create ready-to-sign contracts and proposals.
  • Data Exporting: Convert web-based dashboards or complex datasets into portable PDF or DOCX formats for offline distribution and archiving.
namedocuments
descriptionGenerate PDF and Word documents programmatically. Use for invoices, reports, contracts, or data exports.

Documents

Generate documents (PDF, DOCX) programmatically.

Status: Early Stage

This skill is a placeholder. Patterns will evolve with use.

Potential Use Cases

  • Invoices for clients
  • Reports from app data
  • Contracts/proposals
  • Data exports

Stack Options to Explore

PDF Generation

pnpm add @react-pdf/renderer
import { Document, Page, Text, View } from '@react-pdf/renderer'

const Invoice = () => (
  <Document>
    <Page>
      <View>
        <Text>Invoice #001</Text>
      </View>
    </Page>
  </Document>
)

Word Documents

pnpm add docx
import { Document, Paragraph, TextRun } from 'docx'

const doc = new Document({
  sections: [{
    children: [
      new Paragraph({
        children: [new TextRun('Hello World')],
      }),
    ],
  }],
})

HTML → PDF (via Puppeteer)

pnpm add puppeteer
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('http://localhost:3000/invoice/123')
await page.pdf({ path: 'invoice.pdf', format: 'A4' })

Reference

TODO

  • Pick preferred stack after first real use case
  • Add invoice template
  • Add report template
  • Integrate with tRPC for data fetching