A Claude Code skill that automatically reads PDFs visually when text parsing fails.
Claude Code's WebFetch tool often fails to extract readable content from PDFs, especially:
- Image-based or scanned PDFs
- Graphics-heavy documents (created in Illustrator, etc.)
- PDFs with complex layouts
When this happens, you get garbled text or empty results.
This skill downloads the PDF and uses Claude's multimodal capabilities to read it visually, extracting the actual content from the rendered pages.
Copy the skill to your Claude Code skills directory:
# Create the skills directory if it doesn't exist
mkdir -p ~/.claude/skills/pdf-visual
# Copy the skill file
cp SKILL.md ~/.claude/skills/pdf-visual/SKILL.mdOr clone directly:
git clone https://github.com/elgabrielc/pdf-visual-skill.git
mkdir -p ~/.claude/skills
cp -r pdf-visual-skill/SKILL.md ~/.claude/skills/pdf-visual/The skill triggers automatically when PDF parsing fails. Just ask Claude to fetch a PDF:
Fetch this PDF and tell me what it says: https://example.com/document.pdf
If WebFetch fails to parse it, Claude will automatically invoke the skill.
# Basic usage
/pdf-visual https://example.com/document.pdf
# With a specific question
/pdf-visual https://example.com/manual.pdf "What are the installation steps?"
# Local file
/pdf-visual /path/to/local/file.pdf
# Local file with question
/pdf-visual /path/to/document.pdf "Summarize the key findings"- Automatic detection: Triggers when WebFetch fails on PDFs
- HTTP validation: Checks status codes and file types before reading
- Error handling: Reports download failures, invalid files, and suggests fixes
- Smart cleanup: Deletes temp files after successful reads, keeps them on errors
- Question support: Pass an optional prompt to focus on specific content
- Downloads the PDF to a temporary scratchpad directory
- Validates the download (HTTP status, file type check)
- Uses Claude's Read tool to visually inspect the PDF
- Extracts and summarizes the content
- Cleans up the temporary file
- Claude Code CLI
curl(for downloading)filecommand (for validation)
MIT License - see LICENSE
Issues and PRs welcome.
Gabriel Casalduc - Divergent Health Technologies