hashgraph-online/awesome-codex-plugins / plugins/alpoxdev/hypercore/skills/hyper-pdf
hyper-pdf
UnverifiedUse this skill when the user asks to read, extract from, or produce a PDF - text, tables, images, metadata, form fields, OCR of a scan, merge, split, rotate, watermark, encrypt, or a Korean contract, invoice, or report - and wants the result verified rather than assumed. Two generation paths with an explicit routing rule, a zero-dependency macOS runtime, and checks for font embedding, language tag, and structure tree. Do not use for Word or HWP documents, screenshots, slide decks, or numeric charts.
| File | Kind | Size |
|---|---|---|
| SKILL.ko.md | markdown | 14.9 KB |
| SKILL.md | skill md | 14.3 KB |
| assets/evals/hyper-pdf-cases.jsonl | other | 14.2 KB |
| assets/runtime/compose.js | script | 13.0 KB |
| assets/runtime/engine.js | script | 32.2 KB |
| assets/runtime/native.js | script | 35.4 KB |
| references/commands.ko.md | markdown | 9.9 KB |
| references/commands.md | markdown | 9.5 KB |
| references/layout-spec.ko.md | markdown | 8.2 KB |
| references/layout-spec.md | markdown | 7.6 KB |
| rules/accessibility.ko.md | markdown | 5.3 KB |
| rules/accessibility.md | markdown | 4.9 KB |
| rules/extraction.ko.md | markdown | 6.1 KB |
| rules/extraction.md | markdown | 5.6 KB |
| rules/html-to-pdf.ko.md | markdown | 6.6 KB |
| rules/html-to-pdf.md | markdown | 6.1 KB |
| rules/korean-typesetting.ko.md | markdown | 5.8 KB |
| rules/korean-typesetting.md | markdown | 5.5 KB |
| rules/ocr.ko.md | markdown | 4.0 KB |
| rules/ocr.md | markdown | 3.7 KB |
| rules/research-notes.ko.md | markdown | 8.1 KB |
| rules/research-notes.md | markdown | 7.9 KB |
| rules/verification.ko.md | markdown | 3.9 KB |
| rules/verification.md | markdown | 3.8 KB |
rules/ocr.md
View on GitHub# OCR on scanned pages
> A scanned page has pixels, not characters. OCR adds a text layer over those pixels; it does not repair them, and its accuracy is a property of the image, not of the engine.
## 1. When OCR applies
| Condition | Action |
|---|---|
| `check` reports `PAGE_NEEDS_OCR` | OCR the listed pages only |
| The page already has a text layer | Do not OCR; it doubles the layer and breaks search |
| A single word is unreadable in a page that has text | Not an OCR case; the source had no character there |
| The image is rotated or skewed | Still OCR-able; Vision handles modest skew, not a 20° rotation |
| The image is below roughly 150 DPI | Expect degraded accuracy; upscale or ask for a better scan |
## 2. Mechanism
```
engine.js ocr <pdf> --out OUT.pdf [--langs ko-KR,en-US] [--pages SPEC] [--work-dir DIR]
```
Per page: render at 2×, run Vision text recognition, then draw each recognized line in invisible render mode at the measured box. Invisible render mode (PDF text rendering mode 3) records glyph positions and characters with no ink, so the page looks identical and selection, search, and copy work.
| Choice | Why |
|---|---|
| Draw over the original, do not re-render the page | Re-drawing loses the original raster quality and changes the visual |
| One invisible line per recognized observation | Matches what a reader selects; one block per page does not |
| Font size derived from the observation height | Keeps the selection highlight roughly over the ink |
| Languages from `--langs` | Vision needs the script to select a model; a Korean page with only `en-US` returns garbage |
## 3. Accuracy and honesty
- Report `textCharacters` and `perPage[].observations`. Zero observations on a page that has ink means the recognition failed, not that the page was blank.
- Do not correct the recognized text silently. If the user wants a clean transcription, that is a separate pass, and the raw layer must stay as recognized so the original can be re-checked.
- Numbers, Korean resident registration numbers, and account numbers are where recognition fails most. On a financial document, read those fields against the image before shipping.
- A recognition rate is not a quality guarantee for the document. The only proof is opening the page and reading it.
## 4. After OCR
1. `check` again: `PAGE_NEEDS_OCR` should be gone for the processed pages.
2. `text` on a processed page: the strings must be plausible in the declared language.
3. `render` the same page: the visual must be unchanged. Invisible text that is visible means the render mode was not applied.
4. `.hyper-pdf-ocr` under the output directory holds the intermediate rasters. Delete it after verification; it is several times the size of the PDF.
## 5. What OCR cannot do
- It cannot restore a character that the scan destroyed. A smudged digit stays ambiguous.
- It cannot infer a table structure. Cell boundaries come from `tables` on the resulting text layer, with the same limits.
- It cannot prove the text is right. A user who needs legal certainty reads the image.
## Sources
> Checked 2026-11-13.
| Claim | Source |
|---|---|
| Vision text recognition and language selection | <https://developer.apple.com/documentation/vision/recognizing-text-in-images> |
| PDF text rendering mode 3 (invisible) | <https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf> (§9.3.6) |
| OCR accuracy dependence on scan resolution | <https://tesseract-ocr.github.io/tessdoc/ImproveQuality.html> (approach evidence; the implementation here uses Vision) |
### Evidence grade
`LOCAL` for the mechanism, flags, and outputs, run on this machine against a raster-only PDF. `SPEC` for the format-level rendering-mode claim.Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |