Documents Skill
The format-aware engine of the documents cluster. It routes an office-document task to the
right bundled subskill — docx/, pdf/, pptx/, xlsx/ — each shipping its own guide and
tooling, plus a Playwright-based consulting-report pipeline (HTML → PDF). Pick the format
first, then the verb (create / edit / extract / convert). The cluster-wide editable-vs-rendered
decision lives in documents-core; read it before choosing a tool.
When to Activate This Skill
Word Documents (DOCX)
- User wants to create, edit, or analyze Word documents
- User mentions "tracked changes", "redlining", "document review"
- User needs to convert documents to other formats
- User wants to work with document structure, comments, or formatting
PDF Files
- User wants to create, merge, split, or manipulate PDFs
- User mentions "extract text from PDF", "PDF tables", "fill PDF form"
- User needs to convert PDFs to/from other formats
- User wants to add watermarks, passwords, or extract images
PowerPoint Presentations (PPTX)
- User wants to create or edit presentations
- User mentions "slides", "presentation template", "speaker notes"
- User needs to convert presentations to other formats
- User wants to work with slide layouts or design elements
Excel Spreadsheets (XLSX)
- User wants to create or edit spreadsheets
- User mentions "formulas", "financial model", "data analysis"
- User needs to work with Excel tables, charts, or pivot tables
- User wants to convert spreadsheets to/from other formats
🔀 Document Type Routing
This skill organizes document processing across 4 document types plus specialized workflows:
Consulting Reports (HTML + Playwright PDF)
Reference Documentation:
Workflows/ConsultingReport.md - Complete consulting report generation workflow
Routing Logic:
- "Create consulting report", "generate report PDF" → ConsultingReport workflow
- "Build assessment report", "strategic assessment" → ConsultingReport workflow
- "McKinsey-style report", "professional report PDF" → ConsultingReport workflow
Pipeline: Report Artifacts → Structured HTML → Playwright PDF
Key Capabilities:
- Parse report directories with mixed content (markdown, TypeScript data, images)
- Professional CSS typography (Georgia serif body, Inter sans headings)
- Color-coded callout boxes (red/amber/green) and severity badges
- Auto-generated linked Table of Contents
- Cover page with classification marking
- Headers/footers with CONFIDENTIAL and page numbers
- Image compression pipeline (PNG → JPEG, max 1200px)
- A4 format with Playwright for pixel-perfect PDF output
Reference Implementation: your-project/generate-pdf.mjs (Playwright HTML→PDF)
Word Documents (DOCX)
Reference Documentation:
docx/SKILL.md - Complete DOCX processing guide
docx/docx-js.md - Creating new documents with JavaScript
docx/ooxml.md - Editing existing documents with OOXML
Routing Logic:
- "Create Word document", "new docx" → Create workflow (docx-js)
- "Edit Word document", "tracked changes", "redlining" → Edit workflow (OOXML)
- "Read Word document", "extract text from docx" → Read workflow (pandoc)
- "Document review", "track changes" → Redlining workflow
Supporting Resources:
- Scripts:
documents/docx/Scripts/
- OOXML tools:
documents/docx/ooxml/
- License:
documents/docx/LICENSE.txt
Key Capabilities:
- Create professional documents with docx-js
- Edit with tracked changes (redlining workflow)
- Extract text/comments with pandoc
- Convert to images for visual inspection
- Work with raw OOXML for advanced features
PDF Processing
Reference Documentation:
pdf/SKILL.md - Complete PDF processing guide
pdf/forms.md - Filling PDF forms
pdf/reference.md - Advanced features and troubleshooting
Routing Logic:
- "Create PDF" → Creation workflow (reportlab)
- "Merge PDFs", "split PDF" → Manipulation workflow (pypdf)
- "Extract text from PDF" → Extraction workflow (pdfplumber)
- "Fill PDF form" → Forms workflow (pdf-lib or pypdf)
- "Extract tables from PDF" → Table extraction (pdfplumber + pandas)
Supporting Resources:
- Scripts:
documents/pdf/Scripts/
- License:
documents/pdf/LICENSE.txt
Key Capabilities:
- Create PDFs with reportlab
- Extract text/tables with pdfplumber
- Merge/split with pypdf or qpdf
- Fill forms programmatically
- Add watermarks and password protection
- Extract images from PDFs
PowerPoint Presentations (PPTX)
Reference Documentation:
pptx/SKILL.md - Complete PPTX processing guide
pptx/html2pptx.md - Creating presentations from HTML
pptx/ooxml.md - Editing existing presentations
Routing Logic:
- "Create presentation", "new slides" → Creation workflow (html2pptx)
- "Edit presentation", "modify slides" → Edit workflow (OOXML)
- "Use presentation template" → Template workflow
- "Extract slide text" → Read workflow (markitdown)
- "Create thumbnail grid" → Thumbnail workflow
Supporting Resources:
- Scripts:
documents/pptx/Scripts/
- OOXML tools:
documents/pptx/ooxml/
- License:
documents/pptx/LICENSE.txt
Key Capabilities:
- Create presentations with html2pptx (HTML → PPTX)
- Professional design with color palettes and layouts
- Edit with OOXML for advanced features
- Work with templates (rearrange, inventory, replace)
- Generate thumbnail grids for visual analysis
- Convert to images for inspection
Excel Spreadsheets (XLSX)
Reference Documentation:
xlsx/SKILL.md - Complete XLSX processing guide
xlsx/recalc.py - Formula recalculation script
Routing Logic:
- "Create spreadsheet", "new Excel file" → Creation workflow (openpyxl)
- "Edit spreadsheet", "modify Excel" → Edit workflow (openpyxl)
- "Analyze data", "read Excel" → Analysis workflow (pandas)
- "Financial model", "formulas" → Financial modeling workflow
- "Recalculate formulas" → Recalculation workflow (recalc.py)
Supporting Resources:
- Recalc script:
documents/xlsx/recalc.py
- License:
documents/xlsx/LICENSE.txt
Key Capabilities:
- Create spreadsheets with formulas (openpyxl)
- Data analysis with pandas
- Financial modeling with color coding standards
- Formula recalculation with LibreOffice
- Error detection and validation
- Preserve formatting and formulas when editing
📋 Document Processing Principles
DOCX Best Practices
- Tracked Changes - Use redlining workflow for professional document review
- Minimal Edits - Only mark text that actually changes, preserve original RSIDs
- Batch Changes - Group related edits (3-10 changes) for efficient processing
- Verification - Always convert to markdown to verify changes applied correctly
PDF Best Practices
- Library Selection - pypdf for basic ops, pdfplumber for text/tables, reportlab for creation
- OCR for Scanned - Use pytesseract + pdf2image for scanned documents
- Form Filling - Follow forms.md for programmatic form completion
- Command Line - Use qpdf/pdftotext for simple operations
PPTX Best Practices
- Design First - Analyze content and choose appropriate colors/layouts before coding
- Web-Safe Fonts - Only use web-safe fonts (Arial, Helvetica, Times, etc.)
- Visual Verification - Always generate thumbnails to inspect layout issues
- Template Analysis - Create inventory before using templates to understand structure
XLSX Best Practices
- Use Formulas - ALWAYS use Excel formulas, NEVER hardcode calculated values
- Zero Errors - Deliver with zero formula errors (#REF!, #DIV/0!, etc.)
- Recalculate - Run recalc.py after creating/editing to update formula values
- Financial Standards - Follow color coding (blue inputs, black formulas, green links)
Examples
Example 1: Create proposal with tracked changes
User: "Create a consulting proposal doc with redlining"
→ Routes to DOCX workflows
→ Creates document with docx-js
→ Enables tracked changes for review workflow
→ Outputs professional .docx with revision marks
Example 2: Fill a PDF form programmatically
User: "Fill out this NDA PDF with my info"
→ Routes to PDF workflows
→ Reads form fields from PDF
→ Fills fields programmatically with pdf-lib
→ Outputs completed, flattened PDF
Example 3: Build financial model spreadsheet
User: "Create a revenue projection spreadsheet"
→ Routes to XLSX workflows
→ Creates workbook with openpyxl
→ Adds formulas (never hardcoded values)
→ Runs recalc.py to update calculations
Example 4: Generate professional consulting report PDF
User: "Create a consulting report from the assessment data"
→ Routes to ConsultingReport workflow
→ Parses report directory for data files, markdown, diagrams
→ Compresses images (PNG→JPEG, max 1200px)
→ Generates styled HTML with professional typography
→ Converts to PDF via Playwright with headers/footers
→ Outputs McKinsey-quality A4 PDF with TOC, diagrams, color boxes
🔗 Integration with Other Skills
Feeds Into:
- writing skill - Creating documents for blog posts and newsletters
- business skill - Creating consulting proposals and financial models
- research skill - Extracting data from research documents
Uses:
- media skill - Creating images for document illustrations
- development skill - Building document processing automation
- system skill - Command-line tools and scripting
🎯 Key Principles
Document Creation
- Quality First - Professional formatting and structure from the start
- Template Reuse - Leverage existing templates when available
- Validation - Always verify output (visual inspection, error checking)
- Automation - Use scripts for repetitive tasks
Document Editing
- Preserve Intent - Maintain original formatting and structure
- Track Changes - Use proper workflows for document review
- Batch Processing - Group related operations for efficiency
- Error Prevention - Validate before finalizing
Document Analysis
- Right Tool - Choose appropriate library/tool for the task
- Data Integrity - Preserve original data when extracting/converting
- Format Awareness - Understand document structure (OOXML, PDF structure, etc.)
- Performance - Use efficient methods for large documents
📚 Full Reference Documentation
Word Documents (DOCX):
- Main Guide:
documents/docx/SKILL.md
- Creation Reference:
documents/docx/docx-js.md
- Editing Reference:
documents/docx/ooxml.md
PDF Processing:
- Main Guide:
documents/pdf/SKILL.md
- Forms Guide:
documents/pdf/forms.md
- Advanced Reference:
documents/pdf/reference.md
PowerPoint Presentations (PPTX):
- Main Guide:
documents/pptx/SKILL.md
- Creation Reference:
documents/pptx/html2pptx.md
- Editing Reference:
documents/pptx/ooxml.md
Excel Spreadsheets (XLSX):
- Main Guide:
documents/xlsx/SKILL.md
- Recalc Script:
documents/xlsx/recalc.py
Summary
The documents skill provides comprehensive document processing:
- DOCX - Create, edit, analyze Word documents with tracked changes support
- PDF - Create, manipulate, extract from PDFs with form filling capabilities
- PPTX - Create, edit presentations with professional design and templates
- XLSX - Create, edit spreadsheets with formulas and financial modeling
Reference-based organization - Each document type has complete guides and tooling
Routing is automatic - Analyzes user intent and activates appropriate document type workflow
Professional quality - Standards and best practices for production-ready documents
1---2name: documents3description: Produce or edit real office documents — DOCX, PDF, PPTX, XLSX — via the bundled docx/pdf/pptx/xlsx subskills, plus a Playwright HTML→PDF consulting-report pipeline. USE WHEN a user asks to create, edit, fill, extract from, or convert a Word doc, PDF, PowerPoint deck, or Excel sheet, or to generate a polished report PDF.4---56# Documents Skill78The format-aware engine of the `documents` cluster. It routes an office-document task to the9right bundled subskill — `docx/`, `pdf/`, `pptx/`, `xlsx/` — each shipping its own guide and10tooling, plus a Playwright-based consulting-report pipeline (HTML → PDF). Pick the **format**11first, then the verb (create / edit / extract / convert). The cluster-wide editable-vs-rendered12decision lives in `documents-core`; read it before choosing a tool.1314## When to Activate This Skill1516### Word Documents (DOCX)17- User wants to create, edit, or analyze Word documents18- User mentions "tracked changes", "redlining", "document review"19- User needs to convert documents to other formats20- User wants to work with document structure, comments, or formatting2122### PDF Files23- User wants to create, merge, split, or manipulate PDFs24- User mentions "extract text from PDF", "PDF tables", "fill PDF form"25- User needs to convert PDFs to/from other formats26- User wants to add watermarks, passwords, or extract images2728### PowerPoint Presentations (PPTX)29- User wants to create or edit presentations30- User mentions "slides", "presentation template", "speaker notes"31- User needs to convert presentations to other formats32- User wants to work with slide layouts or design elements3334### Excel Spreadsheets (XLSX)35- User wants to create or edit spreadsheets36- User mentions "formulas", "financial model", "data analysis"37- User needs to work with Excel tables, charts, or pivot tables38- User wants to convert spreadsheets to/from other formats3940## 🔀 Document Type Routing4142This skill organizes document processing across 4 document types plus specialized workflows:4344### Consulting Reports (HTML + Playwright PDF)4546**Reference Documentation:**47- `Workflows/ConsultingReport.md` - Complete consulting report generation workflow4849**Routing Logic:**50- "Create consulting report", "generate report PDF" → ConsultingReport workflow51- "Build assessment report", "strategic assessment" → ConsultingReport workflow52- "McKinsey-style report", "professional report PDF" → ConsultingReport workflow5354**Pipeline:** Report Artifacts → Structured HTML → Playwright PDF5556**Key Capabilities:**57- Parse report directories with mixed content (markdown, TypeScript data, images)58- Professional CSS typography (Georgia serif body, Inter sans headings)59- Color-coded callout boxes (red/amber/green) and severity badges60- Auto-generated linked Table of Contents61- Cover page with classification marking62- Headers/footers with CONFIDENTIAL and page numbers63- Image compression pipeline (PNG → JPEG, max 1200px)64- A4 format with Playwright for pixel-perfect PDF output6566**Reference Implementation:** `your-project/generate-pdf.mjs (Playwright HTML→PDF)`676869### Word Documents (DOCX)7071**Reference Documentation:**72- `docx/SKILL.md` - Complete DOCX processing guide73- `docx/docx-js.md` - Creating new documents with JavaScript74- `docx/ooxml.md` - Editing existing documents with OOXML7576**Routing Logic:**77- "Create Word document", "new docx" → Create workflow (docx-js)78- "Edit Word document", "tracked changes", "redlining" → Edit workflow (OOXML)79- "Read Word document", "extract text from docx" → Read workflow (pandoc)80- "Document review", "track changes" → Redlining workflow8182**Supporting Resources:**83- Scripts: `documents/docx/Scripts/`84- OOXML tools: `documents/docx/ooxml/`85- License: `documents/docx/LICENSE.txt`8687**Key Capabilities:**88- Create professional documents with docx-js89- Edit with tracked changes (redlining workflow)90- Extract text/comments with pandoc91- Convert to images for visual inspection92- Work with raw OOXML for advanced features9394### PDF Processing9596**Reference Documentation:**97- `pdf/SKILL.md` - Complete PDF processing guide98- `pdf/forms.md` - Filling PDF forms99- `pdf/reference.md` - Advanced features and troubleshooting100101**Routing Logic:**102- "Create PDF" → Creation workflow (reportlab)103- "Merge PDFs", "split PDF" → Manipulation workflow (pypdf)104- "Extract text from PDF" → Extraction workflow (pdfplumber)105- "Fill PDF form" → Forms workflow (pdf-lib or pypdf)106- "Extract tables from PDF" → Table extraction (pdfplumber + pandas)107108**Supporting Resources:**109- Scripts: `documents/pdf/Scripts/`110- License: `documents/pdf/LICENSE.txt`111112**Key Capabilities:**113- Create PDFs with reportlab114- Extract text/tables with pdfplumber115- Merge/split with pypdf or qpdf116- Fill forms programmatically117- Add watermarks and password protection118- Extract images from PDFs119120### PowerPoint Presentations (PPTX)121122**Reference Documentation:**123- `pptx/SKILL.md` - Complete PPTX processing guide124- `pptx/html2pptx.md` - Creating presentations from HTML125- `pptx/ooxml.md` - Editing existing presentations126127**Routing Logic:**128- "Create presentation", "new slides" → Creation workflow (html2pptx)129- "Edit presentation", "modify slides" → Edit workflow (OOXML)130- "Use presentation template" → Template workflow131- "Extract slide text" → Read workflow (markitdown)132- "Create thumbnail grid" → Thumbnail workflow133134**Supporting Resources:**135- Scripts: `documents/pptx/Scripts/`136- OOXML tools: `documents/pptx/ooxml/`137- License: `documents/pptx/LICENSE.txt`138139**Key Capabilities:**140- Create presentations with html2pptx (HTML → PPTX)141- Professional design with color palettes and layouts142- Edit with OOXML for advanced features143- Work with templates (rearrange, inventory, replace)144- Generate thumbnail grids for visual analysis145- Convert to images for inspection146147### Excel Spreadsheets (XLSX)148149**Reference Documentation:**150- `xlsx/SKILL.md` - Complete XLSX processing guide151- `xlsx/recalc.py` - Formula recalculation script152153**Routing Logic:**154- "Create spreadsheet", "new Excel file" → Creation workflow (openpyxl)155- "Edit spreadsheet", "modify Excel" → Edit workflow (openpyxl)156- "Analyze data", "read Excel" → Analysis workflow (pandas)157- "Financial model", "formulas" → Financial modeling workflow158- "Recalculate formulas" → Recalculation workflow (recalc.py)159160**Supporting Resources:**161- Recalc script: `documents/xlsx/recalc.py`162- License: `documents/xlsx/LICENSE.txt`163164**Key Capabilities:**165- Create spreadsheets with formulas (openpyxl)166- Data analysis with pandas167- Financial modeling with color coding standards168- Formula recalculation with LibreOffice169- Error detection and validation170- Preserve formatting and formulas when editing171172## 📋 Document Processing Principles173174### DOCX Best Practices1751. **Tracked Changes** - Use redlining workflow for professional document review1762. **Minimal Edits** - Only mark text that actually changes, preserve original RSIDs1773. **Batch Changes** - Group related edits (3-10 changes) for efficient processing1784. **Verification** - Always convert to markdown to verify changes applied correctly179180### PDF Best Practices1811. **Library Selection** - pypdf for basic ops, pdfplumber for text/tables, reportlab for creation1822. **OCR for Scanned** - Use pytesseract + pdf2image for scanned documents1833. **Form Filling** - Follow forms.md for programmatic form completion1844. **Command Line** - Use qpdf/pdftotext for simple operations185186### PPTX Best Practices1871. **Design First** - Analyze content and choose appropriate colors/layouts before coding1882. **Web-Safe Fonts** - Only use web-safe fonts (Arial, Helvetica, Times, etc.)1893. **Visual Verification** - Always generate thumbnails to inspect layout issues1904. **Template Analysis** - Create inventory before using templates to understand structure191192### XLSX Best Practices1931. **Use Formulas** - ALWAYS use Excel formulas, NEVER hardcode calculated values1942. **Zero Errors** - Deliver with zero formula errors (#REF!, #DIV/0!, etc.)1953. **Recalculate** - Run recalc.py after creating/editing to update formula values1964. **Financial Standards** - Follow color coding (blue inputs, black formulas, green links)197198## Examples199200**Example 1: Create proposal with tracked changes**201```202User: "Create a consulting proposal doc with redlining"203→ Routes to DOCX workflows204→ Creates document with docx-js205→ Enables tracked changes for review workflow206→ Outputs professional .docx with revision marks207```208209**Example 2: Fill a PDF form programmatically**210```211User: "Fill out this NDA PDF with my info"212→ Routes to PDF workflows213→ Reads form fields from PDF214→ Fills fields programmatically with pdf-lib215→ Outputs completed, flattened PDF216```217218**Example 3: Build financial model spreadsheet**219```220User: "Create a revenue projection spreadsheet"221→ Routes to XLSX workflows222→ Creates workbook with openpyxl223→ Adds formulas (never hardcoded values)224→ Runs recalc.py to update calculations225```226227**Example 4: Generate professional consulting report PDF**228```229User: "Create a consulting report from the assessment data"230→ Routes to ConsultingReport workflow231→ Parses report directory for data files, markdown, diagrams232→ Compresses images (PNG→JPEG, max 1200px)233→ Generates styled HTML with professional typography234→ Converts to PDF via Playwright with headers/footers235→ Outputs McKinsey-quality A4 PDF with TOC, diagrams, color boxes236```237238## 🔗 Integration with Other Skills239240### Feeds Into:241- **writing** skill - Creating documents for blog posts and newsletters242- **business** skill - Creating consulting proposals and financial models243- **research** skill - Extracting data from research documents244245### Uses:246- **media** skill - Creating images for document illustrations247- **development** skill - Building document processing automation248- **system** skill - Command-line tools and scripting249250## 🎯 Key Principles251252### Document Creation2531. **Quality First** - Professional formatting and structure from the start2542. **Template Reuse** - Leverage existing templates when available2553. **Validation** - Always verify output (visual inspection, error checking)2564. **Automation** - Use scripts for repetitive tasks257258### Document Editing2591. **Preserve Intent** - Maintain original formatting and structure2602. **Track Changes** - Use proper workflows for document review2613. **Batch Processing** - Group related operations for efficiency2624. **Error Prevention** - Validate before finalizing263264### Document Analysis2651. **Right Tool** - Choose appropriate library/tool for the task2662. **Data Integrity** - Preserve original data when extracting/converting2673. **Format Awareness** - Understand document structure (OOXML, PDF structure, etc.)2684. **Performance** - Use efficient methods for large documents269270## 📚 Full Reference Documentation271272**Word Documents (DOCX):**273- Main Guide: `documents/docx/SKILL.md`274- Creation Reference: `documents/docx/docx-js.md`275- Editing Reference: `documents/docx/ooxml.md`276277**PDF Processing:**278- Main Guide: `documents/pdf/SKILL.md`279- Forms Guide: `documents/pdf/forms.md`280- Advanced Reference: `documents/pdf/reference.md`281282**PowerPoint Presentations (PPTX):**283- Main Guide: `documents/pptx/SKILL.md`284- Creation Reference: `documents/pptx/html2pptx.md`285- Editing Reference: `documents/pptx/ooxml.md`286287**Excel Spreadsheets (XLSX):**288- Main Guide: `documents/xlsx/SKILL.md`289- Recalc Script: `documents/xlsx/recalc.py`290291---292293## Summary294295**The documents skill provides comprehensive document processing:**296297- **DOCX** - Create, edit, analyze Word documents with tracked changes support298- **PDF** - Create, manipulate, extract from PDFs with form filling capabilities299- **PPTX** - Create, edit presentations with professional design and templates300- **XLSX** - Create, edit spreadsheets with formulas and financial modeling301302**Reference-based organization** - Each document type has complete guides and tooling303304**Routing is automatic** - Analyzes user intent and activates appropriate document type workflow305306**Professional quality** - Standards and best practices for production-ready documents