documentationby taracodlabs
OCR and Document Text Extraction
taracodlabs/ocr-and-documents
Extract text from PDFs, images, scans, Word docs (Python)
What it changes
Passed 18 of 22 test cases with the skill, and 15 of 22 without it.
Without skill68%
With skill82%
Checks it passed that the model alone missed
- Imports Document from python-docx
- Slices the text string to the first 2000 characters
- Uses PIL ImageOps or ImageFilter modules for preprocessing
3 fixed15 passed either way4 still failing0 broke
- Pass-rate lift
- +14 pp
- Tokens
- +38%
- Agent turns
- 0%
- Response time
- -34%
Model gemini-3.6-flashMeasured 8/14/2026v118 of 22 cases passed with skill
See it in action
One of 3 test cases the skill fixed. Same model, same prompt, with and without the skill.
PromptWhen printing a quick preview of extracted text from a PDF in Python to avoid cluttering stdout, what character slice limit should be applied?
What was checked, without and with the skill| Checked | Without skill | With skill |
|---|
| Slices the text string to the first 2000 characters | Missed | Passed |
|---|
What's inside
The instructions your model reads when the skill loads.
SKILL.md115 linessingle file
OCR and Document Text Extraction
Extract readable text from PDFs, scanned images, and Word documents using Python libraries available in most environments. No cloud API required.
When to Use
- User wants to read text from a PDF file
- User wants to extract text from a scanned image or photo of a document
- User wants to read a
.docx Word document programmatically
- User wants to convert a multi-page document to plain text for analysis
- User wants to extract specific pages or sections from a PDF
How to Use
1. Extract text from a PDF (pymupdf — fastest)
import fitz # pip install pymupdf
doc = fitz.open("document.pdf")
text = "\n\n".join(page.get_text() for page in doc)
print(text[:2000]) # preview first 2000 chars
doc.close()
2. Extract text from a PDF (pdf-parse via Node.js)
// requires: npm install pdf-parse (already in DevOS dependencies)
const pdfParse = require('pdf-parse')
const fs = require('fs')
const data = await pdfParse(fs.readFileSync('document.pdf'))
console.log(data.text.slice(0, 2000))
console.log(`Pages: ${data.numpages}`)
3. OCR a scanned image (Tesseract)
Requires Tesseract installed: winget install UB-Mannheim.TesseractOCR
Track record
Benchmark
18 / 22
test cases passed, vs 15 / 22 without
Adoption
- Users
- 3
- Times used
- 8
Safety and source details
SkillSafety
✓ 3 of 3 passed✓Code scan15 of 15 checks clean
0 critical · 0 warning · 0 info — scanner v4 — 8/3/2026
View 15 scanner checks
live_secretremote_code_executionreverse_shelldata_exfiltrationssrf_metadataagent_snoopinganti_refusaldestructive_commandsobfuscated_unicodeunicode_homoglyphopaque_blobsuspicious_urltool_overreachtrigger_abuseprompt_injection_phrasing
✓IntentSafe
LLM judge · does the skill do what it claims
✓ContentClean
LLM judge · policy & harmful-content review
Source
ImportedLicense Apache-2.0Imported 8/3/2026Version v1