[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KJD8F4S5XXXZCERHDR0YAG":3,"skill-same:01M6KJD8F4S5XXXZCERHDR0YAG":64},{"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":22,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":13,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":42,"updatedAt":43,"install":44,"resources":57},"01M6KJD8F4S5XXXZCERHDR0YAG","pdf-text-extraction",null,"Extract text from PDFs using shell tools when read_file fails","AG064\u002FOpenSpace","AG064","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F184930299?v=4","01M6KHVFG7TB73NHX3RDYSTMH2","01M6KHVFMM7XA2PZA9Z83PHS3V",0,"MIT","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31],"PDF","extraction","text","pdf text extraction","file","Tools","shell","read","extract","2026-11-10 10:12:30",false,"---\nname: pdf-text-extraction\ndescription: Extract text from PDFs using shell tools when read_file fails\n---\n\n# PDF Text Extraction (Fallback Method)\n\n## When to Use This Skill\n\nUse this skill when `read_file` with `filetype='pdf'`:\n- Returns binary image data instead of text\n- Produces errors or incomplete content\n- Fails to extract structured data reliably\n\nThe built-in PDF handler is unreliable for structured text extraction. Shell-based tools provide more robust alternatives.\n\n## Available Methods\n\n### Method 1: pdftotext (Recommended)\n\n```bash\n# Extract text from PDF to stdout\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf -\n\n# Extract text to a file\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf output.txt\n\n# Preserve layout (maintains spacing\u002Fstructure)\npdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf output.txt\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"pdftotext -layout \u002Fpath\u002Fto\u002Fdocument.pdf -\"\n```\n\n### Method 2: pdfinfo (Metadata)\n\n```bash\n# Get PDF metadata (pages, author, creation date, etc.)\npdfinfo \u002Fpath\u002Fto\u002Ffile.pdf\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"pdfinfo \u002Fpath\u002Fto\u002Fdocument.pdf\"\n```\n\n### Method 3: Python with PyMuPDF (fitz)\n\n```python\nimport fitz  # PyMuPDF\n\ndoc = fitz.open(\"\u002Fpath\u002Fto\u002Ffile.pdf\")\ntext = \"\"\nfor page in doc:\n    text += page.get_text()\ndoc.close()\nprint(text)\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"python3 -c \\\"import fitz; doc=fitz.open('file.pdf'); print(''.join(p.get_text() for p in doc))\\\"\"\n```\n\n### Method 4: Python with pdfplumber (Tables)\n\n```python\nimport pdfplumber\n\nwith pdfplumber.open(\"\u002Fpath\u002Fto\u002Ffile.pdf\") as pdf:\n    for page in pdf.pages:\n        text = page.extract_text()\n        tables = page.extract_tables()  # For tabular data\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"python3 -c \\\"import pdfplumber; pdf=pdfplumber.open('file.pdf'); print(''.join(p.extract_text() or '' for p in pdf.pages))\\\"\"\n```\n\n## Workflow\n\n1. **Try pdftotext first** - Fastest and most reliable for plain text\n   ```bash\n   run_shell command=\"pdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf -\"\n   ```\n\n2. **If pdftotext unavailable, check for Python libraries**\n   ```bash\n   run_shell command=\"python3 -c \\\"import fitz; print('PyMuPDF available')\\\"\"\n   ```\n\n3. **For table\u002Fstructured data, use pdfplumber**\n   ```bash\n   run_shell command=\"python3 -c \\\"import pdfplumber; ...\\\"\"\n   ```\n\n4. **Verify extraction succeeded** - Check output contains readable text, not binary data\n\n## Installation Notes\n\nIf tools are not available:\n```bash\n# Ubuntu\u002FDebian\napt-get install poppler-utils  # pdftotext, pdfinfo\n\n# Install Python libraries\npip install pymupdf pdfplumber\n```\n\n## Anti-Patterns to Avoid\n\n- Do NOT rely solely on `read_file` with `filetype='pdf'` for critical text extraction\n- Do NOT assume PDF text is in any particular order - verify extracted content\n- Do NOT use image-based extraction unless the PDF is scanned (use OCR instead)\n\n## Example: Complete Extraction Pattern\n\n```bash\n# Step 1: Try pdftotext\nRESULT=$(pdftotext -layout \u002Fpath\u002Fto\u002Fform.pdf - 2>\u002Fdev\u002Fnull)\n\n# Step 2: Verify we got text, not error\nif [ -z \"$RESULT\" ]; then\n    # Fallback to Python\n    RESULT=$(python3 -c \"import fitz; doc=fitz.open('\u002Fpath\u002Fto\u002Fform.pdf'); print(''.join(p.get_text() for p in doc))\")\nfi\n\n# Step 3: Use extracted text\necho \"$RESULT\"\n```","# PDF Text Extraction (Fallback Method)\n\n## When to Use This Skill\n\nUse this skill when `read_file` with `filetype='pdf'`:\n- Returns binary image data instead of text\n- Produces errors or incomplete content\n- Fails to extract structured data reliably\n\nThe built-in PDF handler is unreliable for structured text extraction. Shell-based tools provide more robust alternatives.\n\n## Available Methods\n\n### Method 1: pdftotext (Recommended)\n\n```bash\n# Extract text from PDF to stdout\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf -\n\n# Extract text to a file\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf output.txt\n\n# Preserve layout (maintains spacing\u002Fstructure)\npdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf output.txt\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"pdftotext -layout \u002Fpath\u002Fto\u002Fdocument.pdf -\"\n```\n\n### Method 2: pdfinfo (Metadata)\n\n```bash\n# Get PDF metadata (pages, author, creation date, etc.)\npdfinfo \u002Fpath\u002Fto\u002Ffile.pdf\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"pdfinfo \u002Fpath\u002Fto\u002Fdocument.pdf\"\n```\n\n### Method 3: Python with PyMuPDF (fitz)\n\n```python\nimport fitz  # PyMuPDF\n\ndoc = fitz.open(\"\u002Fpath\u002Fto\u002Ffile.pdf\")\ntext = \"\"\nfor page in doc:\n    text += page.get_text()\ndoc.close()\nprint(text)\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"python3 -c \\\"import fitz; doc=fitz.open('file.pdf'); print(''.join(p.get_text() for p in doc))\\\"\"\n```\n\n### Method 4: Python with pdfplumber (Tables)\n\n```python\nimport pdfplumber\n\nwith pdfplumber.open(\"\u002Fpath\u002Fto\u002Ffile.pdf\") as pdf:\n    for page in pdf.pages:\n        text = page.extract_text()\n        tables = page.extract_tables()  # For tabular data\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"python3 -c \\\"import pdfplumber; pdf=pdfplumber.open('file.pdf'); print(''.join(p.extract_text() or '' for p in pdf.pages))\\\"\"\n```\n\n## Workflow\n\n1. **Try pdftotext first** - Fastest and most reliable for plain text\n   ```bash\n   run_shell command=\"pdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf -\"\n   ```\n\n2. **If pdftotext unavailable, check for Python libraries**\n   ```bash\n   run_shell command=\"python3 -c \\\"import fitz; print('PyMuPDF available')\\\"\"\n   ```\n\n3. **For table\u002Fstructured data, use pdfplumber**\n   ```bash\n   run_shell command=\"python3 -c \\\"import pdfplumber; ...\\\"\"\n   ```\n\n4. **Verify extraction succeeded** - Check output contains readable text, not binary data\n\n## Installation Notes\n\nIf tools are not available:\n```bash\n# Ubuntu\u002FDebian\napt-get install poppler-utils  # pdftotext, pdfinfo\n\n# Install Python libraries\npip install pymupdf pdfplumber\n```\n\n## Anti-Patterns to Avoid\n\n- Do NOT rely solely on `read_file` with `filetype='pdf'` for critical text extraction\n- Do NOT assume PDF text is in any particular order - verify extracted content\n- Do NOT use image-based extraction unless the PDF is scanned (use OCR instead)\n\n## Example: Complete Extraction Pattern\n\n```bash\n# Step 1: Try pdftotext\nRESULT=$(pdftotext -layout \u002Fpath\u002Fto\u002Fform.pdf - 2>\u002Fdev\u002Fnull)\n\n# Step 2: Verify we got text, not error\nif [ -z \"$RESULT\" ]; then\n    # Fallback to Python\n    RESULT=$(python3 -c \"import fitz; doc=fitz.open('\u002Fpath\u002Fto\u002Fform.pdf'); print(''.join(p.get_text() for p in doc))\")\nfi\n\n# Step 3: Use extracted text\necho \"$RESULT\"\n```",{"name":5,"description":7},"main","ff671ef61ed6587c49bd54c81cdc751c0b99e363","gdpval_bench\u002Fskills\u002Fpdf-text-extraction","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace","https:\u002F\u002Fgithub.com\u002FAG064","AG064, E.Mi.\r\n\r\nA person who thinks all the time, yet all they have to think about is nothing. I want to improve the world and work on open source projects","2026-10-08 06:53:48",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add AG064\u002FOpenSpace --skill pdf-text-extraction",{"tool":50,"command":51},"bunx","bunx skills add AG064\u002FOpenSpace --skill pdf-text-extraction",{"tool":53,"command":54},"pnpm","pnpm dlx skills add AG064\u002FOpenSpace --skill pdf-text-extraction","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction\u002FSKILL.md",true,[58],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},".skill_id","OTHER","其他",33,"https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction\u002F.skill_id",[65,88,104,112,142,158],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":32},"01M6KKMPWA0B5SCCH766F8M5EA","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[72,73,74,75,76,77,78,79,80,81,82,83,84,85,27,86,87],"write special chars ts check","check","write","filters","Existing","type-checking","for","errors","script","output","type","files","only","template","python","typescript",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":32},"01M6KKMJXVBNVEY3TRK055F4A7","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[95,96,74,85,97,30,27,86,98,99,100,101,102,78,80,103],"readback","write special chars readback","cleanup","scripts","verification","via","post","helper","with",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"publishedAt":32},"01M6KKMEGX9M9NC105J0W3Q5B9","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[74,111,86,78,100,85,29,27,80],"write special chars heredoc",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":123,"publishedAt":32},"01M6KKM8EJ2AATVHZBNB916WT0","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[118],{"categoryNo":119,"categoryName":120,"taxonomyType":121,"taxonomyTypeDesc":122},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[124,125,126,127,87,128,129,130,131,132,78,133,134,135,136,137,138,139,140,141],"reference","worldmonitor","worldmonitor reference","dashboard","css","architecture","extracting","hierarchy","source","layer","panel","patterns","edge functions","integrations","open","api","data","scheduler",{"skillNo":143,"name":144,"nameZh":6,"description":145,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":146,"categories":147,"keywords":148,"publishedAt":32},"01M6KKM39PHYK627F19GE2B9XN","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[149,150,151,152,78,153,103,154,155,156,157],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":9,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":32},"01M6KKKY7T2P61Y0JH54CDEJKQ","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FAG064\u002FOpenSpace\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[165,166,167,168,169,170,27,171,172,173],"directory","verify","structure","verify directory structure","access","first","issues","diagnose","file access"]