PluginBench
Skill
Pass
Audit score 90

document-processing

eyadsibai/ltk

Process PDF, Excel, Word, and PowerPoint documents—extract, merge, convert, and manipulate office files.

What is document-processing?

A guide for working with common office document formats (PDF, Excel, Word, PowerPoint). Use this when you need to extract text, merge files, convert between formats, or manipulate spreadsheets, presentations, and documents programmatically.

  • Extract text and tables from PDFs using pdfplumber or pypdf
  • Merge, split, rotate, and encrypt PDF files
  • Create and edit Excel spreadsheets with formulas and formatting using openpyxl or pandas
  • Generate and modify Word documents with python-docx, including tracked changes for contracts
  • Build and edit PowerPoint presentations with python-pptx or pptxgenjs
  • Convert between formats (DOCX to Markdown, any format to PDF via LibreOffice)

How to install document-processing

npx skills add null --skill document-processing
Prerequisites
  • Python 3.7+ or Node.js for JavaScript tools
  • For PDF OCR: pytesseract and pdf2image (requires Tesseract binary)
  • For format conversion: LibreOffice installed for headless conversion
  • For CLI tools: pandoc, qpdf, or pdftotext available in PATH
Claude Code
Cursor
Windsurf
Cline

How to use document-processing

  1. 1.Identify the document format and operation needed (extract, merge, create, convert)
  2. 2.Choose the appropriate tool from the guide (e.g., pdfplumber for PDF tables, openpyxl for Excel formulas)
  3. 3.For Excel: write formulas instead of static values so calculations update dynamically
  4. 4.For Word: use tracked changes XML for contracts and legal documents to maintain audit trails
  5. 5.For PowerPoint: follow design principles (web-safe fonts, two-column layout, consistent patterns)
  6. 6.Test the output file opens correctly before deploying to production

Use cases

Good for
  • Automating report generation by merging multiple PDFs or creating Excel financial models
  • Extracting structured data from Word contracts or PDF forms into a database
  • Converting presentation slides to markdown for content analysis or republishing
  • Applying OCR to scanned PDFs and extracting tables into DataFrames
  • Generating dynamic Excel spreadsheets with formulas that recalculate when data changes
Who it's for
  • Data analysts and engineers processing bulk documents
  • Business automation developers building document workflows
  • Financial modelers creating dynamic Excel workbooks
  • Legal/compliance teams managing contracts with tracked changes
  • Report generators automating PDF or presentation creation

document-processing FAQ

Should I calculate values in Python and write them to Excel, or use Excel formulas?

Always use Excel formulas. Writing static calculated values breaks when source data changes; formulas recalculate automatically.

How do I extract tables from a PDF?

Use pdfplumber, which can detect and convert tables to DataFrames. For scanned PDFs, first apply OCR with pytesseract and pdf2image.

What's the difference between XLSX, DOCX, and PPTX?

All three are ZIP archives containing XML files. You can unzip them to access raw content directly if needed, but libraries like openpyxl and python-docx handle this for you.

How do I preserve tracked changes when editing a Word document?

For professional/legal documents, edit the tracked changes XML directly (word/comments.xml and w:del/w:ins tags) rather than replacing text, to maintain the audit trail.

Can I convert any document format to PDF?

Yes, use LibreOffice in headless mode for reliable conversion from DOCX, PPTX, and other formats to PDF.

Full instructions (SKILL.md)

Source of truth, from eyadsibai/ltk.


name: document-processing description: Use when working with "PDF", "Excel", "Word", "PowerPoint", "XLSX", "DOCX", "PPTX", "spreadsheets", "presentations", "extract text", "merge documents", "convert documents", or asking about "office document manipulation" version: 1.0.0

Document Processing Guide

Work with office documents: PDF, Excel, Word, and PowerPoint.


Format Overview

FormatExtensionStructureBest For
PDF.pdfBinary/textReports, forms, archives
Excel.xlsxXML in ZIPData, calculations, models
Word.docxXML in ZIPText documents, contracts
PowerPoint.pptxXML in ZIPPresentations, slides

Key concept: XLSX, DOCX, and PPTX are all ZIP archives containing XML files. You can unzip them to access raw content.


PDF Processing

PDF Tools

TaskBest Tool
Basic read/writepypdf
Text extractionpdfplumber
Table extractionpdfplumber
Create PDFsreportlab
OCR scanned PDFspytesseract + pdf2image
Command lineqpdf, pdftotext

Common Operations

OperationApproach
MergeLoop through files, add pages to writer
SplitCreate new writer per page
Extract tablesUse pdfplumber, convert to DataFrame
RotateCall .rotate(degrees) on page
EncryptUse writer's .encrypt() method
OCRConvert to images, run pytesseract

Excel Processing

Excel Tools

TaskBest Tool
Data analysispandas
Formulas & formattingopenpyxl
Simple CSVpandas
Financial modelsopenpyxl

Critical Rule: Use Formulas

ApproachResult
Wrong: Calculate in Python, write valueStatic number, breaks when data changes
Right: Write Excel formulaDynamic, recalculates automatically

Financial Model Standards

ConventionMeaning
Blue textHardcoded inputs
Black textFormulas
Green textLinks to other sheets
Yellow fillNeeds attention

Common Formula Errors

ErrorCause
#REF!Invalid cell reference
#DIV/0!Division by zero
#VALUE!Wrong data type
#NAME?Unknown function name

Word Processing

Word Tools

TaskBest Tool
Text extractionpandoc
Create newpython-docx or docx-js
Simple editspython-docx
Tracked changesDirect XML editing

Document Structure

FileContains
word/document.xmlMain content
word/comments.xmlComments
word/media/Images

Tracked Changes (Redlining)

ElementXML Tag
Deletion<w:del><w:delText>...</w:delText></w:del>
Insertion<w:ins><w:t>...</w:t></w:ins>

Key concept: For professional/legal documents, use tracked changes XML rather than replacing text directly.


PowerPoint Processing

PowerPoint Tools

TaskBest Tool
Text extractionmarkitdown
Create newpptxgenjs (JS) or python-pptx
Edit existingDirect XML or python-pptx

Slide Structure

PathContains
ppt/slides/slide{N}.xmlSlide content
ppt/notesSlides/Speaker notes
ppt/slideMasters/Master templates
ppt/media/Images

Design Principles

PrincipleGuideline
FontsUse web-safe: Arial, Helvetica, Georgia
LayoutTwo-column preferred, avoid vertical stacking
HierarchySize, weight, color for emphasis
ConsistencyRepeat patterns across slides

Converting Between Formats

ConversionTool
Any → PDFLibreOffice headless
PDF → Imagespdftoppm
DOCX → Markdownpandoc
Any → TextAppropriate extractor

Best Practices

PracticeWhy
Use formulas in ExcelDynamic calculations
Preserve formatting on editDon't lose styles
Test output opens correctlyCatch corruption early
Use tracked changes for contractsAudit trail
Extract to markdown for analysisEasier to process

Common Packages

LanguagePackages
Pythonpypdf, pdfplumber, openpyxl, python-docx, python-pptx
JavaScriptdocx, pptxgenjs
CLIpandoc, qpdf, pdftotext, libreoffice