Skip to content
Back to skills

Documents

ASecurity

Document processing. USE WHEN document, process file. SkillSearch('documents') for docs.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added October 6, 2026
ai-agentsjavascriptjavaperformancedocumentation

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned October 6, 2026

npx -y skills add johansenmeister/Dual-PAI --skill Documents --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Documents?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Documents
[![Security: A β€” Skills Directory](https://www.skillsdirectory.com/api/skills/johansenmeister-documents/badge)](https://www.skillsdirectory.com/skills/johansenmeister-documents)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Documents
description: Document processing. USE WHEN document, process file. SkillSearch('documents') for docs.
---

## Customization

**Before executing, check for user customizations at:**
`~/.opencode/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.


## Notification


1. **Output text notification**:
   ```
   Running the **WorkflowName** workflow in the **Documents** skill to ACTION...
   ```


# Documents Skill

## 🎯 Load Full PAI Context

**Before starting any task with this skill, load complete PAI context:**

`read ~/.opencode/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: `~/.opencode/skills/documents/docx/Scripts/`
- OOXML tools: `~/.opencode/skills/documents/docx/ooxml/`
- License: `~/.opencode/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: `~/.opencode/skills/documents/pdf/Scripts/`
- License: `~/.opencode/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: `~/.opencode/skills/documents/pptx/Scripts/`
- OOXML tools: `~/.opencode/skills/documents/pptx/ooxml/`
- License: `~/.opencode/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: `~/.opencode/skills/documents/xlsx/recalc.py`
- License: `~/.opencode/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
1. **Tracked Changes** - Use redlining workflow for professional document review
2. **Minimal Edits** - Only mark text that actually changes, preserve original RSIDs
3. **Batch Changes** - Group related edits (3-10 changes) for efficient processing
4. **Verification** - Always convert to markdown to verify changes applied correctly

### PDF Best Practices
1. **Library Selection** - pypdf for basic ops, pdfplumber for text/tables, reportlab for creation
2. **OCR for Scanned** - Use pytesseract + pdf2image for scanned documents
3. **Form Filling** - Follow forms.md for programmatic form completion
4. **Command Line** - Use qpdf/pdftotext for simple operations

### PPTX Best Practices
1. **Design First** - Analyze content and choose appropriate colors/layouts before coding
2. **Web-Safe Fonts** - Only use web-safe fonts (Arial, Helvetica, Times, etc.)
3. **Visual Verification** - Always generate thumbnails to inspect layout issues
4. **Template Analysis** - Create inventory before using templates to understand structure

### XLSX Best Practices
1. **Use Formulas** - ALWAYS use Excel formulas, NEVER hardcode calculated values
2. **Zero Errors** - Deliver with zero formula errors (#REF!, #DIV/0!, etc.)
3. **Recalculate** - Run recalc.py after creating/editing to update formula values
4. **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
1. **Quality First** - Professional formatting and structure from the start
2. **Template Reuse** - Leverage existing templates when available
3. **Validation** - Always verify output (visual inspection, error checking)
4. **Automation** - Use scripts for repetitive tasks

### Document Editing
1. **Preserve Intent** - Maintain original formatting and structure
2. **Track Changes** - Use proper workflows for document review
3. **Batch Processing** - Group related operations for efficiency
4. **Error Prevention** - Validate before finalizing

### Document Analysis
1. **Right Tool** - Choose appropriate library/tool for the task
2. **Data Integrity** - Preserve original data when extracting/converting
3. **Format Awareness** - Understand document structure (OOXML, PDF structure, etc.)
4. **Performance** - Use efficient methods for large documents

## πŸ“š Full Reference Documentation

**Word Documents (DOCX):**
- Main Guide: `~/.opencode/skills/documents/docx/SKILL.md`
- Creation Reference: `~/.opencode/skills/documents/docx/docx-js.md`
- Editing Reference: `~/.opencode/skills/documents/docx/ooxml.md`

**PDF Processing:**
- Main Guide: `~/.opencode/skills/documents/pdf/SKILL.md`
- Forms Guide: `~/.opencode/skills/documents/pdf/forms.md`
- Advanced Reference: `~/.opencode/skills/documents/pdf/reference.md`

**PowerPoint Presentations (PPTX):**
- Main Guide: `~/.opencode/skills/documents/pptx/SKILL.md`
- Creation Reference: `~/.opencode/skills/documents/pptx/html2pptx.md`
- Editing Reference: `~/.opencode/skills/documents/pptx/ooxml.md`

**Excel Spreadsheets (XLSX):**
- Main Guide: `~/.opencode/skills/documents/xlsx/SKILL.md`
- Recalc Script: `~/.opencode/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

Files in this skill

  • SKILL.md10.6 KB
  • Workflows/ProcessLargePdfGemini3.md17.8 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…