[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBTK7WC4ZGDMYKEYCGD17Y":3,"skill-same:01M6XBTK7WC4ZGDMYKEYCGD17Y":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":17,"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},"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",[],[18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],"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":45,"prompt":55,"zipAvailable":56},[46,49,52],{"tool":47,"command":48},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdftotext-fallback",{"tool":50,"command":51},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdftotext-fallback",{"tool":53,"command":54},"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,[58],{"path":59,"resourceType":60,"resourceTypeDesc":61,"sizeBytes":62,"sourceHtmlUrl":63},".skill_id","OTHER","其他",32,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdftotext-fallback\u002F.skill_id",[65,89,104,112,136,152],{"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,23,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,23,98,88,99,30,100,101,28,87,102,103,77,80,82],"readback","write special chars readback","helper","post","scripts","cleanup","verification","with",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":110,"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",[],[111,73,77,25,82,30,87,23,88,80],"write special chars heredoc",{"skillNo":113,"name":114,"nameZh":6,"description":115,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":116,"categories":117,"keywords":118,"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,120,121,122,123,75,124,125,126,127,128,80,129,130,131,132,133,134,135,24],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api",{"skillNo":137,"name":138,"nameZh":6,"description":139,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":140,"categories":141,"keywords":142,"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",[],[143,144,145,146,80,147,103,148,149,150,151],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":153,"name":154,"nameZh":6,"description":155,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":156,"categories":157,"keywords":158,"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",[],[159,160,161,162,163,164,23,165,166,167],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]