[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBSWB0PYSFQW91K877Q880":3,"skill-same:01M6XBSWB0PYSFQW91K877Q880":64},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":13,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":43,"install":44,"resources":57},"01M6XBSWB0PYSFQW91K877Q880","pdf-text-extraction",null,"Extract text from PDFs using shell tools when read_file fails","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\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,32],"PDF","extraction","text","pdf text extraction","file","Tools","shell","read","extract","when","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","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fpdf-text-extraction","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction",{"tool":50,"command":51},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction",{"tool":53,"command":54},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction\u002F.skill_id",[65,89,105,113,143,159],{"skillNo":66,"name":67,"nameZh":6,"description":68,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":69,"categories":70,"keywords":71,"publishedAt":33},"01M6XCCXD3NCM2YKR3WNGBASPC","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\u002FUF-gzj\u002Fopenspace-claude-evolution\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,86,87,27,88],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","python",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":33},"01M6XCCT7E3J922Q345PBGSHPN","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[96,97,73,27,98,88,99,100,101,102,30,87,103,104,77,80,82],"readback","write special chars readback","helper","post","via","scripts","cleanup","verification","with",{"skillNo":106,"name":107,"nameZh":6,"description":108,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":109,"categories":110,"keywords":111,"publishedAt":33},"01M6XCCMQX1R8B6FECWB3P63T7","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[112,73,77,29,82,100,87,27,88,80],"write special chars heredoc",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":124,"publishedAt":33},"01M6XCCG41M994JJEX6VN52PEP","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\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[119],{"categoryNo":120,"categoryName":121,"taxonomyType":122,"taxonomyTypeDesc":123},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[125,126,127,128,129,75,130,131,132,133,134,80,135,136,137,138,139,140,141,142],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":144,"name":145,"nameZh":6,"description":146,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":147,"categories":148,"keywords":149,"publishedAt":33},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[150,151,152,153,80,154,104,155,156,157,158],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":160,"name":161,"nameZh":6,"description":162,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":163,"categories":164,"keywords":165,"publishedAt":33},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[166,167,168,169,170,171,27,172,173,174],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]