[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBTK7WC4ZGDMYKEYCGD17Y":3,"skill-same:01M6XBTK7WC4ZGDMYKEYCGD17Y":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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":13,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":48,"install":49,"resources":62},"01M6XBTK7WC4ZGDMYKEYCGD17Y","pdftotext-fallback",null,"Recover PDF text extraction when read_file returns binary data by using pdftotext via shell","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\u002Fpdftotext-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,37],"fallback","pdftotext","pdftotext fallback","PDF","extraction","file","data","shell","text","returns","read","binary","via","pdf text extraction","when","2026-11-10 10:12:30",false,"---\nname: pdftotext-fallback\ndescription: Recover PDF text extraction when read_file returns binary data by using pdftotext via shell\n---\n\n# pdftotext Fallback for PDF Text Extraction\n\n## When to Use\n\nApply this pattern when:\n- `read_file` on a PDF returns binary\u002Fimage data instead of readable text\n- Python-based PDF extraction (PyMuPDF, pdfplumber, etc.) in `execute_code_sandbox` fails or returns garbled content\n- You need reliable text extraction from PDF files as a recovery strategy\n\n## Why This Works\n\nThe `pdftotext` utility (from poppler-utils) is a mature, command-line tool that handles many PDF edge cases that confuse Python libraries or the `read_file` tool. It's pre-installed on most Linux systems and provides consistent, reliable text extraction.\n\n## Steps\n\n### Step 1: Detect the Failure\n\nRecognize extraction failure when:\n- `read_file` returns binary content, image data, or garbled text\n- Error messages indicate encoding issues or unsupported formats\n- Python PDF libraries in sandbox fail with import errors or extraction failures\n\n### Step 2: Use pdftotext via run_shell\n\n**Extract to stdout** (recommended for quick extraction):\n\n```bash\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf -\n```\n\nThe `-` argument outputs directly to stdout for easy capture in your tool response.\n\n**Example:**\n```bash\nrun_shell(\"pdftotext document.pdf -\")\n```\n\n### Step 3: Handle Complex PDFs\n\n**Preserve layout** (maintains original formatting):\n```bash\npdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf -\n```\n\n**Extract to a file** (for large PDFs):\n```bash\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf \u002Fpath\u002Fto\u002Foutput.txt\n```\nThen read the output file with `read_file`.\n\n**Handle encoded text:**\n```bash\npdftotext -enc UTF-8 \u002Fpath\u002Fto\u002Ffile.pdf -\n```\n\n### Step 4: Verify and Continue\n\n- Check the extracted text for completeness\n- If text is still garbled, the PDF may be image-based (scanned) - consider OCR tools\n- Proceed with your task using the extracted text\n\n## Code Examples\n\n**Basic extraction:**\n```bash\n# Simple text extraction\ntext = run_shell(\"pdftotext document.pdf -\")\n```\n\n**With error handling:**\n```bash\n# Try extraction, check for success\nresult = run_shell(\"pdftotext document.pdf - && echo 'SUCCESS' || echo 'FAILED'\")\n```\n\n**Multi-page PDF with layout:**\n```bash\n# Preserve tables and formatting\ntext = run_shell(\"pdftotext -layout document.pdf -\")\n```\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| `pdftotext: command not found` | Install poppler-utils: `apt-get install poppler-utils` |\n| Garbled\u002Fspecial characters | Try `-enc UTF-8` or `-enc ASCII7` |\n| Missing formatting | Use `-layout` flag |\n| Scanned PDF (no text) | Requires OCR (e.g., tesseract), not text extraction |\n| Large PDF timeout | Extract to file instead of stdout |\n\n## Limitations\n\n- Does not work on image-only (scanned) PDFs without embedded text\n- May lose complex formatting, tables, or embedded objects\n- Requires poppler-utils to be installed (common on Linux, may need installation on other systems)\n\n## Related Tools\n\n- `pdfinfo`: Get PDF metadata (pages, size, etc.)\n- `pdftoppm`: Convert PDF pages to images\n- `tesseract`: OCR for scanned PDFs","# pdftotext Fallback for PDF Text Extraction\n\n## When to Use\n\nApply this pattern when:\n- `read_file` on a PDF returns binary\u002Fimage data instead of readable text\n- Python-based PDF extraction (PyMuPDF, pdfplumber, etc.) in `execute_code_sandbox` fails or returns garbled content\n- You need reliable text extraction from PDF files as a recovery strategy\n\n## Why This Works\n\nThe `pdftotext` utility (from poppler-utils) is a mature, command-line tool that handles many PDF edge cases that confuse Python libraries or the `read_file` tool. It's pre-installed on most Linux systems and provides consistent, reliable text extraction.\n\n## Steps\n\n### Step 1: Detect the Failure\n\nRecognize extraction failure when:\n- `read_file` returns binary content, image data, or garbled text\n- Error messages indicate encoding issues or unsupported formats\n- Python PDF libraries in sandbox fail with import errors or extraction failures\n\n### Step 2: Use pdftotext via run_shell\n\n**Extract to stdout** (recommended for quick extraction):\n\n```bash\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf -\n```\n\nThe `-` argument outputs directly to stdout for easy capture in your tool response.\n\n**Example:**\n```bash\nrun_shell(\"pdftotext document.pdf -\")\n```\n\n### Step 3: Handle Complex PDFs\n\n**Preserve layout** (maintains original formatting):\n```bash\npdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf -\n```\n\n**Extract to a file** (for large PDFs):\n```bash\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf \u002Fpath\u002Fto\u002Foutput.txt\n```\nThen read the output file with `read_file`.\n\n**Handle encoded text:**\n```bash\npdftotext -enc UTF-8 \u002Fpath\u002Fto\u002Ffile.pdf -\n```\n\n### Step 4: Verify and Continue\n\n- Check the extracted text for completeness\n- If text is still garbled, the PDF may be image-based (scanned) - consider OCR tools\n- Proceed with your task using the extracted text\n\n## Code Examples\n\n**Basic extraction:**\n```bash\n# Simple text extraction\ntext = run_shell(\"pdftotext document.pdf -\")\n```\n\n**With error handling:**\n```bash\n# Try extraction, check for success\nresult = run_shell(\"pdftotext document.pdf - && echo 'SUCCESS' || echo 'FAILED'\")\n```\n\n**Multi-page PDF with layout:**\n```bash\n# Preserve tables and formatting\ntext = run_shell(\"pdftotext -layout document.pdf -\")\n```\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| `pdftotext: command not found` | Install poppler-utils: `apt-get install poppler-utils` |\n| Garbled\u002Fspecial characters | Try `-enc UTF-8` or `-enc ASCII7` |\n| Missing formatting | Use `-layout` flag |\n| Scanned PDF (no text) | Requires OCR (e.g., tesseract), not text extraction |\n| Large PDF timeout | Extract to file instead of stdout |\n\n## Limitations\n\n- Does not work on image-only (scanned) PDFs without embedded text\n- May lose complex formatting, tables, or embedded objects\n- Requires poppler-utils to be installed (common on Linux, may need installation on other systems)\n\n## Related Tools\n\n- `pdfinfo`: Get PDF metadata (pages, size, etc.)\n- `pdftoppm`: Convert PDF pages to images\n- `tesseract`: OCR for scanned PDFs",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fpdftotext-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":50,"prompt":60,"zipAvailable":61},[51,54,57],{"tool":52,"command":53},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdftotext-fallback",{"tool":55,"command":56},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdftotext-fallback",{"tool":58,"command":59},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdftotext-fallback","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdftotext-fallback\u002FSKILL.md",true,[63],{"path":64,"resourceType":65,"resourceTypeDesc":66,"sizeBytes":67,"sourceHtmlUrl":68},".skill_id","OTHER","其他",32,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdftotext-fallback\u002F.skill_id",[70,94,109,117,146,162],{"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":38},"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,28,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":38},"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,28,103,93,104,35,105,106,33,92,107,108,82,85,87],"readback","write special chars readback","helper","post","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":38},"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,78,82,30,87,35,92,28,93,85],"write special chars heredoc",{"skillNo":118,"name":119,"nameZh":6,"description":120,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":121,"categories":122,"keywords":128,"publishedAt":38},"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",[123],{"categoryNo":124,"categoryName":125,"taxonomyType":126,"taxonomyTypeDesc":127},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[129,130,131,132,133,80,134,135,136,137,138,85,139,140,141,142,143,144,145,29],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api",{"skillNo":147,"name":148,"nameZh":6,"description":149,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":150,"categories":151,"keywords":152,"publishedAt":38},"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",[],[153,154,155,156,85,157,108,158,159,160,161],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":163,"name":164,"nameZh":6,"description":165,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":166,"categories":167,"keywords":168,"publishedAt":38},"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",[],[169,170,171,172,173,174,28,175,176,177],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]