[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7A3WVR526DQW51S6DF1WKY0":3,"skill-same:01M7A3WVR526DQW51S6DF1WKY0":80},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":41,"commitSha":42,"skillDirectory":43,"forksCount":44,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M7A3WVR526DQW51S6DF1WKY0","ocr-and-documents",null,"Extract text from PDFs\u002Fscans (pymupdf, marker-pdf).","diegojcn\u002Fagent-skill-pack","diegojcn","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F39829656?v=4","01M79YWFWBS7GQ1NC0FRSWE0QF","Diego Neves","01M79YWFWX7K7R5N28V61XYR6B",2,"MIT","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\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\nlicense: MIT\nplatforms: [linux, macos, windows]\nmetadata:\n    tags: [PDF, Documents, Research, Arxiv, Text-Extraction, OCR]\n    related_skills: [pdf, docx, powerpoint]\n---\n\n# PDF & Document Extraction\n\nFor DOCX: see the `docx` skill (create\u002Fedit) or use `python-docx` for structured reads.\nFor PPTX: see the `powerpoint` skill (full create\u002Fread\u002Fedit support).\nFor PDF manipulation (merge, split, forms, watermarks, creation): see the `pdf` skill.\nThis skill covers **text extraction from 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: see the `docx` skill (create\u002Fedit) or use `python-docx` for structured reads.\nFor PPTX: see the `powerpoint` skill (full create\u002Fread\u002Fedit support).\nFor PDF manipulation (merge, split, forms, watermarks, creation): see the `pdf` skill.\nThis skill covers **text extraction from 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,"license":15,"version":24,"metadata":25,"platforms":37,"description":7},"2.3.0",{"tags":26,"related_skills":33},[27,28,29,30,31,32],"PDF","Documents","Research","Arxiv","Text-Extraction","OCR",[34,35,36],"pdf","docx","powerpoint",[38,39,40],"linux","macos","windows","main","96f1c49829cef14a9744366f020b54c27ce1e8fc","productivity\u002Focr-and-documents",0,"https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack","https:\u002F\u002Fgithub.com\u002Fdiegojcn","https:\u002F\u002Fbdconsult.net.br\u002F","Just a guy who believes anything is possible to do or learn.","2026-08-01 20:29:22",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add diegojcn\u002Fagent-skill-pack --skill ocr-and-documents",{"tool":56,"command":57},"bunx","bunx skills add diegojcn\u002Fagent-skill-pack --skill ocr-and-documents",{"tool":59,"command":60},"pnpm","pnpm dlx skills add diegojcn\u002Fagent-skill-pack --skill ocr-and-documents","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Fproductivity\u002Focr-and-documents\u002FSKILL.md",true,[64,70,76],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},"DESCRIPTION.md","REFERENCE","参考文档",147,"https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Fproductivity\u002Focr-and-documents\u002FDESCRIPTION.md",{"path":71,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":74,"sourceHtmlUrl":75},"scripts\u002Fextract_marker.py","SCRIPT","脚本",3034,"https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Fproductivity\u002Focr-and-documents\u002Fscripts\u002Fextract_marker.py",{"path":77,"resourceType":72,"resourceTypeDesc":73,"sizeBytes":78,"sourceHtmlUrl":79},"scripts\u002Fextract_pymupdf.py",3132,"https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Fproductivity\u002Focr-and-documents\u002Fscripts\u002Fextract_pymupdf.py",[81,89,96,103,112,120],{"skillNo":82,"name":83,"nameZh":6,"description":84,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":85,"licenseFileUrl":6,"sourceHtmlUrl":86,"categories":87,"keywords":88,"publishedAt":19},"01M7A5F6060M1CMYXA32MAB5YK","clarity-gate","Pre-ingestion verification for epistemic quality in RAG systems. Ensures documents are properly qualified before entering knowledge bases. Produces CGD (Clarity-Gated Documents) and validates SOT (Source of Truth) files.","CC-BY-4.0","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Fworkflow\u002Fclarity-gate\u002FSKILL.md",[],[],{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":19},"01M7A5B3X23ME7CTA3B29C18EN","skill-check","Validate Claude Code skills against the agentskills specification. Catches structural, semantic, and naming issues before users do.","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Ftooling\u002Fskill-check\u002FSKILL.md",[],[],{"skillNo":97,"name":98,"nameZh":6,"description":99,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":100,"categories":101,"keywords":102,"publishedAt":19},"01M7A5B06YPKDW1NQQ1185MME5","peon-ping-use","Set which voice pack (character voice) plays for the current chat session. Automatically enables session_override rotation mode if not already set. Use when user wants a specific character voice like GLaDOS, Peon, or Kerrigan for this conversation.","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Ftooling\u002Fpeon-ping-use\u002FSKILL.md",[],[],{"skillNo":104,"name":105,"nameZh":6,"description":106,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":108,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":19},"01M7A5A24ANPXAK25W1BZB18TX","mcp-builder","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate exte...","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Ftooling\u002Fmcp-builder\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Ftooling\u002Fmcp-builder\u002FSKILL.md",[],[],{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":107,"licenseFileUrl":116,"sourceHtmlUrl":117,"categories":118,"keywords":119,"publishedAt":19},"01M7A553V4A3J4YKMCE7PYQX8X","webapp-testing","Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browse...","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fwebapp-testing\u002FLICENSE.txt","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Fsoftware-development\u002Fwebapp-testing\u002FSKILL.md",[],[],{"skillNo":121,"name":122,"nameZh":6,"description":123,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":124,"categories":125,"keywords":126,"publishedAt":19},"01M7A53PZ7PJEMS2YVPJW3XN44","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002Fdiegojcn\u002Fagent-skill-pack\u002Fblob\u002Fmain\u002Fsoftware-development\u002Ftest-driven-development\u002FSKILL.md",[],[]]