Document Handler for Openclaw

A versatile utility for extracting text, metadata, and converting various document formats including PDF, Word, and Excel.

neckr0ik
v1.0.0
Mar 7, 2026
0
3.8k
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install document-handler

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install document-handler using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Document Handler?

The Document Handler is a comprehensive technical skill designed for AI agents to interact with a wide array of document formats. It provides the necessary tools to read content from PDFs, Microsoft Office files, EPUBs, and OpenDocument formats, making it an essential component for any automated data processing workflow within the Openclaw Skills ecosystem.

By leveraging standard CLI utilities and custom shell scripts, this skill enables seamless extraction of text and metadata, as well as high-quality format conversion. Whether you need to scrape data from a complex spreadsheet or summarize an academic PDF report, this skill ensures your AI agent has direct access to the underlying information without requiring heavy external software suites.

Document Handler Use Cases

  • Extracting plain text from PDF reports for automated summarization.
  • Retrieving document metadata such as author, creation date, and page count.
  • Converting PDF pages to high-resolution images for downstream OCR processing.
  • Reading content from EPUB e-books or RTF files for knowledge base ingestion.
  • Processing Office Open XML files (DOCX, XLSX, PPTX) via command-line tools for fast data analysis.

How Document Handler Works

  1. Identification: The skill identifies the document format based on the file extension (e.g., .pdf, .docx, .epub).
  2. Extraction: It triggers the appropriate tool, such as pdftotext or unzip, to pull raw content from the file structure.
  3. Metadata Retrieval: Technical metadata is extracted using specialized utilities like pdfinfo to provide context about the file.
  4. Processing: The extracted text or data is normalized and passed back to the agent for summarization, transformation, or further logical analysis.

Document Handler Setup

To integrate this capability into your Openclaw Skills environment, ensure you have the required CLI utilities installed. On macOS, these can be managed via Homebrew.

# Install PDF utilities (pdftotext, pdfinfo, pdftoppm)
brew install poppler

# Install lynx for EPUB text rendering
brew install lynx

Execute the provided scripts directly for bulk processing:

# Extract text and metadata from any supported file
./scripts/extract_document.sh <file_path>

# Convert PDF pages to PNG images for visual processing
./scripts/pdf_to_images.sh <pdf_path> <output_directory> [dpi]

Document Handler Data Schema & Taxonomy

The Document Handler processes various input files and generates structured text or image outputs. Metadata is often returned as JSON-formatted comments for easy parsing.

Document Component Extraction Method Primary Output
Text Content pdftotext, sed, textutil Plain Text
File Metadata pdfinfo, unzip JSON / Key-Value
Page Visuals pdftoppm PNG / JPEG Images
Spreadsheet Data unzip + xml parsing Normalized Text

Document Handler Advanced Features

  • Granular page-specific extraction for targeted reading of large PDF documents.
  • Support for OpenDocument formats (ODT, ODS, ODP) for cross-platform compatibility.
  • Conversion of RTF to HTML or Text using macOS textutil integration.
  • Automated extraction of shared strings from Excel files to reconstruct cell data without a GUI.
  • Enhanced workflow support for OCR by preparing document images for Tesseract within Openclaw Skills.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*