agentsclimarketplace

Document text extraction

Skill cxcscmu/SkillLearnBench/skills/b1-one-shot-gemini-3.1-pro-preview/organize-messy-files/document-text-extraction

Extracts text from PDF, DOCX, and PPTX files using Python.From its SKILL.md

Install
npx -y skills add cxcscmu/SkillLearnBench --skill document-text-extraction

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

SKILL.md

1.1 KB, 252 tokens by cl100k_base, as published. Nobody here has run it

Document Text Extraction

Use libraries like PyMuPDF (fitz), python-docx, and python-pptx to extract text from documents.

Installation

pip install PyMuPDF python-docx python-pptx

Python Code Examples

PDF Extraction

import fitz

def extract_pdf(file_path):
    doc = fitz.open(file_path)
    text = ""
    # Just read the first few pages to save time/memory for classification
    for page in doc[:3]:
        text += page.get_text()
    return text

DOCX Extraction

from docx import Document

def extract_docx(file_path):
    doc = Document(file_path)
    return "\n".join([p.text for p in doc.paragraphs[:50]])

PPTX Extraction

from pptx import Presentation

def extract_pptx(file_path):
    prs = Presentation(file_path)
    text = ""
    for slide in prs.slides[:5]:
        for shape in slide.shapes:
            if hasattr(shape, "text"):
                text += shape.text + "\n"
    return text

What ships with it

Read from the repository

Just SKILL.md. No reference files, no scripts.

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.