Installs into .claude/skills of the current project.
Are you the author of Document Creator?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/oyi77-document-creator)
---
name: document-creator
description: Use when creating, editing, and generating Office documents programmatically
— Word, PowerPoint, Excel, and PDF. One interface for all document formats with
shared methodology.
domain: content
author: oyi77
license: Apache-2.0
subdomain: content-creation
tags:
- documents
- office
- docx
- pptx
- xlsx
- pdf
- automation
- reports
version: 2.0.0
category: content
---
# 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](./reference/format/docx.md) |
| **PowerPoint** (.pptx) | python-pptx | pptxgenjs | [reference/format/pptx.md](./reference/format/pptx.md) |
| **Excel** (.xlsx) | openpyxl / xlsxwriter | exceljs / xlsx | [reference/format/xlsx.md](./reference/format/xlsx.md) |
| **PDF** (.pdf) | fpdf2 / reportlab | pdfkit / jspdf | [reference/format/pdf.md](./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
- Generate one document per supported format (e.g. a DOCX report, PPTX deck, PDF export) and confirm each opens and renders correctly.
- Verify content fidelity: headings, tables, and images in the generated file match the input data.
- Test a template with missing fields and confirm the tool errors clearly or fills documented defaults.
- Confirm batch generation produces files with unique, expected names and no partial writes on failure.
## 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
- [ ] Output opens correctly in target application (Word, PowerPoint, Excel, PDF viewer)
- [ ] All data populated correctly without truncation
- [ ] Formatting matches specifications (fonts, colors, layout)
- [ ] File size is reasonable for distribution
- [ ] Cross-platform compatibility verified
## When NOT to Use
- One-off manual document tweaks — a quick edit in the target app beats a script
- Highly designed print collateral (branded brochures, complex layouts) — route to design/banner-design
- Data-heavy dashboards or live reports — route to analytics or a web view
- When the recipient needs an editable, collaboratively-authored file — generate the initial structure, then hand off to the human workflow
- Image-first documents (scanned PDFs, photography books) — not a document-generation task
## Quick Start
Install the per-format libraries:
```bash
pip install python-docx python-pptx openpyxl fpdf2
```
Or install the Python library you need inline: `pip install python-docx`
```bash
pip install python-docx python-pptx openpyxl fpdf2
```
Generate a Word document:
```python
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:
- Word → `reference/format/docx.md` (python-docx / docx)
- PowerPoint → `reference/format/pptx.md` (python-pptx / pptxgenjs)
- Excel → `reference/format/xlsx.md` (openpyxl / exceljs)
- PDF → `reference/format/pdf.md` (fpdf2 / pdfkit)