pdf-extract-progressive-tools
Skill by HKUDS
Extracts text from PDF files using a fixed sequence of agent tools with fallbacks. Built for AI agents that need a reliable PDF extraction workflow, including regulatory and compliance documents.
Install pdf-extract-progressive-tools
Built from the published package, never by AI.
git clone --depth 1 https://github.com/HKUDS/AgentPilot /tmp/AgentPilot && mkdir -p ~/.claude/skills && cp -r /tmp/AgentPilot/openspace/benchmarks/gdpval/skills/pdf-download-extract-fallback-enhanced-899f5b ~/.claude/skills/pdf-extract-progressive-toolsRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install pdf-extract-progressive-tools in Claude Code
git clone --depth 1 https://github.com/HKUDS/AgentPilot /tmp/AgentPilot && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/AgentPilot/openspace/benchmarks/gdpval/skills/pdf-download-extract-fallback-enhanced-899f5b ~/.gemini/antigravity-cli/skills/pdf-extract-progressive-toolsAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install pdf-extract-progressive-tools in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill is a workflow for extracting text from PDF files with an AI agent. It sets a fixed order of tools: read_file first, then run_shell with pdftotext, then execute_code_sandbox with PyMuPDF. The source says read_file often returns binary or image data for PDFs, so the workflow moves to the shell step as soon as that happens.
Each step includes a quality check on text length and readability. If every method fails, the skill tells the agent to log the tool failures and mark any content taken from general knowledge rather than the source. The source says it is for automated document processing, regulatory or compliance documents, and cases where tool availability is unknown. It enhances the parent skill pdf-download-extract-fallback.
Written from the project's SKILL.md and checked against it.
What it can do
- read_file first attemptTries read_file first and checks whether the returned content is text or binary.
- Binary data detectionFlags output that starts with %PDF- or looks like garbled, base64, or image data.
- run_shell with pdftotextExtracts text with pdftotext, with an apt-get step to install poppler-utils if missing.
- execute_code_sandbox with PyMuPDFRuns a Python script with PyMuPDF as the final extraction fallback.
- Quality verificationChecks text length per page, readability, and truncation after extraction.
- Domain knowledge fallbackLogs tool failures and marks any content not taken from the source document.
- Orchestration scriptIncludes a Python function that runs the tools in order and logs each attempt.
What you need
- pdftotext (poppler-utils) for the run_shell step
- PyMuPDF (fitz) Python package for the sandbox step
- A sandbox that can run Python code
- Shell access for run_shell
Try asking
- Extract the text from report.pdf, starting with read_file and falling back to pdftotext.
- Check the extracted text from this PDF for length and readability.
- Pull text from contract.pdf and log which extraction tool succeeded.
Good to know
- read_file often returns binary data for PDFs instead of text.
- Scanned documents may need OCR, which the skill suggests but does not include as a step.
- Depends on pdftotext or PyMuPDF being available in the environment.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: openspace/benchmarks/gdpval/skills/pdf-download-extract-fallback-enhanced-899f5b/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
.skill_id59 B -
SKILL.md12 KB
Alternatives to pdf-extract-progressive-tools
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
pdf-extract-progressive-tools: common questions
What happens if read_file returns binary data?
The skill says to switch to run_shell with pdftotext right away and not to try execute_code_sandbox yet.
Does this skill handle scanned PDFs?
The source suggests OCR tools or a text version for scanned documents when quality is poor, but it does not include an OCR step.
What if every extraction method fails?
The skill says to document each tool failure, keep any partial content, and mark any supplemented content that comes from domain knowledge.
How do I install pdf-extract-progressive-tools?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is pdf-extract-progressive-tools free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is pdf-extract-progressive-tools safe to use?
It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to pdf-extract-progressive-tools?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
