pdfagent for Openclaw

A comprehensive self-hosted CLI agent for advanced PDF manipulation, OCR, and conversion with detailed usage metering.

cap-txt
v0.1.0
Mar 5, 2026
2
1k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install pdfagent

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 pdfagent 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 pdfagent?

pdfagent is a powerful, local-first utility designed to handle complex document operations without the need for external cloud services. As a core component of the Openclaw Skills library, it provides a unified interface for merging, splitting, compressing, and performing OCR on PDF files. It is built for developers who prioritize data privacy and require granular control over their document workflows.

By leveraging the performance of system-level tools like ghostscript, qpdf, and poppler, pdfagent delivers high-speed processing directly on your machine. The skill is uniquely designed to provide machine-readable JSON outputs, making it an ideal choice for integration into larger automated pipelines and agent-driven environments where tracking resource usage is critical.

pdfagent Use Cases

  • Consolidating multiple PDF reports or invoices into a single unified document.
  • Extracting specific page ranges from large documents for focused analysis.
  • Batch converting image archives into searchable PDF formats using integrated OCR.
  • Automating document compression to optimize storage and sharing without losing significant quality.
  • Building secure, self-hosted document processing pipelines that keep sensitive data on-disk.
  • Utilizing natural language instructions to perform multi-step document transformations via Openclaw Skills.

How pdfagent Works

  1. The skill is invoked via the CLI using uv run, targeting specific files or directories.
  2. pdfagent parses the command-line arguments to determine the specific operation, such as merge, split, or ocr.
  3. The tool performs a dependency check to ensure required system binaries like qpdf or ocrmypdf are available.
  4. Execution logic is applied to the input files, often utilizing fallback paths if specific optional tools are missing.
  5. Detailed usage metrics are recorded throughout the lifecycle of the operation.
  6. The final document is generated and saved to the specified output path, while a JSON response confirms the results and resource consumption.

pdfagent Setup

To use this skill within the Openclaw Skills framework, ensure you have uv installed and relevant system dependencies on your PATH (e.g., qpdf, ghostscript, poppler, ocrmypdf).

# Verify your environment and system tools
uv run scripts/pdfagent_cli.py doctor --json

# Basic setup for OCR tasks
uv run scripts/pdfagent_cli.py ocr input.pdf --lang eng --out output_ocr.pdf --json

pdfagent Data Schema & Taxonomy

pdfagent focuses on structured input/output to ensure compatibility with other automation tools. When the --json flag is used, the output follows this schema:

Property Type Description
usage Object Contains metered data regarding processing time and resources.
outputs Array List of absolute or relative file paths to the generated documents.
status String Indicates successful execution or details on fallback usage.
metadata Object Specific details about the PDF, such as page count or encryption status.

pdfagent Advanced Features

  • Agent mode for interpreting multi-step instructions into sequential PDF operations.
  • Metered usage output for precise monitoring of resource utilization across tasks.
  • Support for encrypted PDF files with flexible password handling at the global or file level.
  • Fallback path logic to maintain functionality even when certain system binaries are unavailable.
  • Extensible execution via optional Python dependencies for specialized tasks like tabular data extraction.
  • Seamless integration into the broader Openclaw Skills ecosystem for multi-agent workflows.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*