For AI agents#
ocracy ships artifacts for coding agents alongside its code. This page lists
them, says where each lives in the repository, and points at the
machine-readable copies of this documentation.
Skills#
Skills are folders holding a SKILL.md (the Agent Skills format): a description that tells an agent when to use it and a body with the procedure. Install one into your agent with gh skill (any host: --agent claude-code, copilot, cursor, codex, gemini), or use the copy bundled in the wheel.
ocracy#
Extract text from images, scans, screenshots, photos, or PDFs using the ocracy package — one uniform interface over many OCR engines (Tesseract, EasyOCR, PaddleOCR, Apple Vision, Google Vision, AWS Textract, Azure, Mathpix, Claude/GPT vision, …). Use when the user wants to “extract/read/get the text from this image/scan/screenshot/photo/PDF”, “OCR this”, “image to text”, “transcribe handwriting”, “pull the text out of a picture”, “read a receipt/ form/document”, or “turn an equation image into LaTeX”. Covers the one-line call, choosing/installing a backend, reading the result (text + boxes + confidence), languages, and the ocracy CLI. For picking the best engine for a need, see ocracy-choose-backend; for adding a new engine, see ocracy-add-backend.
gh skill install thorwhalen/ocracy ocracy --agent claude-code
Source: ocracy/data/skills/ocracy (bundled with the pip package).
ocracy-add-backend#
Build a new OCR backend façade for the ocracy package — wrap any engine or service (Tesseract, EasyOCR, PaddleOCR, Google Vision, AWS Textract, Mathpix, a VLM, …) behind ocracy’s uniform ocr() interface. Use when the user wants to “add a backend to ocracy”, “wrap _read, normalizing output to OcrResult, handling credentials, packaging the extra, and validating end to end.
gh skill install thorwhalen/ocracy ocracy-add-backend --agent claude-code
Source: ocracy/data/skills/ocracy-add-backend (bundled with the pip package).
ocracy-choose-backend#
Choose or compare OCR engines/services using ocracy’s data-driven ledger (64 researched backends). Use when the user asks “which OCR should I use”, “what’s the best OCR for <language / handwriting / math / tables / receipts>”, “compare OCR engines/services”, “local vs cloud OCR”, “cheapest OCR API”, “free offline OCR”, “OCR options”, or wants to weigh accuracy / price / privacy / language coverage before committing to a backend. Filters the ledger by feature and explains the trade-offs. For actually running OCR see ocracy; for adding a new engine see ocracy-add-backend.
gh skill install thorwhalen/ocracy ocracy-choose-backend --agent claude-code
Source: ocracy/data/skills/ocracy-choose-backend (bundled with the pip package).
ocracy-install-backend#
Install / set up an ocracy OCR backend that isn’t available yet — handle the heavy or awkward installs (PaddleOCR’s framework, Torch-based EasyOCR/TrOCR/ pix2tex, Tesseract’s system binary, GPU vs CPU wheels, first-run model-weight downloads, remote-API credentials). Use when ocracy raises “Backend X requires: pip install …”, an ImportError for an OCR engine, when the user says “install ocracy.requirements(), ocracy.check(), ocracy.doctor(), and ocracy.install(). To pick a backend first see ocracy-choose-backend; to use one see ocracy.
gh skill install thorwhalen/ocracy ocracy-install-backend --agent claude-code
Source: ocracy/data/skills/ocracy-install-backend (bundled with the pip package).
The bundled skills are also on disk after pip install ocracy, under the package’s data/skills/ directory; link them into an agent without network access with skill link-skills <that directory>.
Instruction files#
Files agents read before working in this repository.
CLAUDE.md: read by Claude Code
Machine-readable documentation#
This site publishes the same documentation in forms that fit an agent’s context window:
llms.txt: an index of every page with a one-line description (llms.txt format)ocracy.md: the whole documentation as one Markdown file<page>.html.md: a rendered Markdown twin of every page, advertised from each page’s<head>with<link rel="alternate" type="text/markdown">objects.inv: the Sphinx inventory: a symbol-to-URL index (sphobjinv convert plain objects.inv -)