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.
🚨 MANDATORY: Voice Notification (REQUIRED BEFORE ANY ACTION)
You MUST send this notification BEFORE doing anything else when this skill is invoked.
Send voice notification:
curl -s -X POST http://localhost:8888/notify \
-H "Content-Type: application/json" \
-d '{"message": "Running the WORKFLOWNAME workflow in the Documents skill to ACTION"}' \
> /dev/null 2>&1 &
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 CORE Context
Before starting any task with this skill, load complete CORE 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:
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
🔗 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---5
6## Customization
7
8**Before executing, check for user customizations at:**
9`~/.claude/skills/PAI/USER/SKILLCUSTOMIZATIONS/Documents/`
10
11If 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.
12
13
14## 🚨 MANDATORY: Voice Notification (REQUIRED BEFORE ANY ACTION)
15
16**You MUST send this notification BEFORE doing anything else when this skill is invoked.**
17
181. **Send voice notification**:
19 ```bash
20 curl -s -X POST http://localhost:8888/notify \
21 -H "Content-Type: application/json" \
22 -d '{"message": "Running the WORKFLOWNAME workflow in the Documents skill to ACTION"}' \
23 > /dev/null 2>&1 &
24 ```
25
262. **Output text notification**:
27 ```
28 Running the **WorkflowName** workflow in the **Documents** skill to ACTION...
29 ```
30
31**This is not optional. Execute this curl command immediately upon skill invocation.**
32
33# Documents Skill
34
35## 🎯 Load Full CORE Context
36
37**Before starting any task with this skill, load complete CORE context:**
38
39`read ~/.claude/skills/PAI/SKILL.md`
40
41
42## When to Activate This Skill
43
44### Word Documents (DOCX)
45- User wants to create, edit, or analyze Word documents
46- User mentions "tracked changes", "redlining", "document review"
47- User needs to convert documents to other formats
48- User wants to work with document structure, comments, or formatting
49
50### PDF Files
51- User wants to create, merge, split, or manipulate PDFs
52- User mentions "extract text from PDF", "PDF tables", "fill PDF form"
53- User needs to convert PDFs to/from other formats
54- User wants to add watermarks, passwords, or extract images
55
56### PowerPoint Presentations (PPTX)
57- User wants to create or edit presentations
58- User mentions "slides", "presentation template", "speaker notes"
59- User needs to convert presentations to other formats
60- User wants to work with slide layouts or design elements
61
62### Excel Spreadsheets (XLSX)
63- User wants to create or edit spreadsheets
64- User mentions "formulas", "financial model", "data analysis"
65- User needs to work with Excel tables, charts, or pivot tables
66- User wants to convert spreadsheets to/from other formats
67
68## 🔀 Document Type Routing
69
70This skill organizes document processing across 4 document types:
71
72### Word Documents (DOCX)
73
74**Reference Documentation:**
75- `docx/SKILL.md` - Complete DOCX processing guide
76- `docx/docx-js.md` - Creating new documents with JavaScript
77- `docx/ooxml.md` - Editing existing documents with OOXML
78
79**Routing Logic:**
80- "Create Word document", "new docx" → Create workflow (docx-js)
81- "Edit Word document", "tracked changes", "redlining" → Edit workflow (OOXML)
82- "Read Word document", "extract text from docx" → Read workflow (pandoc)
83- "Document review", "track changes" → Redlining workflow
84
85**Supporting Resources:**
86- Scripts: `~/.claude/skills/documents/docx/Scripts/`
87- OOXML tools: `~/.claude/skills/documents/docx/ooxml/`
88- License: `~/.claude/skills/documents/docx/LICENSE.txt`
89
90**Key Capabilities:**
91- Create professional documents with docx-js
92- Edit with tracked changes (redlining workflow)
93- Extract text/comments with pandoc
94- Convert to images for visual inspection
95- Work with raw OOXML for advanced features
96
97### PDF Processing
98
99**Reference Documentation:**
100- `pdf/SKILL.md` - Complete PDF processing guide
101- `pdf/forms.md` - Filling PDF forms
102- `pdf/reference.md` - Advanced features and troubleshooting
103
104**Routing Logic:**
105- "Create PDF" → Creation workflow (reportlab)
106- "Merge PDFs", "split PDF" → Manipulation workflow (pypdf)
107- "Extract text from PDF" → Extraction workflow (pdfplumber)
108- "Fill PDF form" → Forms workflow (pdf-lib or pypdf)
109- "Extract tables from PDF" → Table extraction (pdfplumber + pandas)
110
111**Supporting Resources:**
112- Scripts: `~/.claude/skills/documents/pdf/Scripts/`
113- License: `~/.claude/skills/documents/pdf/LICENSE.txt`
114
115**Key Capabilities:**
116- Create PDFs with reportlab
117- Extract text/tables with pdfplumber
118- Merge/split with pypdf or qpdf
119- Fill forms programmatically
120- Add watermarks and password protection
121- Extract images from PDFs
122
123### PowerPoint Presentations (PPTX)
124
125**Reference Documentation:**
126- `pptx/SKILL.md` - Complete PPTX processing guide
127- `pptx/html2pptx.md` - Creating presentations from HTML
128- `pptx/ooxml.md` - Editing existing presentations
129
130**Routing Logic:**
131- "Create presentation", "new slides" → Creation workflow (html2pptx)
132- "Edit presentation", "modify slides" → Edit workflow (OOXML)
133- "Use presentation template" → Template workflow
134- "Extract slide text" → Read workflow (markitdown)
135- "Create thumbnail grid" → Thumbnail workflow
136
137**Supporting Resources:**
138- Scripts: `~/.claude/skills/documents/pptx/Scripts/`
139- OOXML tools: `~/.claude/skills/documents/pptx/ooxml/`
140- License: `~/.claude/skills/documents/pptx/LICENSE.txt`
141
142**Key Capabilities:**
143- Create presentations with html2pptx (HTML → PPTX)
144- Professional design with color palettes and layouts
145- Edit with OOXML for advanced features
146- Work with templates (rearrange, inventory, replace)
147- Generate thumbnail grids for visual analysis
148- Convert to images for inspection
149
150### Excel Spreadsheets (XLSX)
151
152**Reference Documentation:**
153- `xlsx/SKILL.md` - Complete XLSX processing guide
154- `xlsx/recalc.py` - Formula recalculation script
155
156**Routing Logic:**
157- "Create spreadsheet", "new Excel file" → Creation workflow (openpyxl)
158- "Edit spreadsheet", "modify Excel" → Edit workflow (openpyxl)
159- "Analyze data", "read Excel" → Analysis workflow (pandas)
160- "Financial model", "formulas" → Financial modeling workflow
161- "Recalculate formulas" → Recalculation workflow (recalc.py)
162
163**Supporting Resources:**
164- Recalc script: `~/.claude/skills/documents/xlsx/recalc.py`
165- License: `~/.claude/skills/documents/xlsx/LICENSE.txt`
166
167**Key Capabilities:**
168- Create spreadsheets with formulas (openpyxl)
169- Data analysis with pandas
170- Financial modeling with color coding standards
171- Formula recalculation with LibreOffice
172- Error detection and validation
173- Preserve formatting and formulas when editing
174
175## 📋 Document Processing Principles
176
177### DOCX Best Practices
1781. **Tracked Changes** - Use redlining workflow for professional document review
1792. **Minimal Edits** - Only mark text that actually changes, preserve original RSIDs
1803. **Batch Changes** - Group related edits (3-10 changes) for efficient processing
1814. **Verification** - Always convert to markdown to verify changes applied correctly
182
183### PDF Best Practices
1841. **Library Selection** - pypdf for basic ops, pdfplumber for text/tables, reportlab for creation
1852. **OCR for Scanned** - Use pytesseract + pdf2image for scanned documents
1863. **Form Filling** - Follow forms.md for programmatic form completion
1874. **Command Line** - Use qpdf/pdftotext for simple operations
188
189### PPTX Best Practices
1901. **Design First** - Analyze content and choose appropriate colors/layouts before coding
1912. **Web-Safe Fonts** - Only use web-safe fonts (Arial, Helvetica, Times, etc.)
1923. **Visual Verification** - Always generate thumbnails to inspect layout issues
1934. **Template Analysis** - Create inventory before using templates to understand structure
194
195### XLSX Best Practices
1961. **Use Formulas** - ALWAYS use Excel formulas, NEVER hardcode calculated values
1972. **Zero Errors** - Deliver with zero formula errors (#REF!, #DIV/0!, etc.)
1983. **Recalculate** - Run recalc.py after creating/editing to update formula values
1994. **Financial Standards** - Follow color coding (blue inputs, black formulas, green links)
200
201## Examples
202
203**Example 1: Create proposal with tracked changes**
204```
205User: "Create a consulting proposal doc with redlining"
206→ Routes to DOCX workflows
207→ Creates document with docx-js
208→ Enables tracked changes for review workflow
209→ Outputs professional .docx with revision marks
210```
211
212**Example 2: Fill a PDF form programmatically**
213```
214User: "Fill out this NDA PDF with my info"
215→ Routes to PDF workflows
216→ Reads form fields from PDF
217→ Fills fields programmatically with pdf-lib
218→ Outputs completed, flattened PDF
219```
220
221**Example 3: Build financial model spreadsheet**
222```
223User: "Create a revenue projection spreadsheet"
224→ Routes to XLSX workflows
225→ Creates workbook with openpyxl
226→ Adds formulas (never hardcoded values)
227→ Runs recalc.py to update calculations
228```
229
230## 🔗 Integration with Other Skills
231
232### Feeds Into:
233- **writing** skill - Creating documents for blog posts and newsletters
234- **business** skill - Creating consulting proposals and financial models
235- **research** skill - Extracting data from research documents
236
237### Uses:
238- **media** skill - Creating images for document illustrations
239- **development** skill - Building document processing automation
240- **system** skill - Command-line tools and scripting
241
242## 🎯 Key Principles
243
244### Document Creation
2451. **Quality First** - Professional formatting and structure from the start
2462. **Template Reuse** - Leverage existing templates when available
2473. **Validation** - Always verify output (visual inspection, error checking)
2484. **Automation** - Use scripts for repetitive tasks
249
250### Document Editing
2511. **Preserve Intent** - Maintain original formatting and structure
2522. **Track Changes** - Use proper workflows for document review
2533. **Batch Processing** - Group related operations for efficiency
2544. **Error Prevention** - Validate before finalizing
255
256### Document Analysis
2571. **Right Tool** - Choose appropriate library/tool for the task
2582. **Data Integrity** - Preserve original data when extracting/converting
2593. **Format Awareness** - Understand document structure (OOXML, PDF structure, etc.)
2604. **Performance** - Use efficient methods for large documents
261
262## 📚 Full Reference Documentation
263
264**Word Documents (DOCX):**
265- Main Guide: `~/.claude/skills/documents/docx/SKILL.md`
266- Creation Reference: `~/.claude/skills/documents/docx/docx-js.md`
267- Editing Reference: `~/.claude/skills/documents/docx/ooxml.md`
268
269**PDF Processing:**
270- Main Guide: `~/.claude/skills/documents/pdf/SKILL.md`
271- Forms Guide: `~/.claude/skills/documents/pdf/forms.md`
272- Advanced Reference: `~/.claude/skills/documents/pdf/reference.md`
273
274**PowerPoint Presentations (PPTX):**
275- Main Guide: `~/.claude/skills/documents/pptx/SKILL.md`
276- Creation Reference: `~/.claude/skills/documents/pptx/html2pptx.md`
277- Editing Reference: `~/.claude/skills/documents/pptx/ooxml.md`
278
279**Excel Spreadsheets (XLSX):**
280- Main Guide: `~/.claude/skills/documents/xlsx/SKILL.md`
281- Recalc Script: `~/.claude/skills/documents/xlsx/recalc.py`
282
283---
284
285## Summary
286
287**The documents skill provides comprehensive document processing:**
288
289- **DOCX** - Create, edit, analyze Word documents with tracked changes support
290- **PDF** - Create, manipulate, extract from PDFs with form filling capabilities
291- **PPTX** - Create, edit presentations with professional design and templates
292- **XLSX** - Create, edit spreadsheets with formulas and financial modeling
293
294**Reference-based organization** - Each document type has complete guides and tooling
295
296**Routing is automatic** - Analyzes user intent and activates appropriate document type workflow
297
298**Professional quality** - Standards and best practices for production-ready documents