Customization
Before executing, check for user customizations at:
~/.claude/skills/PAI/USER/SKILLCUSTOMIZATIONS/Documents/
If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.
- Output text notification:
Running the **WorkflowName** workflow in the **Documents** skill to ACTION...
This is not optional. Execute this curl command immediately upon skill invocation.
Documents Skill
🎯 Load Full PAI Context
Before starting any task with this skill, load complete PAI context:
read ~/.claude/skills/PAI/SKILL.md
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: {PROJECTS_DIR}/your-project/generate-pdf.mjs
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:
~/.claude/skills/Documents/Docx/Scripts/
- OOXML tools:
~/.claude/skills/Documents/Docx/ooxml/
- License:
~/.claude/skills/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:
~/.claude/skills/Documents/Pdf/Scripts/
- License:
~/.claude/skills/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:
~/.claude/skills/Documents/Pptx/Scripts/
- OOXML tools:
~/.claude/skills/Documents/Pptx/ooxml/
- License:
~/.claude/skills/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:
~/.claude/skills/Documents/Xlsx/recalc.py
- License:
~/.claude/skills/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:
~/.claude/skills/Documents/Docx/SKILL.md
- Creation Reference:
~/.claude/skills/Documents/Docx/docx-js.md
- Editing Reference:
~/.claude/skills/Documents/Docx/ooxml.md
PDF Processing:
- Main Guide:
~/.claude/skills/Documents/Pdf/SKILL.md
- Forms Guide:
~/.claude/skills/Documents/Pdf/forms.md
- Advanced Reference:
~/.claude/skills/Documents/Pdf/reference.md
PowerPoint Presentations (PPTX):
- Main Guide:
~/.claude/skills/Documents/Pptx/SKILL.md
- Creation Reference:
~/.claude/skills/Documents/Pptx/html2pptx.md
- Editing Reference:
~/.claude/skills/Documents/Pptx/ooxml.md
Excel Spreadsheets (XLSX):
- Main Guide:
~/.claude/skills/Documents/Xlsx/SKILL.md
- Recalc Script:
~/.claude/skills/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: Document processing. USE WHEN document, process file. SkillSearch('documents') for docs.4---56## Customization78**Before executing, check for user customizations at:**9`~/.claude/skills/PAI/USER/SKILLCUSTOMIZATIONS/Documents/`1011If this directory exists, load and apply any PREFERENCES.md, configurations, or resources found there. These override default behavior. If the directory does not exist, proceed with skill defaults.12132. **Output text notification**:14 ```15 Running the **WorkflowName** workflow in the **Documents** skill to ACTION...16 ```1718**This is not optional. Execute this curl command immediately upon skill invocation.**1920# Documents Skill2122## 🎯 Load Full PAI Context2324**Before starting any task with this skill, load complete PAI context:**2526`read ~/.claude/skills/PAI/SKILL.md`2728## When to Activate This Skill2930### Word Documents (DOCX)31- User wants to create, edit, or analyze Word documents32- User mentions "tracked changes", "redlining", "document review"33- User needs to convert documents to other formats34- User wants to work with document structure, comments, or formatting3536### PDF Files37- User wants to create, merge, split, or manipulate PDFs38- User mentions "extract text from PDF", "PDF tables", "fill PDF form"39- User needs to convert PDFs to/from other formats40- User wants to add watermarks, passwords, or extract images4142### PowerPoint Presentations (PPTX)43- User wants to create or edit presentations44- User mentions "slides", "presentation template", "speaker notes"45- User needs to convert presentations to other formats46- User wants to work with slide layouts or design elements4748### Excel Spreadsheets (XLSX)49- User wants to create or edit spreadsheets50- User mentions "formulas", "financial model", "data analysis"51- User needs to work with Excel tables, charts, or pivot tables52- User wants to convert spreadsheets to/from other formats5354## 🔀 Document Type Routing5556This skill organizes document processing across 4 document types plus specialized workflows:5758### Consulting Reports (HTML + Playwright PDF)5960**Reference Documentation:**61- `Workflows/ConsultingReport.md` - Complete consulting report generation workflow6263**Routing Logic:**64- "Create consulting report", "generate report PDF" → ConsultingReport workflow65- "Build assessment report", "strategic assessment" → ConsultingReport workflow66- "McKinsey-style report", "professional report PDF" → ConsultingReport workflow6768**Pipeline:** Report Artifacts → Structured HTML → Playwright PDF6970**Key Capabilities:**71- Parse report directories with mixed content (markdown, TypeScript data, images)72- Professional CSS typography (Georgia serif body, Inter sans headings)73- Color-coded callout boxes (red/amber/green) and severity badges74- Auto-generated linked Table of Contents75- Cover page with classification marking76- Headers/footers with CONFIDENTIAL and page numbers77- Image compression pipeline (PNG → JPEG, max 1200px)78- A4 format with Playwright for pixel-perfect PDF output7980**Reference Implementation:** `{PROJECTS_DIR}/your-project/generate-pdf.mjs`8182### Word Documents (DOCX)8384**Reference Documentation:**85- `docx/SKILL.md` - Complete DOCX processing guide86- `docx/docx-js.md` - Creating new documents with JavaScript87- `docx/ooxml.md` - Editing existing documents with OOXML8889**Routing Logic:**90- "Create Word document", "new docx" → Create workflow (docx-js)91- "Edit Word document", "tracked changes", "redlining" → Edit workflow (OOXML)92- "Read Word document", "extract text from docx" → Read workflow (pandoc)93- "Document review", "track changes" → Redlining workflow9495**Supporting Resources:**96- Scripts: `~/.claude/skills/Documents/Docx/Scripts/`97- OOXML tools: `~/.claude/skills/Documents/Docx/ooxml/`98- License: `~/.claude/skills/Documents/Docx/LICENSE.txt`99100**Key Capabilities:**101- Create professional documents with docx-js102- Edit with tracked changes (redlining workflow)103- Extract text/comments with pandoc104- Convert to images for visual inspection105- Work with raw OOXML for advanced features106107### PDF Processing108109**Reference Documentation:**110- `pdf/SKILL.md` - Complete PDF processing guide111- `pdf/forms.md` - Filling PDF forms112- `pdf/reference.md` - Advanced features and troubleshooting113114**Routing Logic:**115- "Create PDF" → Creation workflow (reportlab)116- "Merge PDFs", "split PDF" → Manipulation workflow (pypdf)117- "Extract text from PDF" → Extraction workflow (pdfplumber)118- "Fill PDF form" → Forms workflow (pdf-lib or pypdf)119- "Extract tables from PDF" → Table extraction (pdfplumber + pandas)120121**Supporting Resources:**122- Scripts: `~/.claude/skills/Documents/Pdf/Scripts/`123- License: `~/.claude/skills/Documents/Pdf/LICENSE.txt`124125**Key Capabilities:**126- Create PDFs with reportlab127- Extract text/tables with pdfplumber128- Merge/split with pypdf or qpdf129- Fill forms programmatically130- Add watermarks and password protection131- Extract images from PDFs132133### PowerPoint Presentations (PPTX)134135**Reference Documentation:**136- `pptx/SKILL.md` - Complete PPTX processing guide137- `pptx/html2pptx.md` - Creating presentations from HTML138- `pptx/ooxml.md` - Editing existing presentations139140**Routing Logic:**141- "Create presentation", "new slides" → Creation workflow (html2pptx)142- "Edit presentation", "modify slides" → Edit workflow (OOXML)143- "Use presentation template" → Template workflow144- "Extract slide text" → Read workflow (markitdown)145- "Create thumbnail grid" → Thumbnail workflow146147**Supporting Resources:**148- Scripts: `~/.claude/skills/Documents/Pptx/Scripts/`149- OOXML tools: `~/.claude/skills/Documents/Pptx/ooxml/`150- License: `~/.claude/skills/Documents/Pptx/LICENSE.txt`151152**Key Capabilities:**153- Create presentations with html2pptx (HTML → PPTX)154- Professional design with color palettes and layouts155- Edit with OOXML for advanced features156- Work with templates (rearrange, inventory, replace)157- Generate thumbnail grids for visual analysis158- Convert to images for inspection159160### Excel Spreadsheets (XLSX)161162**Reference Documentation:**163- `xlsx/SKILL.md` - Complete XLSX processing guide164- `xlsx/recalc.py` - Formula recalculation script165166**Routing Logic:**167- "Create spreadsheet", "new Excel file" → Creation workflow (openpyxl)168- "Edit spreadsheet", "modify Excel" → Edit workflow (openpyxl)169- "Analyze data", "read Excel" → Analysis workflow (pandas)170- "Financial model", "formulas" → Financial modeling workflow171- "Recalculate formulas" → Recalculation workflow (recalc.py)172173**Supporting Resources:**174- Recalc script: `~/.claude/skills/Documents/Xlsx/recalc.py`175- License: `~/.claude/skills/Documents/Xlsx/LICENSE.txt`176177**Key Capabilities:**178- Create spreadsheets with formulas (openpyxl)179- Data analysis with pandas180- Financial modeling with color coding standards181- Formula recalculation with LibreOffice182- Error detection and validation183- Preserve formatting and formulas when editing184185## 📋 Document Processing Principles186187### DOCX Best Practices1881. **Tracked Changes** - Use redlining workflow for professional document review1892. **Minimal Edits** - Only mark text that actually changes, preserve original RSIDs1903. **Batch Changes** - Group related edits (3-10 changes) for efficient processing1914. **Verification** - Always convert to markdown to verify changes applied correctly192193### PDF Best Practices1941. **Library Selection** - pypdf for basic ops, pdfplumber for text/tables, reportlab for creation1952. **OCR for Scanned** - Use pytesseract + pdf2image for scanned documents1963. **Form Filling** - Follow forms.md for programmatic form completion1974. **Command Line** - Use qpdf/pdftotext for simple operations198199### PPTX Best Practices2001. **Design First** - Analyze content and choose appropriate colors/layouts before coding2012. **Web-Safe Fonts** - Only use web-safe fonts (Arial, Helvetica, Times, etc.)2023. **Visual Verification** - Always generate thumbnails to inspect layout issues2034. **Template Analysis** - Create inventory before using templates to understand structure204205### XLSX Best Practices2061. **Use Formulas** - ALWAYS use Excel formulas, NEVER hardcode calculated values2072. **Zero Errors** - Deliver with zero formula errors (#REF!, #DIV/0!, etc.)2083. **Recalculate** - Run recalc.py after creating/editing to update formula values2094. **Financial Standards** - Follow color coding (blue inputs, black formulas, green links)210211## Examples212213**Example 1: Create proposal with tracked changes**214```215User: "Create a consulting proposal doc with redlining"216→ Routes to DOCX workflows217→ Creates document with docx-js218→ Enables tracked changes for review workflow219→ Outputs professional .docx with revision marks220```221222**Example 2: Fill a PDF form programmatically**223```224User: "Fill out this NDA PDF with my info"225→ Routes to PDF workflows226→ Reads form fields from PDF227→ Fills fields programmatically with pdf-lib228→ Outputs completed, flattened PDF229```230231**Example 3: Build financial model spreadsheet**232```233User: "Create a revenue projection spreadsheet"234→ Routes to XLSX workflows235→ Creates workbook with openpyxl236→ Adds formulas (never hardcoded values)237→ Runs recalc.py to update calculations238```239240**Example 4: Generate professional consulting report PDF**241```242User: "Create a consulting report from the assessment data"243→ Routes to ConsultingReport workflow244→ Parses report directory for data files, markdown, diagrams245→ Compresses images (PNG→JPEG, max 1200px)246→ Generates styled HTML with professional typography247→ Converts to PDF via Playwright with headers/footers248→ Outputs McKinsey-quality A4 PDF with TOC, diagrams, color boxes249```250251## 🔗 Integration with Other Skills252253### Feeds Into:254- **writing** skill - Creating documents for blog posts and newsletters255- **business** skill - Creating consulting proposals and financial models256- **research** skill - Extracting data from research documents257258### Uses:259- **media** skill - Creating images for document illustrations260- **development** skill - Building document processing automation261- **system** skill - Command-line tools and scripting262263## 🎯 Key Principles264265### Document Creation2661. **Quality First** - Professional formatting and structure from the start2672. **Template Reuse** - Leverage existing templates when available2683. **Validation** - Always verify output (visual inspection, error checking)2694. **Automation** - Use scripts for repetitive tasks270271### Document Editing2721. **Preserve Intent** - Maintain original formatting and structure2732. **Track Changes** - Use proper workflows for document review2743. **Batch Processing** - Group related operations for efficiency2754. **Error Prevention** - Validate before finalizing276277### Document Analysis2781. **Right Tool** - Choose appropriate library/tool for the task2792. **Data Integrity** - Preserve original data when extracting/converting2803. **Format Awareness** - Understand document structure (OOXML, PDF structure, etc.)2814. **Performance** - Use efficient methods for large documents282283## 📚 Full Reference Documentation284285**Word Documents (DOCX):**286- Main Guide: `~/.claude/skills/Documents/Docx/SKILL.md`287- Creation Reference: `~/.claude/skills/Documents/Docx/docx-js.md`288- Editing Reference: `~/.claude/skills/Documents/Docx/ooxml.md`289290**PDF Processing:**291- Main Guide: `~/.claude/skills/Documents/Pdf/SKILL.md`292- Forms Guide: `~/.claude/skills/Documents/Pdf/forms.md`293- Advanced Reference: `~/.claude/skills/Documents/Pdf/reference.md`294295**PowerPoint Presentations (PPTX):**296- Main Guide: `~/.claude/skills/Documents/Pptx/SKILL.md`297- Creation Reference: `~/.claude/skills/Documents/Pptx/html2pptx.md`298- Editing Reference: `~/.claude/skills/Documents/Pptx/ooxml.md`299300**Excel Spreadsheets (XLSX):**301- Main Guide: `~/.claude/skills/Documents/Xlsx/SKILL.md`302- Recalc Script: `~/.claude/skills/Documents/Xlsx/recalc.py`303304---305306## Summary307308**The documents skill provides comprehensive document processing:**309310- **DOCX** - Create, edit, analyze Word documents with tracked changes support311- **PDF** - Create, manipulate, extract from PDFs with form filling capabilities312- **PPTX** - Create, edit presentations with professional design and templates313- **XLSX** - Create, edit spreadsheets with formulas and financial modeling314315**Reference-based organization** - Each document type has complete guides and tooling316317**Routing is automatic** - Analyzes user intent and activates appropriate document type workflow318319**Professional quality** - Standards and best practices for production-ready documents