Agent skill

PDF Extract

by aipoch in aipoch/medical-research-skills

Extract PDF selectable text and full-page or segmented page images (including tables) into Markdown with per-page headings and image links; use when you need both readable text and page visuals for…

MITAuto-check passedDocuments & Office

Install PDF Extract

skills CLI
$ npx skills add aipoch/medical-research-skills --skill pdf-extract -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install aipoch/medical-research-skills pdf-extract --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/aipoch/medical-research-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/scientific-skills/Other/pdf-extract .claude/skills/pdf-extract && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
pdf-extract
GitHub stars
2k
Token cost
~1.8k tokens
SKILL.md length
814 words
Files
6 (incl. scripts)
Skills in repo
567
Repo updated
First seen
Licence
MIT

At a glance

Extract PDF selectable text and full-page or segmented page images (including tables) into Markdown with per-page headings and image links; use when you need both readable text and page visuals for…

  • Works in 4 steps: Validate the request against the skill… → Select the documented execution path and… → Produce the expected output using the… → …
  • You need both readable text and page visuals for PPT creation
  • SKILL.md covers Validation Shortcut, When to Use, Key Features and Dependencies, plus 11 more sections
  • Runs Python scripts from its folder; calls python

What it does

PDF Extract is an agent skill from aipoch/medical-research-skills. Extract PDF selectable text and full-page or segmented page images (including tables) into Markdown with per-page headings and image links; use when you need both readable text and page visuals for PPT creation, review, or analysis.

Its SKILL.md is about 1.8k tokens, which your agent loads only when the skill is triggered. The skill folder holds 7 other files, including scripts (for example `agents/openai.yaml`, `pdf-extract_audit_result_v2.json` and `report.json`).

It sits in Documents & Office, covering PDF. The repository describes itself as: Hundreds of agent skills for medical research, including protocol design, data analysis, evidence insights, and academic writing. The licence is MIT.

When your agent uses it

  • You need both readable text and page visuals for PPT creation
  • Tasks that involve PDF

Example prompts

  • “/pdf-extract”

Requirements

  • Python 3

Workflow steps

4 steps, taken from the first numbered list in SKILL.md.

  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.

What it can do on your machine

Read from SKILL.md and the folder at commit 686e09d. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 2 files in scripts/ (Python), which the agent can run.

    Shell commands in SKILL.md call:

    • python

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

PDF Extract loads about 1.8k tokens when it runs. Until then it costs about 61 tokens; SKILL.md has 814 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~61
When it runs · the whole SKILL.md, loaded when a task matches
~1.8k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from aipoch/medical-research-skills at commit 686e09d, republished under its MIT licence (© aipoch). 814 words, ~1,812 tokens.

Download SKILL.mdSave it as .claude/skills/pdf-extract/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
pdf-extract
description
Extract PDF selectable text and full-page or segmented page images (including tables) into Markdown with per-page headings and image links; use when you need both readable text and page visuals for PPT creation, review, or analysis.
license
MIT
author
AIPOCH

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

Validation Shortcut

Run this minimal command first to verify the supported execution path:

bash
python scripts/extract_pdf.py --help

