Document creator

From oyi77/1ai-skills · View interactive version

Document creator is an AI agent skill from the GitHub repository oyi77/1ai-skills. Use when creating, editing, and generating Office documents programmatically — Word, PowerPoint, Excel, and PDF. One interface for all document formats with shared methodology.

How to use this skill

Skill file

Document Creator

Generate professional Office documents programmatically across all major formats. Each format has dedicated reference files with library-specific code, but the workflow is shared:

Overview

| Format | Library (Python) | Library (Node.js) | Reference |

|--------|-----------------|-------------------|-----------|

| Word (.docx) | python-docx | docx | reference/format/docx.md |

| PowerPoint (.pptx) | python-pptx | pptxgenjs | reference/format/pptx.md |

| Excel (.xlsx) | openpyxl / xlsxwriter | exceljs / xlsx | reference/format/xlsx.md |

| PDF (.pdf) | fpdf2 / reportlab | pdfkit / jspdf | reference/format/pdf.md |

Workflow

  1. Define structure — Plan document sections, sheets, slides, or pages
  2. Choose format — Select the right format for the audience (Word for contracts, PPTX for presentations, XLSX for data, PDF for distribution)
  3. Load data — From JSON, CSV, database, or API
  4. Generate — Use the format-specific reference for exact API calls
  5. Validate — Check output opens cleanly in the target application
  6. Deliver — Save or stream to client

When to Use

| Need | Format |

|------|--------|

| Contracts, proposals, reports | Word (.docx) |

| Meeting decks, pitches | PowerPoint (.pptx) |

| Financial models, data tables | Excel (.xlsx) |

| Distribution, printing, archiving | PDF |

| Bulk personalized documents | Word + mail merge |

| Charts with live data | Excel or PowerPoint |

| Invoice generation | PDF or Word |

Verification

Anti-Rationalization Table

| Excuse | Reality | Rule |

|--------|---------|------|

| "I'll just use one library for everything" | Each format has different semantics — one library can't do it all | Use the right library per format (python-docx, python-pptx, openpyxl, fpdf2) |

| "Manual document creation is fine" | Manual creation doesn't scale and introduces errors | Programmatic generation ensures consistency and version control |

| "PDF generation is too complex" | fpdf2 and reportlab handle complex layouts well | Invest in learning the library; it pays off on every document |

Provider Reference

Load format-specific reference files for exact API usage, code examples, and troubleshooting.

Verification Checklist

When NOT to Use

Quick Start

Install the per-format libraries:

pip install python-docx python-pptx openpyxl fpdf2

Or install the Python library you need inline: pip install python-docx

pip install python-docx python-pptx openpyxl fpdf2

Generate a Word document:

from docx import Document

doc = Document()
doc.add_heading("Proposal", 0)
doc.add_paragraph("Generated programmatically for consistency.")
doc.save("proposal.docx")

For each format, load the matching reference file before writing code:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.