[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFRNHMXGXQE95ABJ1H2YMB":3,"skill-same:01M6KFRNHMXGXQE95ABJ1H2YMB":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":37,"linkOnly":38,"markdownContent":39,"markdownBody":40,"frontMatter":41,"refName":42,"commitSha":43,"skillDirectory":44,"forksCount":14,"repositoryHtmlUrl":45,"repositoryHomepageUrl":6,"ownerHtmlUrl":46,"ownerBlogUrl":47,"ownerDescription":48,"updatedAt":49,"install":50,"resources":63},"01M6KFRNHMXGXQE95ABJ1H2YMB","pdf-text-extraction-fallback",null,"Extract text from PDFs using pdftotext when read_file returns binary data","xyliu-cs\u002FOpenSpace-GDPval","xyliu-cs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89236536?v=4","01M6KF8Z1V4TXS86CKSH48BY8T","xy","01M6KF8Z67443W0SHXM85JEF0B",0,"MIT","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[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","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","af1b40a42167d09c30b3a63000aa14ace4c1e229","gdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs","https:\u002F\u002Fxyliu-cs.github.io","PhD Student in CS, CUHK-Shenzhen.","2026-04-06 20:32:15",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-text-extraction-fallback",{"tool":56,"command":57},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-text-extraction-fallback",{"tool":59,"command":60},"pnpm","pnpm dlx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-text-extraction-fallback","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback\u002FSKILL.md",true,[64],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},".skill_id","OTHER","其他",42,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback\u002F.skill_id",[71,84,92,108,131,150],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":37},"01M6KG8MF1S664SWBDENYRSCK8","zip-export-deliverable","Ensures codebase deliverables are properly exported as ZIP archives through a dedicated finalization step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-export-deliverable\u002FSKILL.md",[],[78,79,80,81,82,83],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":85,"name":86,"nameZh":6,"description":87,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":88,"categories":89,"keywords":90,"publishedAt":37},"01M6KG8GAZWHHEK7VNJDW0ME21","zip-deliverable-finalization","Ensure codebase deliverables are properly packaged as ZIP exports in a dedicated final step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-deliverable-finalization\u002FSKILL.md",[],[91,79,81,82,83],"zip deliverable finalization",{"skillNo":93,"name":94,"nameZh":6,"description":95,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":96,"categories":97,"keywords":98,"publishedAt":37},"01M6KG8CMQQ1PYMNTSRZ9VS1MD","zero-iteration-failure-analysis","Identify and handle agent failures with 0 iterations as pre-execution system issues","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzero-iteration-failure-analysis\u002FSKILL.md",[],[99,100,101,102,103,104,105,106,83,107],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","with","issues","execution","system",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":119,"publishedAt":37},"01M6KG86W3PA07FT9W58YHHERM","write-file-fallback-report","Generate professional documents using write_file when primary data sources fail, leveraging embedded domain knowledge instead of external retrieval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report\u002FSKILL.md",[114],{"categoryNo":115,"categoryName":116,"taxonomyType":117,"taxonomyTypeDesc":118},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[27,120,30,121,122,123,124,125,126,127,128,129,31,130],"write","report","write file fallback report","domain","professional","sources","retrieval","generate","embedded","documents","knowledge",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":140,"publishedAt":37},"01M6KG82GAEY3GG77CMGCK1C2T","fallback-doc-with-delegation","Generate professional documents after tool failures using shell_agent for complex formats or write_file for simple text\u002Fmarkdown","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced\u002FSKILL.md",[137],{"categoryNo":138,"categoryName":139,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[141,104,27,142,143,144,129,127,30,145,146,26,120,147,124,148,149],"fallback doc with delegation","doc","delegation","shell","markdown","tool","simple","formats","for",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":157,"publishedAt":37},"01M6KG7WT7GX5NYCGEFHW22NV7","context-anchored-fallback-report","Generate documents with write_file when retrieval tools fail, with explicit guardrails against task context drift","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced-4bc5c2\u002FSKILL.md",[156],{"categoryNo":115,"categoryName":116,"taxonomyType":117,"taxonomyTypeDesc":118},[27,121,158,159,127,30,160,161,120,162,163,126,104,164,129],"context","context anchored fallback report","Guardrails","Tools","task","drift","context drift"]