[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBSS9MPZ15P0M7CWMKFBSB":3,"skill-same:01M6XBSS9MPZ15P0M7CWMKFBSB":68},{"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":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":13,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":47,"install":48,"resources":61},"01M6XBSS9MPZ15P0M7CWMKFBSB","pdf-text-extraction-fallback",null,"Extract text from PDFs using pdftotext when read_file returns binary data","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-fallback\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36],"PDF","extraction","text","fallback","pdf text extraction fallback","pdf text extraction","file","data","returns","read","extract","binary","pdftotext","when","2026-11-10 10:12:30",false,"---\nname: pdf-text-extraction-fallback\ndescription: Extract text from PDFs using pdftotext when read_file returns binary data\n---\n\n# PDF Text Extraction Fallback\n\n## When to Use This Skill\n\nUse this skill when `read_file` with `filetype=\"pdf\"` returns binary\u002Fimage data instead of readable text content. This is a common issue with PDF files that contain embedded images or complex formatting.\n\n## Steps\n\n### 1. Validate Parameters First\n\nBefore attempting extraction, ensure you're using the correct parameter name:\n- **Use `filetype`** (not `file_type`) for the `read_file` function\n- Incorrect parameter names can cause silent failures\n\n```python\n# Correct\nread_file(filetype=\"pdf\", file_path=\"document.pdf\")\n\n# Incorrect - may fail silently\nread_file(file_type=\"pdf\", file_path=\"document.pdf\")\n```\n\n### 2. Detect Binary Data Issue\n\nAfter calling `read_file`, check if the result contains:\n- Garbled\u002Fbinary characters\n- Image data representations (e.g., `b'...'` byte strings with non-text content)\n- Unreadable or corrupted-looking content\n\nIf yes, proceed with the pdftotext workaround.\n\n### 3. Extract Text via pdftotext\n\nUse `run_shell` to call pdftotext, which extracts text directly from PDF files:\n\n```python\n# Extract text to stdout\nresult = run_shell(command=\"pdftotext \u002Fpath\u002Fto\u002Fdocument.pdf -\")\ntext_content = result.stdout\n```\n\nThe `-` flag tells pdftotext to output to stdout instead of creating a file.\n\n### 4. Handle Output and Errors\n\n```python\nresult = run_shell(command=\"pdftotext \u002Fpath\u002Fto\u002Fdocument.pdf -\")\n\nif result.stderr:\n    # Check for errors like \"pdftotext not found\"\n    # May need to install poppler-utils\n    pass\n\ntext_content = result.stdout\n# text_content now contains the extracted text\n```\n\n## Example Workflow\n\n```python\n# Step 1: Try normal read with correct parameters\ncontent = read_file(filetype=\"pdf\", file_path=\"reference.pdf\")\n\n# Step 2: Check if content is readable\nif not content or looks_like_binary(content):\n    # Step 3: Fall back to pdftotext\n    result = run_shell(command=\"pdftotext reference.pdf -\")\n    text_content = result.stdout\n    \n    # Step 4: Verify extraction succeeded\n    if result.stderr:\n        # Handle error (e.g., install pdftotext)\n        pass\n```\n\n## Installation Notes\n\npdftotext is part of the poppler-utils package:\n\n- **Debian\u002FUbuntu**: `apt-get install poppler-utils`\n- **macOS**: `brew install poppler`\n- **Many Linux environments**: Pre-installed\n\n## Alternative: Output to File\n\nIf stdout approach has issues, output to a temporary file:\n\n```python\nrun_shell(command=\"pdftotext \u002Fpath\u002Fto\u002Fdocument.pdf \u002Ftmp\u002Foutput.txt\")\ntext_content = read_file(filetype=\"txt\", file_path=\"\u002Ftmp\u002Foutput.txt\")\n```\n\n## Best Practices\n\n1. Always validate the `filetype` parameter spelling before troubleshooting\n2. Check both stdout and stderr from pdftotext\n3. For multi-page PDFs, pdftotext preserves page breaks with form feeds\n4. This method works better for text-based PDFs than image-scanned PDFs","# PDF Text Extraction Fallback\n\n## When to Use This Skill\n\nUse this skill when `read_file` with `filetype=\"pdf\"` returns binary\u002Fimage data instead of readable text content. This is a common issue with PDF files that contain embedded images or complex formatting.\n\n## Steps\n\n### 1. Validate Parameters First\n\nBefore attempting extraction, ensure you're using the correct parameter name:\n- **Use `filetype`** (not `file_type`) for the `read_file` function\n- Incorrect parameter names can cause silent failures\n\n```python\n# Correct\nread_file(filetype=\"pdf\", file_path=\"document.pdf\")\n\n# Incorrect - may fail silently\nread_file(file_type=\"pdf\", file_path=\"document.pdf\")\n```\n\n### 2. Detect Binary Data Issue\n\nAfter calling `read_file`, check if the result contains:\n- Garbled\u002Fbinary characters\n- Image data representations (e.g., `b'...'` byte strings with non-text content)\n- Unreadable or corrupted-looking content\n\nIf yes, proceed with the pdftotext workaround.\n\n### 3. Extract Text via pdftotext\n\nUse `run_shell` to call pdftotext, which extracts text directly from PDF files:\n\n```python\n# Extract text to stdout\nresult = run_shell(command=\"pdftotext \u002Fpath\u002Fto\u002Fdocument.pdf -\")\ntext_content = result.stdout\n```\n\nThe `-` flag tells pdftotext to output to stdout instead of creating a file.\n\n### 4. Handle Output and Errors\n\n```python\nresult = run_shell(command=\"pdftotext \u002Fpath\u002Fto\u002Fdocument.pdf -\")\n\nif result.stderr:\n    # Check for errors like \"pdftotext not found\"\n    # May need to install poppler-utils\n    pass\n\ntext_content = result.stdout\n# text_content now contains the extracted text\n```\n\n## Example Workflow\n\n```python\n# Step 1: Try normal read with correct parameters\ncontent = read_file(filetype=\"pdf\", file_path=\"reference.pdf\")\n\n# Step 2: Check if content is readable\nif not content or looks_like_binary(content):\n    # Step 3: Fall back to pdftotext\n    result = run_shell(command=\"pdftotext reference.pdf -\")\n    text_content = result.stdout\n    \n    # Step 4: Verify extraction succeeded\n    if result.stderr:\n        # Handle error (e.g., install pdftotext)\n        pass\n```\n\n## Installation Notes\n\npdftotext is part of the poppler-utils package:\n\n- **Debian\u002FUbuntu**: `apt-get install poppler-utils`\n- **macOS**: `brew install poppler`\n- **Many Linux environments**: Pre-installed\n\n## Alternative: Output to File\n\nIf stdout approach has issues, output to a temporary file:\n\n```python\nrun_shell(command=\"pdftotext \u002Fpath\u002Fto\u002Fdocument.pdf \u002Ftmp\u002Foutput.txt\")\ntext_content = read_file(filetype=\"txt\", file_path=\"\u002Ftmp\u002Foutput.txt\")\n```\n\n## Best Practices\n\n1. Always validate the `filetype` parameter spelling before troubleshooting\n2. Check both stdout and stderr from pdftotext\n3. For multi-page PDFs, pdftotext preserves page breaks with form feeds\n4. This method works better for text-based PDFs than image-scanned PDFs",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback","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":49,"prompt":59,"zipAvailable":60},[50,53,56],{"tool":51,"command":52},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction-fallback",{"tool":54,"command":55},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction-fallback",{"tool":57,"command":58},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction-fallback","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback\u002FSKILL.md",true,[62],{"path":63,"resourceType":64,"resourceTypeDesc":65,"sizeBytes":66,"sourceHtmlUrl":67},".skill_id","OTHER","其他",42,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback\u002F.skill_id",[69,93,109,118,147,163],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":37},"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",[],[76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,29,92],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","python",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":37},"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",[],[100,101,77,29,102,92,103,104,105,106,32,91,107,108,81,84,86],"readback","write special chars readback","helper","post","via","scripts","cleanup","verification","with",{"skillNo":110,"name":111,"nameZh":6,"description":112,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":113,"categories":114,"keywords":115,"publishedAt":37},"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",[],[116,77,81,117,86,104,91,29,92,84],"write special chars heredoc","shell",{"skillNo":119,"name":120,"nameZh":6,"description":121,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":122,"categories":123,"keywords":129,"publishedAt":37},"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",[124],{"categoryNo":125,"categoryName":126,"taxonomyType":127,"taxonomyTypeDesc":128},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[130,131,132,133,134,79,135,136,137,138,139,84,140,141,142,143,144,145,146,30],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":37},"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",[],[154,155,156,157,84,158,108,159,160,161,162],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":37},"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",[],[170,171,172,173,174,175,29,176,177,178],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]