pdf-extract — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited pdf-extract (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Extract PDF content to clean, organized 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.
python /mnt/skills/user/pdf-extract/scripts/extract_pdf.py \
/mnt/user-data/uploads/{filename}.pdf \
/home/claude/extracted/Options:
| Option | Description |
|---|---|
--pages 1-10 | Extract specific page range |
--method pymupdf4llm | Force primary extractor (better formatting) |
--method pymupdf | Force fallback (more reliable for scanned PDFs) |
--min-image-size 100 | Skip 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)Read the extracted markdown:
cat /home/claude/extracted/{filename}.mdCheck YAML frontmatter for:
extraction_method — Which extractor was usedtotal_pages — Document lengthhas_outline — Bookmarks exist (helps with structure)total_images — Number of imagesIdentify issues requiring cleanup:
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:
Load references as needed for pattern recognition:
Repeated elements & source-specific patterns: See cleanup-patterns.md
Text fragmentation: See sentence-reflow.md
Table issues: See table-formatting.md
Image handling: See image-handling.md
While writing the clean output, apply these formatting principles:
# → ## → ### consistentlyConvert markers to proper markdown:
<!-- Before -->
<!-- IMAGE: images/page003_img001.png (450x280px) -->
<!-- After -->
View each image with view tool to write accurate alt text.
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]
EOFOr use the create_file tool to write the clean content directly.
mkdir -p /mnt/user-data/outputs/images/
cp -r /home/claude/extracted/images/* /mnt/user-data/outputs/images/Include:
images/ folder requirement)| Error | Cause | Solution |
|---|---|---|
| "File not found" | Wrong path | Check /mnt/user-data/uploads/ |
| "Invalid PDF header" | Not a PDF | Inform user file is invalid |
| "Extraction failed" | Protected/corrupted | Try --method pymupdf |
| Empty output | Scanned PDF | Inform user, suggest OCR |
If extraction_method shows pymupdf (fallback) with minimal text:
Consider extracting in ranges:
python extract_pdf.py doc.pdf ./out1/ --pages 1-25
python extract_pdf.py doc.pdf ./out2/ --pages 26-50Verify reading order makes sense. pymupdf4llm handles columns reasonably but may interleave incorrectly.
Final markdown structure:
# {Document Title}
## {First Section}
{Clean content...}
## {Second Section}
{Clean content...}
---
*Source: {filename}.pdf | Extracted: {date}*~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.