/ac-document-gen:pdf-ocr <path-to-pdf>from ac-document-gen
Converts PDF files to markdown using GLM-OCR via Ollama locally. Renders each page to an image, runs OCR, and outputs clean markdown.
Ships in ac-document-gen. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Convert PDF files to markdown using local OCR. Each page is rendered to an image, processed through GLM-OCR running on Ollama, and the recognized text is assembled into a single markdown file.
Run these checks and report a status table. If any required dependency is missing, use AskUserQuestion to offer installation.
| Dependency | Check | Install |
|---|---|---|
| Ollama running | curl -sf http://127.0.0.1:11434/api/tags > /dev/null | Cannot auto-start. Tell user to start Ollama and stop. |
glm-ocr model | Check that Ollama tags response contains glm-ocr | ollama pull glm-ocr |
pdftoppm | which pdftoppm | brew install poppler |
pdfinfo | which pdfinfo | Comes with poppler |
sips | which sips | Built-in on macOS. Warn if missing. |
Check all five in a single Bash call:
echo "=== Ollama ===" && curl -sf http://127.0.0.1:11434/api/tags && echo "" && echo "=== pdftoppm ===" && which pdftoppm && echo "=== pdfinfo ===" && which pdfinfo && echo "=== sips ===" && which sips
Parse the output:
glm-ocr is not in the tags list: ask user if they want to pull it (ollama pull glm-ocr).pdftoppm or pdfinfo missing: ask user if they want to install poppler (brew install poppler).sips missing: warn user (built-in on macOS, no auto-install).If all checks pass, proceed to Phase 2.
Validate the argument is a path to an existing .pdf file. If no argument was provided, print usage and stop:
Usage:
/pdf-ocr <path-to-pdf>Converts a PDF to markdown using local GLM-OCR via Ollama.
Determine the output path: same directory as the PDF, same base name with .md extension.
Get the page count to decide foreground vs background execution:
pdfinfo "<pdf_path>" | grep "^Pages:"
python3 ${CLAUDE_PLUGIN_ROOT}/skills/pdf-ocr/scripts/pdf_ocr.py "<input.pdf>" "<output.md>"
timeout: 600000.After the script completes:
.md file to show a preview."Text Recognition:" — other prompts degrade quality<!-- Page N --> marker with --- separators between pages/tmp/claude/ocr_pages and cleaned up per-pageWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub alteredcraft/claude-code-plugins --plugin ac-document-gen3 skills in this plugin
/powerpointCreate professional PowerPoint presentations. Use when asked to "create a PowerPoint", "make a presentation", "build slides", or generate pptx files./qr-codeGenerate QR codes from URLs, text, or other data and save them as SVG, PNG, EPS, or PDF files. This skill should be used when the user asks to create, generate, or make a QR code for any content such as website URLs, text strings, WiFi credentials, contact info, or other data. Triggers include mentions of 'QR code', 'QR', 'barcode for a link', or requests to make a scannable code. Supports customization of colors, size, error correction level, and output format.Other plugins' skills for the same job