pdfagent

Self-hosted PDF operations and conversions with metered usage output.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "pdfagent" with this command: npx skills add cap-txt/pdfagent

PDF Agent

Summary

  • Use pdfagent to perform PDF operations (merge, split, compress, convert, OCR, etc.) with detailed usage metering in the output.
  • Best for local, self-hosted processing where inputs/outputs must stay on disk.
  • This skill ships source code in pdfagent/ and runs via uv run from scripts/pdfagent_cli.py (no PyPI publish required).

Requirements

  • uv installed and on PATH.
  • System tools as needed by specific commands: qpdf, ghostscript, poppler (pdftoppm), libreoffice, chromium (for HTML -> PDF), and ocrmypdf.

Core Usage

  • Merge PDFs with usage metrics: uv run {baseDir}/scripts/pdfagent_cli.py merge file1.pdf file2.pdf --out merged.pdf --json
  • Split a PDF by ranges: uv run {baseDir}/scripts/pdfagent_cli.py split input.pdf --range "1-3,5" --out-dir out_dir --json
  • Compress a PDF with a preset: uv run {baseDir}/scripts/pdfagent_cli.py compress input.pdf --preset ebook --out compressed.pdf --json
  • Convert images to PDF: uv run {baseDir}/scripts/pdfagent_cli.py jpg-to-pdf image1.jpg image2.png --out output.pdf --json
  • OCR a scanned PDF: uv run {baseDir}/scripts/pdfagent_cli.py ocr scan.pdf --lang eng --out scan_ocr.pdf --json
  • Agent mode for multi-step instructions: uv run {baseDir}/scripts/pdfagent_cli.py agent "merge then rotate 90 degrees every other page" -i file1.pdf -i file2.pdf --out out.pdf --json
  • Dependency/binary check: uv run {baseDir}/scripts/pdfagent_cli.py doctor --json

Notes

  • Use --json for machine-readable outputs (includes usage and outputs).
  • For encrypted PDFs, pass --password or per-file --passwords.
  • If a conversion tool is missing, pdfagent may use a fallback path and will note it in output or logs.
  • Optional Python deps are still command-specific: uv run --with pdf2docx --with camelot-py[cv] --with pdfplumber --with pyhanko {baseDir}/scripts/pdfagent_cli.py <command> ...

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

Logics-Parsing阿里文档解析

阿里文档智能解析工具 - 将PDF/图片转结构化HTML。支持复杂布局、公式识别、化学结构、代码块、流程图、乐谱等。

Registry SourceRecently Updated
570Profile unavailable
General

claw-text-and-pics

Extract text and embedded images from scanned documents, PDFs, and photos via Mistral OCR API. Use when reading receipts, invoices, contracts, handwritten no...

Registry SourceRecently Updated
1000Profile unavailable
General

WPS PDF Processing

当用户需要对 PDF 文件进行任何操作时,使用本技能。包括:读取或提取 PDF 中的文字/表格、合并多个 PDF、拆分 PDF、旋转页面、添加水印、创建新 PDF、填写 PDF 表单、加密/解密 PDF、提取图片,以及对扫描版 PDF 进行 OCR 识别使其可搜索。只要用户提到 .pdf 文件或希望生成 PDF,...

Registry SourceRecently Updated
720Profile unavailable
General

File Converter

This skill provides comprehensive file format conversion capabilities. It should be used when users need to convert files between different formats, includin...

Registry SourceRecently Updated
960Profile unavailable