[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBYH6TK7G8R5SYETS5WSES":3,"skill-same:01M6XBYH6TK7G8R5SYETS5WSES":69},{"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":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6XBYH6TK7G8R5SYETS5WSES","robust-pdf-read",null,"Reliably extract text from PDFs using pdftotext when standard file reading 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\u002Frobust-pdf-read\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","read","pdf read","robust pdf read","file","tool","text","extract","guide","reading","pdftotext","file reading","standard","when","2026-11-10 10:12:30",false,"---\nname: robust-pdf-read\ndescription: Reliably extract text from PDFs using pdftotext when standard file reading fails.\ncategory: tool_guide\n---\n\n# Robust PDF Text Extraction\n\n## Problem\nStandard file reading tools (e.g., `read_file`) often fail to extract text from PDF documents. Instead of returning parsed text, they may return:\n- Raw binary data\n- Base64 encoded images\n- Garbled characters or null bytes\n\nThis occurs because PDFs are complex binary formats, not plain text files. Attempts to parse them using general-purpose Python libraries (like PyMuPDF) in sandboxed environments may also fail due to missing dependencies or environment restrictions.\n\n## Solution\nUse the `pdftotext` command-line utility (part of `poppler-utils`) via `run_shell`. This tool is commonly pre-installed in Linux environments and reliably extracts text content from PDFs.\n\n## Procedure\n\n### 1. Detect Extraction Failure\nWhen attempting to read a PDF:\n- Check the content returned by `read_file`.\n- If the content contains null bytes (`\\x00`), appears as base64, or is clearly binary\u002Fgarbled, assume standard reading has failed.\n\n### 2. Execute pdftotext\nRun the following shell command using `run_shell`:\n\n```bash\npdftotext -layout -nopgbrk \u003Cfile_path> -\n```\n\n- `-layout`: Maintains the physical layout of the text (optional but recommended).\n- `-nopgbrk`: Prevents inserting form feed characters between pages.\n- `-`: Outputs content to stdout instead of creating a new file.\n\n### 3. Parse Output\nCapture the stdout from the shell command. This string is the extracted text.\n\n## Example Usage\n\n**Scenario:** You need to read `document.pdf`.\n\n**Step 1: Attempt standard read**\n```python\ncontent = read_file(\"document.pdf\")\nif \"\\x00\" in content or not content.strip():\n    # Fallback needed\n    pass\n```\n\n**Step 2: Fallback to shell**\n```python\nresult = run_shell(\"pdftotext -layout -nopgbrk document.pdf -\")\ntext = result.stdout\n```\n\n## Prerequisites\n- The environment must have `pdftotext` installed (usually via `poppler-utils`).\n- If `pdftotext` is not found, attempt to install it (`apt-get install poppler-utils`) if permissions allow, or notify the user.\n\n## Benefits\n- **Reliability:** Bypasses Python library dependency issues in sandboxes.\n- **Speed:** Command-line tools are often faster than loading heavy Python libraries.\n- **Compatibility:** Works consistently across most Linux-based agent environments.","# Robust PDF Text Extraction\n\n## Problem\nStandard file reading tools (e.g., `read_file`) often fail to extract text from PDF documents. Instead of returning parsed text, they may return:\n- Raw binary data\n- Base64 encoded images\n- Garbled characters or null bytes\n\nThis occurs because PDFs are complex binary formats, not plain text files. Attempts to parse them using general-purpose Python libraries (like PyMuPDF) in sandboxed environments may also fail due to missing dependencies or environment restrictions.\n\n## Solution\nUse the `pdftotext` command-line utility (part of `poppler-utils`) via `run_shell`. This tool is commonly pre-installed in Linux environments and reliably extracts text content from PDFs.\n\n## Procedure\n\n### 1. Detect Extraction Failure\nWhen attempting to read a PDF:\n- Check the content returned by `read_file`.\n- If the content contains null bytes (`\\x00`), appears as base64, or is clearly binary\u002Fgarbled, assume standard reading has failed.\n\n### 2. Execute pdftotext\nRun the following shell command using `run_shell`:\n\n```bash\npdftotext -layout -nopgbrk \u003Cfile_path> -\n```\n\n- `-layout`: Maintains the physical layout of the text (optional but recommended).\n- `-nopgbrk`: Prevents inserting form feed characters between pages.\n- `-`: Outputs content to stdout instead of creating a new file.\n\n### 3. Parse Output\nCapture the stdout from the shell command. This string is the extracted text.\n\n## Example Usage\n\n**Scenario:** You need to read `document.pdf`.\n\n**Step 1: Attempt standard read**\n```python\ncontent = read_file(\"document.pdf\")\nif \"\\x00\" in content or not content.strip():\n    # Fallback needed\n    pass\n```\n\n**Step 2: Fallback to shell**\n```python\nresult = run_shell(\"pdftotext -layout -nopgbrk document.pdf -\")\ntext = result.stdout\n```\n\n## Prerequisites\n- The environment must have `pdftotext` installed (usually via `poppler-utils`).\n- If `pdftotext` is not found, attempt to install it (`apt-get install poppler-utils`) if permissions allow, or notify the user.\n\n## Benefits\n- **Reliability:** Bypasses Python library dependency issues in sandboxes.\n- **Speed:** Command-line tools are often faster than loading heavy Python libraries.\n- **Compatibility:** Works consistently across most Linux-based agent environments.",{"name":5,"category":42,"description":7},"tool_guide","main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Frobust-pdf-read","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":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill robust-pdf-read",{"tool":55,"command":56},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill robust-pdf-read",{"tool":58,"command":59},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill robust-pdf-read","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Frobust-pdf-read\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},".skill_id","OTHER","其他",29,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Frobust-pdf-read\u002F.skill_id",[70,94,110,119,149,165],{"skillNo":71,"name":72,"nameZh":6,"description":73,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":74,"categories":75,"keywords":76,"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",[],[77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,27,93],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","python",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"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",[],[101,102,78,27,103,93,104,105,106,107,24,92,108,109,82,85,87],"readback","write special chars readback","helper","post","via","scripts","cleanup","verification","with",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"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",[],[117,78,82,118,87,105,92,27,93,85],"write special chars heredoc","shell",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":130,"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",[125],{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[131,132,133,134,135,80,136,137,138,139,140,85,141,142,143,144,145,146,147,148],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":150,"name":151,"nameZh":6,"description":152,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":153,"categories":154,"keywords":155,"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",[],[156,157,158,159,85,160,109,161,162,163,164],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":166,"name":167,"nameZh":6,"description":168,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":169,"categories":170,"keywords":171,"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",[],[172,173,174,175,176,177,27,178,179,180],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]