agentsclimarketplace

Pdf extract

Skill maaarcooo/agent-skills/archive/claude-ai/pdf-extract

Agent skills for Claude.ai, Claude Code, ChatGPT, and Codex, covering document processing, study tools, and cross-agent workflows.

Install
npx -y skills add maaarcooo/agent-skills --skill pdf-extract

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

2 things to look at

  • no licenseNo license file was found in the repository. Code published without one is not open source by default, so using it at work is a question for whoever answers licensing questions where you are.
  • 9 stars9 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Extract and clean PDF content to markdown format. Use when the user uploads a PDF file and wants to convert it to clean, readable markdown. Handles text extraction, image extraction, metadata capture, and intelligent content cleanup. Removes repeated footers, watermarks, page numbers, branding, and reorganizes fragmented content into coherent structure.

SKILL.md

6.2 KB, ~1.4k tokens by cl100k_base, as published. Nobody here has run it

PDF Content Extraction Skill

Extract PDF content to clean, organized markdown.

Workflow

  1. Extract — Run script to get raw content + metadata
  2. Analyse — Review for patterns and issues
  3. CleanManually remove noise (footers, watermarks, branding)
  4. Organise — Restructure fragmented content
  5. Output — Deliver clean markdown

Note: Only Step 1 uses a script. Steps 2–5 are performed manually by Claude reading and rewriting content. Do not write cleanup scripts.

Step 1: Extract

python /mnt/skills/user/pdf-extract/scripts/extract_pdf.py \
    /mnt/user-data/uploads/{filename}.pdf \
    /home/claude/extracted/

Options:

OptionDescription
--pages 1-10Extract specific page range
--method pymupdf4llmForce primary extractor (better formatting)
--method pymupdfForce fallback (more reliable for scanned PDFs)
--min-image-size 100Skip images smaller than 100px (filters icons)

Output:

/home/claude/extracted/
├── {filename}.md      # Raw markdown with YAML frontmatter
├── metadata.json      # Structured metadata
└── images/            # Extracted images (if any)

Step 2: Analyse

Read the extracted markdown:

cat /home/claude/extracted/{filename}.md

Check YAML frontmatter for:

  • extraction_method — Which extractor was used
  • total_pages — Document length
  • has_outline — Bookmarks exist (helps with structure)
  • total_images — Number of images

Identify issues requiring cleanup:

  • Repeated footers/headers on every page
  • Watermarks, branding, page numbers
  • Fragmented sentences across line breaks
  • Malformed tables
  • Image markers needing repositioning

Step 3: Clean

IMPORTANT: Manual cleanup only.

  • Do NOT write Python scripts to clean the content
  • Do NOT use sed, awk, or regex replacement commands
  • Do NOT copy-paste the raw content and run substitutions

Instead: Read the extracted content, understand it, then write a clean version from scratch, omitting the noise as you write.

Why manual? Each PDF has unique patterns. Claude makes better contextual decisions than automated rules — knowing what's noise vs. legitimate content, handling edge cases, and preserving meaning.

Process:

  1. Read through the extracted markdown completely
  2. Identify repeated noise (footers, headers, branding, page numbers)
  3. Note the actual content structure (sections, flow, key information)
  4. Write the clean output directly, skipping noise as you go

Load references as needed for pattern recognition:

Repeated elements & source-specific patterns: See cleanup-patterns.md

  • Use when: footers, headers, SME/PMT branding detected

Text fragmentation: See sentence-reflow.md

  • Use when: sentences split across lines or pages

Table issues: See table-formatting.md

  • Use when: tables have missing delimiters, broken structure

Image handling: See image-handling.md

  • Use when: document contains images to process

Step 4: Organise

While writing the clean output, apply these formatting principles:

Heading Hierarchy

  • Use ###### consistently
  • Don't skip levels
  • Remove redundant numbering if using markdown headers

Paragraph Flow

  • Single blank line between paragraphs
  • Remove orphan lines (single words alone)
  • Merge related short paragraphs

Image Placement

Convert markers to proper markdown:

<!-- Before -->
<!-- IMAGE: images/page003_img001.png (450x280px) -->

<!-- After -->
![Figure 1: Description](./images/page003_img001.png)

View each image with view tool to write accurate alt text.

Step 5: Output

Write Clean File

After reading and mentally processing the extracted content, write the clean markdown directly to a file:

# Write clean content to file (Claude creates this content)
cat > /mnt/user-data/outputs/{filename}_clean.md << 'EOF'
# Document Title

[Clean content goes here - written by Claude, not copied]

EOF

Or use the create_file tool to write the clean content directly.

Copy Images (if applicable)

mkdir -p /mnt/user-data/outputs/images/
cp -r /home/claude/extracted/images/* /mnt/user-data/outputs/images/

Quality Check

  • No repeated footers/headers
  • No standalone page numbers
  • No watermarks or branding
  • Sentences properly rejoined
  • Tables intact and readable
  • Images converted to markdown syntax
  • Heading hierarchy logical

Summary to User

Include:

  • Pages extracted
  • What was cleaned (types of noise removed)
  • Images included (remind about images/ folder requirement)
  • Any limitations noted

Error Handling

ErrorCauseSolution
"File not found"Wrong pathCheck /mnt/user-data/uploads/
"Invalid PDF header"Not a PDFInform user file is invalid
"Extraction failed"Protected/corruptedTry --method pymupdf
Empty outputScanned PDFInform user, suggest OCR

Special Cases

Scanned/Image PDFs

If extraction_method shows pymupdf (fallback) with minimal text:

  • PDF is likely scanned/image-based
  • Inform user OCR tools may be needed

Large Documents (50+ pages)

Consider extracting in ranges:

python extract_pdf.py doc.pdf ./out1/ --pages 1-25
python extract_pdf.py doc.pdf ./out2/ --pages 26-50

Multi-Column Layouts

Verify reading order makes sense. pymupdf4llm handles columns reasonably but may interleave incorrectly.

Output Format

Final markdown structure:

# {Document Title}

## {First Section}

{Clean content...}

## {Second Section}

{Clean content...}

---

*Source: {filename}.pdf | Extracted: {date}*

Gives 0 of the 12 instructions most pdf office docs skills give in ~1.4k tokens

Counted across 635 of the 690 authors here whose files we hold, read 2026-08-06

  • extract text using pdfplumberin 92 of 635, across 25 files
  • create PDFs using reportlabin 83 of 635, across 16 files
  • read FORMS.md to fill out PDF formsin 80 of 635, across 13 files
  • OCR scanned PDFs using pytesseractin 77 of 635, across 10 files
  • merge or split PDFs using qpdfin 70 of 635, across 3 files
  • use Excel formulas instead of hardcoded calculated valuesin 68 of 635, across 12 files
  • unpack edit xml and repack existing documentsin 63 of 635, across 8 files
  • document sources for hardcoded valuesin 61 of 635, across 9 files
  • write minimal python code without unnecessary commentsin 59 of 635, across 7 files
  • run the recalculation script after adding or modifying formulasin 58 of 635, across 6 files
  • fix all identified formula errors and recalculatein 58 of 635, across 6 files
  • format years as text stringsin 57 of 635, across 5 files

Said here and by no other author read

  • review extracted markdown for noise and fragmentation
  • clean content manually without writing scripts
  • use consistent heading hierarchy without skipping levels
  • convert image markers to proper markdown syntax
  • view each extracted image to write alt text
  • write cleaned markdown to the outputs directory

Grouped from the skills themselves: near-identical wordings counted once, and counted by distinct author, so one author publishing three of these counts once. Length counted with cl100k_base; the agent that loads this file may tokenize it differently.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.