When to Use

  • Converting a PDF report/paper into Markdown while preserving page structure (## Page XX) for easy navigation.
  • Preparing PPT or design materials where you need both extracted text and page screenshots/blocks (tables, figures, diagrams).
  • Reviewing scanned or mixed PDFs and filtering out "text-only" screenshots to keep only meaningful visuals.
  • Building a dataset for downstream analysis where each page's text and images must be linked and traceable.
  • Creating a lightweight "PDF-to-Markdown" archive with per-page headings and image references.

Key Features

  • Extracts selectable PDF text and normalizes paragraphs (collapses line breaks into readable paragraphs).
  • Writes Markdown with a document title and per-page sections (# <filename>, ## Page XX).
  • Supports multiple image extraction modes:
    • segment (default): renders segmented page blocks (useful for tables/figures).
    • embedded: extracts embedded images from the PDF.
    • page: renders full pages as images.
  • Optional post-filters to reduce noisy images:
    • Filter text-heavy images via OCR (--filter-text).
    • Drop images that match extracted page text (likely screenshots of text) (--filter-match).
    • Drop images overlapping PDF text blocks without OCR (--filter-pdf-text).
  • Produces stable, per-page image links in Markdown for easy referencing.

Dependencies

  • pdfplumber (version not specified)
  • pymupdf (version not specified)
  • pytesseract (version not specified; required only when --filter-text on or --filter-match on)

Example Usage

bash
python scripts/extract_pdf.py \
  --input input.pdf \
  --output output.md \
  --image-dir images \
  --image-mode segment \
  --filter-text on \
  --text-threshold 0.25 \
  --text-lang eng \
  --filter-match on \
  --match-lang eng \
  --match-min-len 30 \
  --filter-pdf-text on \
  --pdf-text-threshold 0.1

Expected Markdown structure:

  • Document title: # <filename>
  • Per-page section: ## Page XX
  • Text paragraphs (normalized)
  • Image links, depending on mode:
    • Segmented blocks: ![page-XX](images/page-XX-block-YY.png) with --image-mode segment
    • Embedded images: ![page-XX](images/page-XX-img-YY.png) with --image-mode embedded
    • Full page render: ![page-XX](images/page-XX.png) with --image-mode page

Implementation Details

  • Text extraction and normalization

    • Extracts selectable text from the PDF and collapses line breaks to form coherent paragraphs.
    • Headings are inferred using font-size heuristics (larger font sizes are treated as heading markers).
  • Image extraction modes

    • segment (default): renders page segments/blocks to capture localized content (tables/figures) rather than entire pages.
    • embedded: extracts images embedded in the PDF content stream.
    • page: renders each full page as a single image (not recommended if you need cropped screenshots/blocks).
  • Filtering options

    • --filter-text on: runs OCR on extracted images and removes images whose OCR text density exceeds --text-threshold (e.g., 0.25).
    • --filter-match on: removes images whose OCR text substantially matches the page's extracted text; controlled by --match-min-len and language via --match-lang.
    • --filter-pdf-text on: removes images that overlap PDF text blocks using PDF layout information (no OCR); controlled by --pdf-text-threshold (e.g., 0.1).
  • Output writing

    • Writes a single Markdown file with ## Page XX sections and image links pointing to files saved under --image-dir.

When Not to Use

  • Do not use this skill when the required source data, identifiers, files, or credentials are missing.
  • Do not use this skill when the user asks for fabricated results, unsupported claims, or out-of-scope conclusions.
  • Do not use this skill when a simpler direct answer is more appropriate than the documented workflow.

Required Inputs

  • A clearly specified task goal aligned with the documented scope.
  • All required files, identifiers, parameters, or environment variables before execution.
  • Any domain constraints, formatting requirements, and expected output destination if applicable.
Show full SKILL.md (321 more words)Show less
  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

  • Return a structured deliverable that is directly usable without reformatting.
  • If a file is produced, prefer a deterministic output name such as pdf_extract_result.md unless the skill documentation defines a better convention.
  • Include a short validation summary describing what was checked, what assumptions were made, and any remaining limitations.

Validation and Safety Rules

  • Validate required inputs before execution and stop early when mandatory fields or files are missing.
  • Do not fabricate measurements, references, findings, or conclusions that are not supported by the provided source material.
  • Emit a clear warning when credentials, privacy constraints, safety boundaries, or unsupported requests affect the result.
  • Keep the output safe, reproducible, and within the documented scope at all times.

Failure Handling

  • If validation fails, explain the exact missing field, file, or parameter and show the minimum fix required.
  • If an external dependency or script fails, surface the command path, likely cause, and the next recovery step.
  • If partial output is returned, label it clearly and identify which checks could not be completed.

Quick Validation

Run this minimal verification path before full execution when possible:

bash
python scripts/extract_pdf.py --help

Expected output format:

text
Result file: pdf_extract_result.md
Validation summary: PASS/FAIL with brief notes
Assumptions: explicit list if any

Deterministic Output Rules

  • Use the same section order for every supported request of this skill.
  • Keep output field names stable and do not rename documented keys across examples.
  • If a value is unavailable, emit an explicit placeholder instead of omitting the field.

Completion Checklist

  • Confirm all required inputs were present and valid.
  • Confirm the supported execution path completed without unresolved errors.
  • Confirm the final deliverable matches the documented format exactly.
  • Confirm assumptions, limitations, and warnings are surfaced explicitly.

© aipoch, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files (scripts) in scientific-skills/Other/pdf-extract of aipoch/medical-research-skills.

  • SKILL.md
  • agents/openai.yaml
  • pdf-extract_audit_result_v2.json
  • report.json
  • scripts/extract_pdf.py
  • scripts/validate_skill.py

Open the folder on GitHubat commit 686e09d

Compare with similar skills

PDF Extract next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

PDF Extract compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
PDF Extract this skillaipoch/medical-research-skills2k—~1.8kAutomated safety check: PassMIT
MarkitdownImCa0/just-laws78114 repos~3.2kAutomated safety check: NotesMIT
Gzh Designisjiamu/gzh-design-skill3.9k1 repos~2.2kAutomated safety check: PassAGPL-3.0
GenOffice Document CLIgenspark-ai/genoffice8.9k—~19kAutomated safety check: PassApache-2.0
Harness Book Best Practicewquguru/harness-books3.2k—~4.1kAutomated safety check: PassNone
Bookforge Korean Ebook PDF Makergongnyang/bookforge3141 repos~1.7kAutomated safety check: PassMIT

Similar skills

  • Markitdown

    ImCa0/just-laws

    Convert files and office documents to Markdown. An agent skill from ImCa0/just-laws.

    781 GitHub starsUsed in 14 repos~3.2k tokens
    Documents & OfficeAuto-check: notes
  • Gzh Design

    isjiamu/gzh-design-skill

    微信公众号文章排版引擎,将 Markdown 转换为可直接粘贴到公众号编辑器的 HTML。主题风格从 references/theme-index.md 注册的自定义主题库中选取,自动章节编号、关键词下划线标记、引言卡片、目录导航、代码块、图片/GIF、作者签名。支持 Markdown / Word(.docx) / PDF / 纯文本输入(非 Markdown…

    3.9k GitHub starsUsed in 1 repo~2.2k tokens
    Documents & OfficeAuto-check passed
  • GenOffice Document CLI

    genspark-ai/genoffice

    Creates, converts, reads and edits real pptx, xlsx, docx and PDF files locally through the genoffice command line.

    8.9k GitHub stars~19k tokensUpdated today
    Documents & OfficeAuto-check passed
  • Harness Book Best Practice

    wquguru/harness-books

    Best practices for working on the Harness books repo. An agent skill from wquguru/harness-books.

    3.2k GitHub stars~4.1k tokensUpdated 5 mo ago
    Documents & OfficeAuto-check passed
  • Produces book-style Korean ebook PDFs from a topic or finished manuscript, with six design styles, real book parts and quality-check gates before output.

    314 GitHub starsUsed in 1 repo~1.7k tokens
    Documents & OfficeAuto-check passed
  • Instrument Data To Allotrope

    aws-samples/amazon-bedrock-agents-healthcare-lifesciences

    Official

    Convert laboratory instrument output files (PDF, CSV, Excel, TXT) to Allotrope Simple Model (ASM) JSON format or flattened 2D CSV.

    274 GitHub starsUsed in 2 repos~2.7k tokens
    Documents & OfficeAuto-check passed

More from aipoch/medical-research-skills

All 567 skills in this repo
  • Academic Poster Generator

    aipoch/medical-research-skills

    Complete workflow for generating academic research posters from PDF literature; use when you need to extract paper content from PDFs and produce a LaTeX-based poster…

    2k GitHub stars~2.2k tokensUpdated 21 days ago
    Auto-check passed
  • Diagnostic Study Quality Assessment Quadas

    aipoch/medical-research-skills

    Analyzes clinical diagnostic accuracy studies for bias using the QUADAS-2 tool.

    2k GitHub stars~1.4k tokensUpdated 21 days ago
    Auto-check passed
  • Exploratory Data Analysis

    aipoch/medical-research-skills

    Perform comprehensive exploratory data analysis on scientific data files across 200+ file formats.

    2k GitHub stars~3.7k tokensUpdated 21 days ago
    Auto-check passed
  • Iso Certification

    aipoch/medical-research-skills

    A toolkit for preparing ISO 13485:2016 certification documentation for medical device QMS.

    2k GitHub stars~1.8k tokensUpdated 21 days ago
    Auto-check passed
  • Journal Skills

    aipoch/medical-research-skills

    Recommends target journals for manuscript submission by analyzing the paper topic/abstract and the journal distribution of similar PubMed literature; use when users ask for journal…

    2k GitHub stars~1.7k tokensUpdated 21 days ago
    Auto-check passed
  • Latex Posters

    aipoch/medical-research-skills

    Creates academic-poster writing packages for LaTeX using beamerposter, tikzposter, or baposter.

    2k GitHub stars~1.3k tokensUpdated 21 days ago
    Auto-check passed

Questions about PDF Extract

What does PDF Extract do?

Extract PDF selectable text and full-page or segmented page images (including tables) into Markdown with per-page headings and image links; use when you need both readable text and page visuals for…. PDF Extract is an agent skill from aipoch/medical-research-skills. Extract PDF selectable text and full-page or segmented page images (including tables) into Markdown with per-page headings and image links; use when you need both readable text and page visuals for PPT creation, review, or analysis.

When should I use PDF Extract?

PDF Extract fits situations like: you need both readable text and page visuals for PPT creation; tasks that involve PDF.

How do I install PDF Extract in Claude Code?

Run `npx skills add aipoch/medical-research-skills --skill pdf-extract -a claude-code`. Or copy the skill folder (scientific-skills/Other/pdf-extract in aipoch/medical-research-skills) into .claude/skills/pdf-extract in your project. Claude Code loads it when a task matches its description.

How do I install PDF Extract in Codex?

Run `npx skills add aipoch/medical-research-skills --skill pdf-extract -a codex`. Or copy the skill folder (scientific-skills/Other/pdf-extract in aipoch/medical-research-skills) into .agents/skills/pdf-extract in your project. Codex loads it when a task matches its description.

Can I use PDF Extract in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add aipoch/medical-research-skills --skill pdf-extract -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/pdf-extract, .gemini/skills/pdf-extract, .github/skills/pdf-extract and .opencode/skills/pdf-extract in your project.

What does PDF Extract need to run?

Going by SKILL.md and its folder, PDF Extract needs Python for the scripts in its folder and the command-line tools its instructions call (python). Our summary lists: Python 3.

Does PDF Extract access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is PDF Extract safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does PDF Extract use?

PDF Extract is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does PDF Extract use?

About 1.8k tokens (SKILL.md is roughly 7.2k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to PDF Extract?

Skills that share tags, products or a category with PDF Extract: Markitdown (ImCa0/just-laws, 781 stars), Gzh Design (isjiamu/gzh-design-skill, 3.9k stars), GenOffice Document CLI (genspark-ai/genoffice, 8.9k stars) and Harness Book Best Practice (wquguru/harness-books, 3.2k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains PDF Extract?

aipoch (a GitHub organization) maintains it in aipoch/medical-research-skills, which has 1,974 GitHub stars. The repository holds 567 skills in this directory. The repository was last updated on September 17, 2026.

Source: aipoch/medical-research-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.