Pdf processor

From aipoch/medical-research-skills · View interactive version

Pdf processor is an AI agent skill from the GitHub repository aipoch/medical-research-skills. Perform basic local PDF operations (merge, split, extract pages/text/tables, create) when users request offline PDF processing without external services.

How to use this skill

Skill file

Source: https://github.com/aipoch/medical-research-skills

When to Use

Key Features

Dependencies

Install Python dependencies:

pip install -r scripts/requirements.txt

Example Usage

More examples may be available in references/examples.md.

Merge PDFs

python scripts/pdf_tool.py \
  --operation merge \
  --inputs "a.pdf" "b.pdf" \
  --output "out.pdf"

Split a PDF into single-page PDFs

python scripts/pdf_tool.py \
  --operation split \
  --inputs "input.pdf" \
  --output "out_dir"

Extract specific pages into a new PDF

python scripts/pdf_tool.py \
  --operation extract-pages \
  --inputs "input.pdf" \
  --pages "1-3,5" \
  --output "extracted.pdf"

Extract text to a `.txt` file

python scripts/pdf_tool.py \
  --operation extract-text \
  --inputs "input.pdf" \
  --output "output.txt"

Extract tables to CSV files

python scripts/pdf_tool.py \
  --operation extract-tables \
  --inputs "input.pdf" \
  --output "tables_out_dir"

Create a PDF from a text file

python scripts/pdf_tool.py \
  --operation create \
  --inputs "input.txt" \
  --output "created.pdf"

Implementation Details

When Not to Use

Required Inputs

Recommended Workflow

  1. Validate the request against the skill boundary and confirm all required inputs are present.
  2. Select the documented execution path and prefer the simplest supported command or procedure.
  3. Produce the expected output using the documented file format, schema, or narrative structure.
  4. Run a final validation pass for completeness, consistency, and safety before returning the result.

Output Contract

Validation and Safety Rules

Failure Handling

Input Validation

This skill accepts requests that match the documented purpose of pdf-processor and include enough context to complete the workflow safely.

Do not continue the workflow when the request is out of scope, missing a critical input, or would require unsupported assumptions. Instead respond:

pdf-processor only handles its documented workflow. Please provide the missing required inputs or switch to a more suitable skill.

Quick Validation

Run this minimal verification path before full execution when possible:

python scripts/pdf_tool.py --help

Expected output format:

Result file: pdf_processor_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any
Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.