working-with-documents

Create, read, and edit Word, PDF, and PowerPoint documents programmatically.

9|2|Updated Jan 31, 2026
One-click install
npx skills add https://github.com/AbdullahMalik17/Hacathan_5 --skill working-with-documents-abdullahmalik17
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: working-with-documents
Source: https://github.com/AbdullahMalik17/Hacathan_5/tree/main/.claude/skills/working-with-documents
Command: npx skills add https://github.com/AbdullahMalik17/Hacathan_5 --skill working-with-documents-abdullahmalik17

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Working with Office documents programmatically requires knowing which library handles which task—reading a DOCX differs from editing one with tracked changes, and PDF merging uses entirely different tools than PDF creation. This Skill consolidates the correct tools and workflows for Word, PDF, and PowerPoint files into one reference, eliminating trial-and-error with incompatible libraries. ## Core Features & Use Cases - Word Documents: Read DOCX via pandoc, create with docx-js, and edit with tracked changes by unpacking and modifying OOXML directly. - PDF Operations: Extract text and tables with pdfplumber, generate PDFs with reportlab, and merge or split files with pypdf or qpdf. - PowerPoint Workflows: Create presentations from HTML with html2pptx, edit slides via OOXML unpacking, and rearrange slides with a dedicated script. - Format Conversion & OCR: Convert between DOCX, PPTX, and PDF using LibreOffice and pandoc, plus OCR scanned documents with pytesseract. - Use Case: A user needs to update a contract DOCX with tracked changes so legal can review edits. The Skill guides unpacking the file, inserting w:ins and w:del XML elements, and repacking it into a valid document. ## Quick Start Ask the AI to extract all tables from a PDF report and convert the results into a new Word document.

Frequently Asked Questions about working-with-documents

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract tables from a PDF in Python?▼

Use pdfplumber to extract tables from PDF pages by calling page.extract_tables(), which returns rows as lists. For text-only extraction, use page.extract_text() or the pdftotext command-line tool with the -layout flag to preserve formatting.

How to edit a Word document with tracked changes programmatically?▼

Unpack the DOCX with the OOXML unpack script, then edit word/document.xml directly using w:ins elements for insertions and w:del with w:delText for deletions. Repack the directory into a valid DOCX that shows revisions in Word.

What library should I use to create PowerPoint presentations?▼

Use the html2pptx workflow: design slides as HTML at 720pt by 405pt for 16:9, then convert with the html2pptx.js library. Validate the output by generating a thumbnail grid with the thumbnail script.

Can I extract text from a scanned PDF document?▼

Standard parsers like pdfplumber cannot read scanned PDFs because they contain images, not text layers. Use pdf2image to convert pages to images, then run pytesseract OCR on each image to recover the text.

How do I convert DOCX or PPTX files to PDF?▼

Run LibreOffice in headless mode with soffice --headless --convert-to pdf followed by the filename. For DOCX to Markdown instead, use pandoc with the -o flag to specify the output file.

Why does editing PPTX XML fail after repacking?▼

PPTX edits fail when the modified XML breaks schema references or relationships between slides and media. Run the OOXML validate script against the original file before packing to catch structural errors early.