[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7BJR8QM56S5FFVG84S4M9TM":3,"skill-same:01M7BJR8QM56S5FFVG84S4M9TM":77},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":18,"linkOnly":19,"markdownContent":20,"markdownBody":21,"frontMatter":22,"refName":40,"commitSha":41,"skillDirectory":42,"forksCount":13,"repositoryHtmlUrl":43,"repositoryHomepageUrl":6,"ownerHtmlUrl":44,"ownerBlogUrl":45,"ownerDescription":6,"updatedAt":46,"install":47,"resources":60},"01M7BJR8QM56S5FFVG84S4M9TM","ocr-and-documents",null,"Extract text from PDFs\u002Fscans (pymupdf, marker-pdf).","darkmatter\u002Fhermes","darkmatter","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F17834193?v=4","01M7BHSAW99WRAMTSSHNHX73V0","01M7BHSAXDR4PY4NA2DY5PN6W8",0,"MIT","https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fdevbox\u002Fskills\u002Fproductivity\u002Focr-and-documents\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: ocr-and-documents\ndescription: \"Extract text from PDFs\u002Fscans (pymupdf, marker-pdf).\"\nversion: 2.3.0\nauthor: Hermes Agent\nlicense: MIT\nplatforms: [linux, macos, windows]\nmetadata:\n  hermes:\n    tags: [PDF, Documents, Research, Arxiv, Text-Extraction, OCR]\n    related_skills: [powerpoint]\n---\n\n# PDF & Document Extraction\n\nFor DOCX: use `python-docx` (parses actual document structure, far better than OCR).\nFor PPTX: see the `powerpoint` skill (uses `python-pptx` with full slide\u002Fnotes support).\nThis skill covers **PDFs and scanned documents**.\n\n## Step 1: Remote URL Available?\n\nIf the document has a URL, **always try `web_extract` first**:\n\n```\nweb_extract(urls=[\"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2402.03300\"])\nweb_extract(urls=[\"https:\u002F\u002Fexample.com\u002Freport.pdf\"])\n```\n\nThis handles PDF-to-markdown conversion via Firecrawl with no local dependencies.\n\nOnly use local extraction when: the file is local, web_extract fails, or you need batch processing.\n\n## Step 2: Choose Local Extractor\n\n| Feature | pymupdf (~25MB) | marker-pdf (~3-5GB) |\n|---------|-----------------|---------------------|\n| **Text-based PDF** | ✅ | ✅ |\n| **Scanned PDF (OCR)** | ❌ | ✅ (90+ languages) |\n| **Tables** | ✅ (basic) | ✅ (high accuracy) |\n| **Equations \u002F LaTeX** | ❌ | ✅ |\n| **Code blocks** | ❌ | ✅ |\n| **Forms** | ❌ | ✅ |\n| **Headers\u002Ffooters removal** | ❌ | ✅ |\n| **Reading order detection** | ❌ | ✅ |\n| **Images extraction** | ✅ (embedded) | ✅ (with context) |\n| **Images → text (OCR)** | ❌ | ✅ |\n| **EPUB** | ✅ | ✅ |\n| **Markdown output** | ✅ (via pymupdf4llm) | ✅ (native, higher quality) |\n| **Install size** | ~25MB | ~3-5GB (PyTorch + models) |\n| **Speed** | Instant | ~1-14s\u002Fpage (CPU), ~0.2s\u002Fpage (GPU) |\n\n**Decision**: Use pymupdf unless you need OCR, equations, forms, or complex layout analysis.\n\nIf the user needs marker capabilities but the system lacks ~5GB free disk:\n> \"This document needs OCR\u002Fadvanced extraction (marker-pdf), which requires ~5GB for PyTorch and models. Your system has [X]GB free. Options: free up space, provide a URL so I can use web_extract, or I can try pymupdf which works for text-based PDFs but not scanned documents or equations.\"\n\n---\n\n## pymupdf (lightweight)\n\n```bash\npip install pymupdf pymupdf4llm\n```\n\n**Via helper script**:\n```bash\npython scripts\u002Fextract_pymupdf.py document.pdf              # Plain text\npython scripts\u002Fextract_pymupdf.py document.pdf --markdown    # Markdown\npython scripts\u002Fextract_pymupdf.py document.pdf --tables      # Tables\npython scripts\u002Fextract_pymupdf.py document.pdf --images out\u002F # Extract images\npython scripts\u002Fextract_pymupdf.py document.pdf --metadata    # Title, author, pages\npython scripts\u002Fextract_pymupdf.py document.pdf --pages 0-4   # Specific pages\n```\n\n**Inline**:\n```bash\npython3 -c \"\nimport pymupdf\ndoc = pymupdf.open('document.pdf')\nfor page in doc:\n    print(page.get_text())\n\"\n```\n\n---\n\n## marker-pdf (high-quality OCR)\n\n```bash\n# Check disk space first\npython scripts\u002Fextract_marker.py --check\n\npip install marker-pdf\n```\n\n**Via helper script**:\n```bash\npython scripts\u002Fextract_marker.py document.pdf                # Markdown\npython scripts\u002Fextract_marker.py document.pdf --json         # JSON with metadata\npython scripts\u002Fextract_marker.py document.pdf --output_dir out\u002F  # Save images\npython scripts\u002Fextract_marker.py scanned.pdf                 # Scanned PDF (OCR)\npython scripts\u002Fextract_marker.py document.pdf --use_llm      # LLM-boosted accuracy\n```\n\n**CLI** (installed with marker-pdf):\n```bash\nmarker_single document.pdf --output_dir .\u002Foutput\nmarker \u002Fpath\u002Fto\u002Ffolder --workers 4    # Batch\n```\n\n---\n\n## Arxiv Papers\n\n```\n# Abstract only (fast)\nweb_extract(urls=[\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.03300\"])\n\n# Full paper\nweb_extract(urls=[\"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2402.03300\"])\n\n# Search\nweb_search(query=\"arxiv GRPO reinforcement learning 2026\")\n```\n\n## Split, Merge & Search\n\npymupdf handles these natively — use `execute_code` or inline Python:\n\n```python\n# Split: extract pages 1-5 to a new PDF\nimport pymupdf\ndoc = pymupdf.open(\"report.pdf\")\nnew = pymupdf.open()\nfor i in range(5):\n    new.insert_pdf(doc, from_page=i, to_page=i)\nnew.save(\"pages_1-5.pdf\")\n```\n\n```python\n# Merge multiple PDFs\nimport pymupdf\nresult = pymupdf.open()\nfor path in [\"a.pdf\", \"b.pdf\", \"c.pdf\"]:\n    result.insert_pdf(pymupdf.open(path))\nresult.save(\"merged.pdf\")\n```\n\n```python\n# Search for text across all pages\nimport pymupdf\ndoc = pymupdf.open(\"report.pdf\")\nfor i, page in enumerate(doc):\n    results = page.search_for(\"revenue\")\n    if results:\n        print(f\"Page {i+1}: {len(results)} match(es)\")\n        print(page.get_text(\"text\"))\n```\n\nNo extra dependencies needed — pymupdf covers split, merge, search, and text extraction in one package.\n\n---\n\n## Notes\n\n- `web_extract` is always first choice for URLs\n- pymupdf is the safe default — instant, no models, works everywhere\n- marker-pdf is for OCR, scanned docs, equations, complex layouts — install only when needed\n- Both helper scripts accept `--help` for full usage\n- marker-pdf downloads ~2.5GB of models to `~\u002F.cache\u002Fhuggingface\u002F` on first use\n- For Word docs: `pip install python-docx` (better than OCR — parses actual structure)\n- For PowerPoint: see the `powerpoint` skill (uses python-pptx)\n","# PDF & Document Extraction\n\nFor DOCX: use `python-docx` (parses actual document structure, far better than OCR).\nFor PPTX: see the `powerpoint` skill (uses `python-pptx` with full slide\u002Fnotes support).\nThis skill covers **PDFs and scanned documents**.\n\n## Step 1: Remote URL Available?\n\nIf the document has a URL, **always try `web_extract` first**:\n\n```\nweb_extract(urls=[\"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2402.03300\"])\nweb_extract(urls=[\"https:\u002F\u002Fexample.com\u002Freport.pdf\"])\n```\n\nThis handles PDF-to-markdown conversion via Firecrawl with no local dependencies.\n\nOnly use local extraction when: the file is local, web_extract fails, or you need batch processing.\n\n## Step 2: Choose Local Extractor\n\n| Feature | pymupdf (~25MB) | marker-pdf (~3-5GB) |\n|---------|-----------------|---------------------|\n| **Text-based PDF** | ✅ | ✅ |\n| **Scanned PDF (OCR)** | ❌ | ✅ (90+ languages) |\n| **Tables** | ✅ (basic) | ✅ (high accuracy) |\n| **Equations \u002F LaTeX** | ❌ | ✅ |\n| **Code blocks** | ❌ | ✅ |\n| **Forms** | ❌ | ✅ |\n| **Headers\u002Ffooters removal** | ❌ | ✅ |\n| **Reading order detection** | ❌ | ✅ |\n| **Images extraction** | ✅ (embedded) | ✅ (with context) |\n| **Images → text (OCR)** | ❌ | ✅ |\n| **EPUB** | ✅ | ✅ |\n| **Markdown output** | ✅ (via pymupdf4llm) | ✅ (native, higher quality) |\n| **Install size** | ~25MB | ~3-5GB (PyTorch + models) |\n| **Speed** | Instant | ~1-14s\u002Fpage (CPU), ~0.2s\u002Fpage (GPU) |\n\n**Decision**: Use pymupdf unless you need OCR, equations, forms, or complex layout analysis.\n\nIf the user needs marker capabilities but the system lacks ~5GB free disk:\n> \"This document needs OCR\u002Fadvanced extraction (marker-pdf), which requires ~5GB for PyTorch and models. Your system has [X]GB free. Options: free up space, provide a URL so I can use web_extract, or I can try pymupdf which works for text-based PDFs but not scanned documents or equations.\"\n\n---\n\n## pymupdf (lightweight)\n\n```bash\npip install pymupdf pymupdf4llm\n```\n\n**Via helper script**:\n```bash\npython scripts\u002Fextract_pymupdf.py document.pdf              # Plain text\npython scripts\u002Fextract_pymupdf.py document.pdf --markdown    # Markdown\npython scripts\u002Fextract_pymupdf.py document.pdf --tables      # Tables\npython scripts\u002Fextract_pymupdf.py document.pdf --images out\u002F # Extract images\npython scripts\u002Fextract_pymupdf.py document.pdf --metadata    # Title, author, pages\npython scripts\u002Fextract_pymupdf.py document.pdf --pages 0-4   # Specific pages\n```\n\n**Inline**:\n```bash\npython3 -c \"\nimport pymupdf\ndoc = pymupdf.open('document.pdf')\nfor page in doc:\n    print(page.get_text())\n\"\n```\n\n---\n\n## marker-pdf (high-quality OCR)\n\n```bash\n# Check disk space first\npython scripts\u002Fextract_marker.py --check\n\npip install marker-pdf\n```\n\n**Via helper script**:\n```bash\npython scripts\u002Fextract_marker.py document.pdf                # Markdown\npython scripts\u002Fextract_marker.py document.pdf --json         # JSON with metadata\npython scripts\u002Fextract_marker.py document.pdf --output_dir out\u002F  # Save images\npython scripts\u002Fextract_marker.py scanned.pdf                 # Scanned PDF (OCR)\npython scripts\u002Fextract_marker.py document.pdf --use_llm      # LLM-boosted accuracy\n```\n\n**CLI** (installed with marker-pdf):\n```bash\nmarker_single document.pdf --output_dir .\u002Foutput\nmarker \u002Fpath\u002Fto\u002Ffolder --workers 4    # Batch\n```\n\n---\n\n## Arxiv Papers\n\n```\n# Abstract only (fast)\nweb_extract(urls=[\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2402.03300\"])\n\n# Full paper\nweb_extract(urls=[\"https:\u002F\u002Farxiv.org\u002Fpdf\u002F2402.03300\"])\n\n# Search\nweb_search(query=\"arxiv GRPO reinforcement learning 2026\")\n```\n\n## Split, Merge & Search\n\npymupdf handles these natively — use `execute_code` or inline Python:\n\n```python\n# Split: extract pages 1-5 to a new PDF\nimport pymupdf\ndoc = pymupdf.open(\"report.pdf\")\nnew = pymupdf.open()\nfor i in range(5):\n    new.insert_pdf(doc, from_page=i, to_page=i)\nnew.save(\"pages_1-5.pdf\")\n```\n\n```python\n# Merge multiple PDFs\nimport pymupdf\nresult = pymupdf.open()\nfor path in [\"a.pdf\", \"b.pdf\", \"c.pdf\"]:\n    result.insert_pdf(pymupdf.open(path))\nresult.save(\"merged.pdf\")\n```\n\n```python\n# Search for text across all pages\nimport pymupdf\ndoc = pymupdf.open(\"report.pdf\")\nfor i, page in enumerate(doc):\n    results = page.search_for(\"revenue\")\n    if results:\n        print(f\"Page {i+1}: {len(results)} match(es)\")\n        print(page.get_text(\"text\"))\n```\n\nNo extra dependencies needed — pymupdf covers split, merge, search, and text extraction in one package.\n\n---\n\n## Notes\n\n- `web_extract` is always first choice for URLs\n- pymupdf is the safe default — instant, no models, works everywhere\n- marker-pdf is for OCR, scanned docs, equations, complex layouts — install only when needed\n- Both helper scripts accept `--help` for full usage\n- marker-pdf downloads ~2.5GB of models to `~\u002F.cache\u002Fhuggingface\u002F` on first use\n- For Word docs: `pip install python-docx` (better than OCR — parses actual structure)\n- For PowerPoint: see the `powerpoint` skill (uses python-pptx)\n",{"name":5,"author":23,"license":14,"version":24,"metadata":25,"platforms":36,"description":7},"Hermes Agent","2.3.0",{"hermes":26},{"tags":27,"related_skills":34},[28,29,30,31,32,33],"PDF","Documents","Research","Arxiv","Text-Extraction","OCR",[35],"powerpoint",[37,38,39],"linux","macos","windows","main","81189f70e1089f9b3a944ffc480e6887efd831b9","devbox\u002Fskills\u002Fproductivity\u002Focr-and-documents","https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes","https:\u002F\u002Fgithub.com\u002Fdarkmatter","dm.sh","2026-09-14 08:11:52",{"source":8,"skillName":5,"commands":48,"prompt":58,"zipAvailable":59},[49,52,55],{"tool":50,"command":51},"npx","npx skills add darkmatter\u002Fhermes --skill ocr-and-documents",{"tool":53,"command":54},"bunx","bunx skills add darkmatter\u002Fhermes --skill ocr-and-documents",{"tool":56,"command":57},"pnpm","pnpm dlx skills add darkmatter\u002Fhermes --skill ocr-and-documents","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fdevbox\u002Fskills\u002Fproductivity\u002Focr-and-documents\u002FSKILL.md",true,[61,67,73],{"path":62,"resourceType":63,"resourceTypeDesc":64,"sizeBytes":65,"sourceHtmlUrl":66},"DESCRIPTION.md","REFERENCE","参考文档",147,"https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fdevbox\u002Fskills\u002Fproductivity\u002Focr-and-documents\u002FDESCRIPTION.md",{"path":68,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":71,"sourceHtmlUrl":72},"scripts\u002Fextract_marker.py","SCRIPT","脚本",3034,"https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fdevbox\u002Fskills\u002Fproductivity\u002Focr-and-documents\u002Fscripts\u002Fextract_marker.py",{"path":74,"resourceType":69,"resourceTypeDesc":70,"sizeBytes":75,"sourceHtmlUrl":76},"scripts\u002Fextract_pymupdf.py",3132,"https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fdevbox\u002Fskills\u002Fproductivity\u002Focr-and-documents\u002Fscripts\u002Fextract_pymupdf.py",[78,85,92,99,106,113],{"skillNo":79,"name":80,"nameZh":6,"description":81,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":82,"categories":83,"keywords":84,"publishedAt":18},"01M7BMC2PYBVXM6FQEZMBQZB4G","plan","Write a markdown plan to .hermes\u002Fplans\u002F; no execution.","https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fplan\u002FSKILL.md",[],[],{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":18},"01M7BMBSEKDVQ09Z666RCWT7BR","monorepo-fleet-sync","Sync docs and configs when a Flue monorepo fleet changes.","https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Fmonorepo-fleet-sync\u002FSKILL.md",[],[],{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":18},"01M7BMBNWFJT2TJZ2AKA64GEV9","inspecting-hermes-desktop-dom","Read the live Hermes desktop DOM\u002FCSS over CDP.","https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fskills\u002Fsoftware-development\u002Finspecting-hermes-desktop-dom\u002FSKILL.md",[],[],{"skillNo":100,"name":101,"nameZh":6,"description":102,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":103,"categories":104,"keywords":105,"publishedAt":18},"01M7BMAZM4VJ97K7JD0FDN58M8","grounded-citations","Ground answers and documents in cited, verifiable sources.","https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fgrounded-citations\u002FSKILL.md",[],[],{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":18},"01M7BMATPEDZ4BPP67Y4ZS0BMM","competitor-news-monitor","Watch named companies for material news; cited digests.","https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fcompetitor-news-monitor\u002FSKILL.md",[],[],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":18},"01M7BMAQZV7YFA2SFPT7HCVCTX","blocked-page-recovery","Recover blocked\u002Fpaywalled\u002FWAF'd pages via fallbacks.","https:\u002F\u002Fgithub.com\u002Fdarkmatter\u002Fhermes\u002Fblob\u002Fmain\u002Fskills\u002Fresearch\u002Fblocked-page-recovery\u002FSKILL.md",[],[]]