[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFRTAB01FFKB2AXR3J3TY2":3,"skill-same:01M6KFRTAB01FFKB2AXR3J3TY2":66},{"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":33,"linkOnly":34,"markdownContent":35,"markdownBody":36,"frontMatter":37,"refName":38,"commitSha":39,"skillDirectory":40,"forksCount":14,"repositoryHtmlUrl":41,"repositoryHomepageUrl":6,"ownerHtmlUrl":42,"ownerBlogUrl":43,"ownerDescription":44,"updatedAt":45,"install":46,"resources":59},"01M6KFRTAB01FFKB2AXR3J3TY2","pdf-text-extraction",null,"Extract text from PDFs using shell tools when read_file fails","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\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32],"PDF","extraction","text","pdf text extraction","file","Tools","shell","read","extract","2026-11-10 10:12:30",false,"---\nname: pdf-text-extraction\ndescription: Extract text from PDFs using shell tools when read_file fails\n---\n\n# PDF Text Extraction (Fallback Method)\n\n## When to Use This Skill\n\nUse this skill when `read_file` with `filetype='pdf'`:\n- Returns binary image data instead of text\n- Produces errors or incomplete content\n- Fails to extract structured data reliably\n\nThe built-in PDF handler is unreliable for structured text extraction. Shell-based tools provide more robust alternatives.\n\n## Available Methods\n\n### Method 1: pdftotext (Recommended)\n\n```bash\n# Extract text from PDF to stdout\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf -\n\n# Extract text to a file\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf output.txt\n\n# Preserve layout (maintains spacing\u002Fstructure)\npdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf output.txt\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"pdftotext -layout \u002Fpath\u002Fto\u002Fdocument.pdf -\"\n```\n\n### Method 2: pdfinfo (Metadata)\n\n```bash\n# Get PDF metadata (pages, author, creation date, etc.)\npdfinfo \u002Fpath\u002Fto\u002Ffile.pdf\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"pdfinfo \u002Fpath\u002Fto\u002Fdocument.pdf\"\n```\n\n### Method 3: Python with PyMuPDF (fitz)\n\n```python\nimport fitz  # PyMuPDF\n\ndoc = fitz.open(\"\u002Fpath\u002Fto\u002Ffile.pdf\")\ntext = \"\"\nfor page in doc:\n    text += page.get_text()\ndoc.close()\nprint(text)\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"python3 -c \\\"import fitz; doc=fitz.open('file.pdf'); print(''.join(p.get_text() for p in doc))\\\"\"\n```\n\n### Method 4: Python with pdfplumber (Tables)\n\n```python\nimport pdfplumber\n\nwith pdfplumber.open(\"\u002Fpath\u002Fto\u002Ffile.pdf\") as pdf:\n    for page in pdf.pages:\n        text = page.extract_text()\n        tables = page.extract_tables()  # For tabular data\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"python3 -c \\\"import pdfplumber; pdf=pdfplumber.open('file.pdf'); print(''.join(p.extract_text() or '' for p in pdf.pages))\\\"\"\n```\n\n## Workflow\n\n1. **Try pdftotext first** - Fastest and most reliable for plain text\n   ```bash\n   run_shell command=\"pdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf -\"\n   ```\n\n2. **If pdftotext unavailable, check for Python libraries**\n   ```bash\n   run_shell command=\"python3 -c \\\"import fitz; print('PyMuPDF available')\\\"\"\n   ```\n\n3. **For table\u002Fstructured data, use pdfplumber**\n   ```bash\n   run_shell command=\"python3 -c \\\"import pdfplumber; ...\\\"\"\n   ```\n\n4. **Verify extraction succeeded** - Check output contains readable text, not binary data\n\n## Installation Notes\n\nIf tools are not available:\n```bash\n# Ubuntu\u002FDebian\napt-get install poppler-utils  # pdftotext, pdfinfo\n\n# Install Python libraries\npip install pymupdf pdfplumber\n```\n\n## Anti-Patterns to Avoid\n\n- Do NOT rely solely on `read_file` with `filetype='pdf'` for critical text extraction\n- Do NOT assume PDF text is in any particular order - verify extracted content\n- Do NOT use image-based extraction unless the PDF is scanned (use OCR instead)\n\n## Example: Complete Extraction Pattern\n\n```bash\n# Step 1: Try pdftotext\nRESULT=$(pdftotext -layout \u002Fpath\u002Fto\u002Fform.pdf - 2>\u002Fdev\u002Fnull)\n\n# Step 2: Verify we got text, not error\nif [ -z \"$RESULT\" ]; then\n    # Fallback to Python\n    RESULT=$(python3 -c \"import fitz; doc=fitz.open('\u002Fpath\u002Fto\u002Fform.pdf'); print(''.join(p.get_text() for p in doc))\")\nfi\n\n# Step 3: Use extracted text\necho \"$RESULT\"\n```","# PDF Text Extraction (Fallback Method)\n\n## When to Use This Skill\n\nUse this skill when `read_file` with `filetype='pdf'`:\n- Returns binary image data instead of text\n- Produces errors or incomplete content\n- Fails to extract structured data reliably\n\nThe built-in PDF handler is unreliable for structured text extraction. Shell-based tools provide more robust alternatives.\n\n## Available Methods\n\n### Method 1: pdftotext (Recommended)\n\n```bash\n# Extract text from PDF to stdout\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf -\n\n# Extract text to a file\npdftotext \u002Fpath\u002Fto\u002Ffile.pdf output.txt\n\n# Preserve layout (maintains spacing\u002Fstructure)\npdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf output.txt\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"pdftotext -layout \u002Fpath\u002Fto\u002Fdocument.pdf -\"\n```\n\n### Method 2: pdfinfo (Metadata)\n\n```bash\n# Get PDF metadata (pages, author, creation date, etc.)\npdfinfo \u002Fpath\u002Fto\u002Ffile.pdf\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"pdfinfo \u002Fpath\u002Fto\u002Fdocument.pdf\"\n```\n\n### Method 3: Python with PyMuPDF (fitz)\n\n```python\nimport fitz  # PyMuPDF\n\ndoc = fitz.open(\"\u002Fpath\u002Fto\u002Ffile.pdf\")\ntext = \"\"\nfor page in doc:\n    text += page.get_text()\ndoc.close()\nprint(text)\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"python3 -c \\\"import fitz; doc=fitz.open('file.pdf'); print(''.join(p.get_text() for p in doc))\\\"\"\n```\n\n### Method 4: Python with pdfplumber (Tables)\n\n```python\nimport pdfplumber\n\nwith pdfplumber.open(\"\u002Fpath\u002Fto\u002Ffile.pdf\") as pdf:\n    for page in pdf.pages:\n        text = page.extract_text()\n        tables = page.extract_tables()  # For tabular data\n```\n\n**Usage in agent:**\n```bash\nrun_shell command=\"python3 -c \\\"import pdfplumber; pdf=pdfplumber.open('file.pdf'); print(''.join(p.extract_text() or '' for p in pdf.pages))\\\"\"\n```\n\n## Workflow\n\n1. **Try pdftotext first** - Fastest and most reliable for plain text\n   ```bash\n   run_shell command=\"pdftotext -layout \u002Fpath\u002Fto\u002Ffile.pdf -\"\n   ```\n\n2. **If pdftotext unavailable, check for Python libraries**\n   ```bash\n   run_shell command=\"python3 -c \\\"import fitz; print('PyMuPDF available')\\\"\"\n   ```\n\n3. **For table\u002Fstructured data, use pdfplumber**\n   ```bash\n   run_shell command=\"python3 -c \\\"import pdfplumber; ...\\\"\"\n   ```\n\n4. **Verify extraction succeeded** - Check output contains readable text, not binary data\n\n## Installation Notes\n\nIf tools are not available:\n```bash\n# Ubuntu\u002FDebian\napt-get install poppler-utils  # pdftotext, pdfinfo\n\n# Install Python libraries\npip install pymupdf pdfplumber\n```\n\n## Anti-Patterns to Avoid\n\n- Do NOT rely solely on `read_file` with `filetype='pdf'` for critical text extraction\n- Do NOT assume PDF text is in any particular order - verify extracted content\n- Do NOT use image-based extraction unless the PDF is scanned (use OCR instead)\n\n## Example: Complete Extraction Pattern\n\n```bash\n# Step 1: Try pdftotext\nRESULT=$(pdftotext -layout \u002Fpath\u002Fto\u002Fform.pdf - 2>\u002Fdev\u002Fnull)\n\n# Step 2: Verify we got text, not error\nif [ -z \"$RESULT\" ]; then\n    # Fallback to Python\n    RESULT=$(python3 -c \"import fitz; doc=fitz.open('\u002Fpath\u002Fto\u002Fform.pdf'); print(''.join(p.get_text() for p in doc))\")\nfi\n\n# Step 3: Use extracted text\necho \"$RESULT\"\n```",{"name":5,"description":7},"main","af1b40a42167d09c30b3a63000aa14ace4c1e229","gdpval_bench\u002Fskills\u002Fpdf-text-extraction","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":47,"prompt":57,"zipAvailable":58},[48,51,54],{"tool":49,"command":50},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-text-extraction",{"tool":52,"command":53},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-text-extraction",{"tool":55,"command":56},"pnpm","pnpm dlx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-text-extraction","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction\u002FSKILL.md",true,[60],{"path":61,"resourceType":62,"resourceTypeDesc":63,"sizeBytes":64,"sourceHtmlUrl":65},".skill_id","OTHER","其他",33,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction\u002F.skill_id",[67,80,88,104,129,147],{"skillNo":68,"name":69,"nameZh":6,"description":70,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":71,"categories":72,"keywords":73,"publishedAt":33},"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",[],[74,75,76,77,78,79],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":33},"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",[],[87,75,77,78,79],"zip deliverable finalization",{"skillNo":89,"name":90,"nameZh":6,"description":91,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":92,"categories":93,"keywords":94,"publishedAt":33},"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",[],[95,96,97,98,99,100,101,102,79,103],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","with","issues","execution","system",{"skillNo":105,"name":106,"nameZh":6,"description":107,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":108,"categories":109,"keywords":115,"publishedAt":33},"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",[110],{"categoryNo":111,"categoryName":112,"taxonomyType":113,"taxonomyTypeDesc":114},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[116,117,28,118,119,120,121,122,123,124,125,126,127,128],"fallback","write","report","write file fallback report","domain","professional","sources","retrieval","generate","embedded","documents","data","knowledge",{"skillNo":130,"name":131,"nameZh":6,"description":132,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":133,"categories":134,"keywords":138,"publishedAt":33},"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",[135],{"categoryNo":136,"categoryName":137,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[139,100,116,140,141,30,126,124,28,142,143,26,117,144,121,145,146],"fallback doc with delegation","doc","delegation","markdown","tool","simple","formats","for",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":154,"publishedAt":33},"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",[153],{"categoryNo":111,"categoryName":112,"taxonomyType":113,"taxonomyTypeDesc":114},[116,118,155,156,124,28,157,29,117,158,159,123,100,160,126],"context","context anchored fallback report","Guardrails","task","drift","context drift"]