[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFP8M179B2MZWRM300KXGH":3,"skill-same:01M6KFP8M179B2MZWRM300KXGH":71},{"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":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":14,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6KFP8M179B2MZWRM300KXGH","pdf-extract-shell-first",null,"PDF text extraction with tool cascade prioritizing shell pdftotext before Python fallback","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-download-extract-fallback-enhanced-e27e0c\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,37],"PDF","first","shell","extract","pdf extract","pdf extract shell first","python","extraction","tool","text","fallback","with","pdftotext","pdf text extraction","2026-11-10 10:12:30",false,"---\nname: pdf-extract-shell-first\ndescription: PDF text extraction with tool cascade prioritizing shell pdftotext before Python fallback\n---\n\n# PDF Extract with Shell-First Tool Cascade\n\nThis skill provides an optimized workflow for extracting text content from PDF documents (local files or downloaded URLs) using a prioritized tool cascade that favors shell-based extraction before falling back to Python libraries.\n\n## Why Shell-First?\n\nAnalysis of execution patterns shows:\n- `read_file` on PDFs sometimes returns binary\u002Fimage data instead of text\n- `run_shell` with `pdftotext` has higher success rate and fewer sandbox errors\n- `execute_code_sandbox` can fail with \"unknown error\" in constrained environments\n- Shell tools are more reliable for PDF text extraction when available\n\n## Entry Point: Determine Your Starting Point\n\n**Before beginning, identify your scenario:**\n\n| Scenario | Start Here | Skip |\n|----------|-----------|------|\n| PDF already on local disk | Step 1 (Try read_file) | Shell download steps |\n| PDF at a web URL | Shell download, then Step 1 | None |\n| Need maximum reliability | Full cascade (all 3 tools) | None |\n\n## Complete Workflow\n\n### Step 0: Download PDF (URL Only)\n\nIf your PDF is at a web URL, download it first using browser user-agent:\n\n```bash\ncurl -L -A \"Mozilla\u002F5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\u002F537.36 (KHTML, like Gecko) Chrome\u002F120.0.0.0 Safari\u002F537.36\" -o target.pdf \"URL_HERE\"\n```\n\nKey flags:\n- `-L`: Follow redirects\n- `-A`: Set user-agent header to mimic a real browser\n- `-o`: Specify output filename\n\n**If you already have the PDF locally**, skip to Step 1.\n\n### Step 1: Try read_file (Primary Attempt)\n\nFirst, attempt to extract text using the `read_file` tool:\n\n```\nread_file(filetype=\"pdf\", file_path=\"target.pdf\")\n```\n\n**Evaluate the response:**\n\n| Response Type | Interpretation | Next Action |\n|---------------|----------------|-------------|\n| Clean readable text | Success | Proceed to content analysis |\n| Binary data \u002F PNG image \u002F garbled | `read_file` returned raw data | Go to Step 2 immediately |\n| Error \u002F timeout | Tool failure | Go to Step 2 immediately |\n\n**Critical:** If `read_file` returns binary image data or garbled content, **do not retry `read_file`**. Immediately proceed to Step 2.\n\n### Step 2: Use run_shell with pdftotext (Preferred Fallback)\n\nWhen `read_file` fails or returns binary data, use `run_shell` with `pdftotext`:\n\n```bash\nrun_shell(command=\"pdftotext target.pdf output.txt\")\n```\n\nThen read the extracted text:\n\n```\nread_file(filetype=\"txt\", file_path=\"output.txt\")\n```\n\n**If pdftotext is not found**, install it first:\n\n```bash\nrun_shell(command=\"apt-get update && apt-get install -y poppler-utils\")\n# Or for macOS:\nrun_shell(command=\"brew install poppler\")\n```\n\nThen retry:\n\n```bash\nrun_shell(command=\"pdftotext target.pdf output.txt\")\n```\n\n**Verify extraction quality:**\n- Check that `output.txt` exists and has content\n- Sample the text to ensure it's readable (not garbled)\n- If extraction looks corrupted, proceed to Step 3\n\n### Step 3: Use execute_code_sandbox with PyMuPDF (Last Resort)\n\nIf `pdftotext` is unavailable or produces poor results, use Python's PyMuPDF via `execute_code_sandbox`:\n\n```python\nimport fitz  # PyMuPDF\n\ndoc = fitz.open(\"target.pdf\")\ntext = \"\"\nfor page in doc:\n    text += page.get_text()\ndoc.close()\n\nwith open(\"output.txt\", \"w\") as f:\n    f.write(text)\nprint(f\"Extracted {len(text)} characters from {len(doc)} pages\")\n```\n\nExecute via:\n\n```\nexecute_code_sandbox(code=\"\u003Cpython code above>\")\n```\n\nThen read the result:\n\n```\nread_file(filetype=\"txt\", file_path=\"output.txt\")\n```\n\n**Note:** `execute_code_sandbox` may fail with \"unknown error\" in some environments. If this occurs, document the failure and proceed to Step 4.\n\n### Step 4: Graceful Degradation to Domain Knowledge\n\nIf all extraction methods fail:\n\n1. Document the specific failure mode for each tool attempted\n2. Extract any partial content that was successfully retrieved\n3. Supplement missing content from established domain knowledge\n4. Clearly mark which portions are from source vs. generated from knowledge\n5. Provide citations for any claimed requirements or specifications\n\nExample degradation documentation:\n\n```\nEXTRACTION FAILURE REPORT:\n- Source: [URL or file path]\n- read_file: Returned binary\u002Fimage data (no text extraction)\n- run_shell\u002Fpdftotext: [Tool not available \u002F produced garbled output \u002F succeeded]\n- execute_code_sandbox\u002FPyMuPDF: [Failed with unknown error \u002F succeeded]\n\nNOTE: Content below combines partial extraction with established domain \nknowledge for [topic]. Verify against official sources when available.\n```\n\n## Tool Selection Decision Tree\n\n```\n                    PDF to Extract\n                          │\n                          ▼\n                  ┌───────────────┐\n                  │  read_file    │\n                  │  (primary)    │\n                  └───────┬───────┘\n                          │\n            ┌─────────────┼─────────────┐\n            │             │             │\n     Returns text   Returns binary   Error\u002Ftimeout\n        (✓)         \u002F image data         │\n            │             │             │\n            ▼             ▼             ▼\n       SUCCESS    ┌───────────────┐\n                  │ run_shell     │\n                  │ pdftotext     │\n                  └───────┬───────┘\n                          │\n                  ┌───────┼───────┐\n                  │       │       │\n             Succeeds  Not      Garbled\n                (✓)   avail.    output\n                  │       │       │\n                  ▼       ▼       ▼\n             SUCCESS ┌───────────────┐\n                     │ execute_code  │\n                     │ _sandbox      │\n                     │ PyMuPDF       │\n                     └───────┬───────┘\n                             │\n                     ┌───────┼───────┐\n                     │       │       │\n                Succeeds   Fails   Error\n                   (✓)      │       │\n                     │      ▼       │\n                     ▼   Domain     │\n                 SUCCESS  Knowledge │\n                             │      │\n                             └──────┘\n                              FAILURE\n                              DOCUMENTED\n```\n\n## Complete Automated Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# pdf-extract-cascade.sh\n# Implements the full tool cascade for PDF extraction\n\nINPUT=\"$1\"\nOUTPUT_PDF=\"target.pdf\"\nOUTPUT_TXT=\"output.txt\"\n\n# Step 0: Handle URL vs local file\nif [[ \"$INPUT\" =~ ^https?:\u002F\u002F ]]; then\n    echo \"Downloading PDF from URL...\"\n    curl -L -A \"Mozilla\u002F5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\u002F537.36\" -o \"$OUTPUT_PDF\" \"$INPUT\"\nelse\n    if [ ! -f \"$INPUT\" ]; then\n        echo \"ERROR: Local file not found: $INPUT\"\n        exit 1\n    fi\n    OUTPUT_PDF=\"$INPUT\"\nfi\n\n# Step 1: Verify file type\necho \"Verifying file type...\"\nif ! file \"$OUTPUT_PDF\" | grep -q \"PDF document\"; then\n    echo \"WARNING: File is not a valid PDF\"\n    file \"$OUTPUT_PDF\"\nfi\n\n# Step 2: Try pdftotext (shell-first approach)\necho \"Attempting pdftotext extraction...\"\nif command -v pdftotext &> \u002Fdev\u002Fnull; then\n    if pdftotext \"$OUTPUT_PDF\" \"$OUTPUT_TXT\" 2>\u002Fdev\u002Fnull; then\n        if [ -s \"$OUTPUT_TXT\" ]; then\n            echo \"SUCCESS: Extraction completed with pdftotext\"\n            wc -l \"$OUTPUT_TXT\"\n            exit 0\n        fi\n    fi\nfi\n\n# Step 3: Fallback to PyMuPDF\necho \"Falling back to PyMuPDF...\"\npython3 \u003C\u003C 'PYTHON_SCRIPT'\nimport fitz\nimport sys\n\ntry:\n    doc = fitz.open(\"target.pdf\")\n    text = \"\"\n    for page in doc:\n        text += page.get_text()\n    doc.close()\n    with open(\"output.txt\", \"w\") as f:\n        f.write(text)\n    print(f\"SUCCESS: Extracted {len(text)} characters from {len(doc)} pages\")\n    sys.exit(0)\nexcept Exception as e:\n    print(f\"PyMuPDF failed: {e}\")\n    sys.exit(1)\nPYTHON_SCRIPT\n\n# Step 4: Handle complete failure\nif [ $? -ne 0 ]; then\n    echo \"FAILURE: All extraction methods failed\"\n    echo \"ACTION: Generate content from domain knowledge\"\n    echo \"Document each tool's failure mode for future reference\"\n    exit 1\nfi\n```\n\n## Best Practices\n\n1. **Never retry read_file on binary response**: If `read_file` returns image\u002Fbinary data, immediately switch to `run_shell`\n2. **Prefer run_shell over execute_code_sandbox**: Shell tools have higher reliability and fewer sandbox-related errors\n3. **Verify before trusting**: Always check extracted text is readable, not just that the command succeeded\n4. **Document failures**: Record which tools failed and how, to inform future extraction attempts\n5. **Preserve originals**: Keep the source PDF for debugging and re-extraction if needed\n6. **Check tool availability early**: Test for `pdftotext` before starting complex workflows\n\n## Common Failure Modes and Responses\n\n| Symptom | Likely Cause | Recommended Action |\n|---------|--------------|-------------------|\n| read_file returns PNG\u002Fbinary | PDF rendered as image, not parsed | Immediately use run_shell with pdftotext |\n| pdftotext: command not found | poppler-utils not installed | Run `apt-get install poppler-utils` first |\n| pdftotext produces empty file | Password-protected or scanned PDF | Try PyMuPDF, or use OCR tools |\n| execute_code_sandbox \"unknown error\" | Sandbox execution issue | Document failure, use domain knowledge fallback |\n| Garbled text output | Encoding issues | Try PyMuPDF with `page.get_text(\"text\")` |\n| All tools fail | Severely corrupted or encrypted PDF | Document limitation, use knowledge-based content |\n\n## When to Use This Skill\n\n- Extracting text from local PDF files where `read_file` may return binary data\n- Processing PDFs in automated pipelines requiring high reliability\n- Situations where `execute_code_sandbox` has shown instability\n- Working with PDFs from sources that may deliver rendered images instead of parseable text\n- Any workflow where shell tool availability can be assumed or easily installed\n\n## Migration Notes from pdf-download-extract-fallback\n\nThis skill (`pdf-extract-shell-first`) differs from the parent in these key ways:\n\n1. **Explicit tool sequencing**: Clearly prioritizes `read_file` → `run_shell` → `execute_code_sandbox`\n2. **No retry on binary read_file**: Instructs immediate fallback when binary data detected\n3. **Shell-first philosophy**: Emphasizes `pdftotext` via `run_shell` as preferred over Python\n4. **Reduced download focus**: Assumes PDF is available or downloads in pre-step; focuses on extraction cascade\n5. **Decision tree visualization**: Provides clear flowchart for tool selection\n","# PDF Extract with Shell-First Tool Cascade\n\nThis skill provides an optimized workflow for extracting text content from PDF documents (local files or downloaded URLs) using a prioritized tool cascade that favors shell-based extraction before falling back to Python libraries.\n\n## Why Shell-First?\n\nAnalysis of execution patterns shows:\n- `read_file` on PDFs sometimes returns binary\u002Fimage data instead of text\n- `run_shell` with `pdftotext` has higher success rate and fewer sandbox errors\n- `execute_code_sandbox` can fail with \"unknown error\" in constrained environments\n- Shell tools are more reliable for PDF text extraction when available\n\n## Entry Point: Determine Your Starting Point\n\n**Before beginning, identify your scenario:**\n\n| Scenario | Start Here | Skip |\n|----------|-----------|------|\n| PDF already on local disk | Step 1 (Try read_file) | Shell download steps |\n| PDF at a web URL | Shell download, then Step 1 | None |\n| Need maximum reliability | Full cascade (all 3 tools) | None |\n\n## Complete Workflow\n\n### Step 0: Download PDF (URL Only)\n\nIf your PDF is at a web URL, download it first using browser user-agent:\n\n```bash\ncurl -L -A \"Mozilla\u002F5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\u002F537.36 (KHTML, like Gecko) Chrome\u002F120.0.0.0 Safari\u002F537.36\" -o target.pdf \"URL_HERE\"\n```\n\nKey flags:\n- `-L`: Follow redirects\n- `-A`: Set user-agent header to mimic a real browser\n- `-o`: Specify output filename\n\n**If you already have the PDF locally**, skip to Step 1.\n\n### Step 1: Try read_file (Primary Attempt)\n\nFirst, attempt to extract text using the `read_file` tool:\n\n```\nread_file(filetype=\"pdf\", file_path=\"target.pdf\")\n```\n\n**Evaluate the response:**\n\n| Response Type | Interpretation | Next Action |\n|---------------|----------------|-------------|\n| Clean readable text | Success | Proceed to content analysis |\n| Binary data \u002F PNG image \u002F garbled | `read_file` returned raw data | Go to Step 2 immediately |\n| Error \u002F timeout | Tool failure | Go to Step 2 immediately |\n\n**Critical:** If `read_file` returns binary image data or garbled content, **do not retry `read_file`**. Immediately proceed to Step 2.\n\n### Step 2: Use run_shell with pdftotext (Preferred Fallback)\n\nWhen `read_file` fails or returns binary data, use `run_shell` with `pdftotext`:\n\n```bash\nrun_shell(command=\"pdftotext target.pdf output.txt\")\n```\n\nThen read the extracted text:\n\n```\nread_file(filetype=\"txt\", file_path=\"output.txt\")\n```\n\n**If pdftotext is not found**, install it first:\n\n```bash\nrun_shell(command=\"apt-get update && apt-get install -y poppler-utils\")\n# Or for macOS:\nrun_shell(command=\"brew install poppler\")\n```\n\nThen retry:\n\n```bash\nrun_shell(command=\"pdftotext target.pdf output.txt\")\n```\n\n**Verify extraction quality:**\n- Check that `output.txt` exists and has content\n- Sample the text to ensure it's readable (not garbled)\n- If extraction looks corrupted, proceed to Step 3\n\n### Step 3: Use execute_code_sandbox with PyMuPDF (Last Resort)\n\nIf `pdftotext` is unavailable or produces poor results, use Python's PyMuPDF via `execute_code_sandbox`:\n\n```python\nimport fitz  # PyMuPDF\n\ndoc = fitz.open(\"target.pdf\")\ntext = \"\"\nfor page in doc:\n    text += page.get_text()\ndoc.close()\n\nwith open(\"output.txt\", \"w\") as f:\n    f.write(text)\nprint(f\"Extracted {len(text)} characters from {len(doc)} pages\")\n```\n\nExecute via:\n\n```\nexecute_code_sandbox(code=\"\u003Cpython code above>\")\n```\n\nThen read the result:\n\n```\nread_file(filetype=\"txt\", file_path=\"output.txt\")\n```\n\n**Note:** `execute_code_sandbox` may fail with \"unknown error\" in some environments. If this occurs, document the failure and proceed to Step 4.\n\n### Step 4: Graceful Degradation to Domain Knowledge\n\nIf all extraction methods fail:\n\n1. Document the specific failure mode for each tool attempted\n2. Extract any partial content that was successfully retrieved\n3. Supplement missing content from established domain knowledge\n4. Clearly mark which portions are from source vs. generated from knowledge\n5. Provide citations for any claimed requirements or specifications\n\nExample degradation documentation:\n\n```\nEXTRACTION FAILURE REPORT:\n- Source: [URL or file path]\n- read_file: Returned binary\u002Fimage data (no text extraction)\n- run_shell\u002Fpdftotext: [Tool not available \u002F produced garbled output \u002F succeeded]\n- execute_code_sandbox\u002FPyMuPDF: [Failed with unknown error \u002F succeeded]\n\nNOTE: Content below combines partial extraction with established domain \nknowledge for [topic]. Verify against official sources when available.\n```\n\n## Tool Selection Decision Tree\n\n```\n                    PDF to Extract\n                          │\n                          ▼\n                  ┌───────────────┐\n                  │  read_file    │\n                  │  (primary)    │\n                  └───────┬───────┘\n                          │\n            ┌─────────────┼─────────────┐\n            │             │             │\n     Returns text   Returns binary   Error\u002Ftimeout\n        (✓)         \u002F image data         │\n            │             │             │\n            ▼             ▼             ▼\n       SUCCESS    ┌───────────────┐\n                  │ run_shell     │\n                  │ pdftotext     │\n                  └───────┬───────┘\n                          │\n                  ┌───────┼───────┐\n                  │       │       │\n             Succeeds  Not      Garbled\n                (✓)   avail.    output\n                  │       │       │\n                  ▼       ▼       ▼\n             SUCCESS ┌───────────────┐\n                     │ execute_code  │\n                     │ _sandbox      │\n                     │ PyMuPDF       │\n                     └───────┬───────┘\n                             │\n                     ┌───────┼───────┐\n                     │       │       │\n                Succeeds   Fails   Error\n                   (✓)      │       │\n                     │      ▼       │\n                     ▼   Domain     │\n                 SUCCESS  Knowledge │\n                             │      │\n                             └──────┘\n                              FAILURE\n                              DOCUMENTED\n```\n\n## Complete Automated Script\n\n```bash\n#!\u002Fbin\u002Fbash\n# pdf-extract-cascade.sh\n# Implements the full tool cascade for PDF extraction\n\nINPUT=\"$1\"\nOUTPUT_PDF=\"target.pdf\"\nOUTPUT_TXT=\"output.txt\"\n\n# Step 0: Handle URL vs local file\nif [[ \"$INPUT\" =~ ^https?:\u002F\u002F ]]; then\n    echo \"Downloading PDF from URL...\"\n    curl -L -A \"Mozilla\u002F5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\u002F537.36\" -o \"$OUTPUT_PDF\" \"$INPUT\"\nelse\n    if [ ! -f \"$INPUT\" ]; then\n        echo \"ERROR: Local file not found: $INPUT\"\n        exit 1\n    fi\n    OUTPUT_PDF=\"$INPUT\"\nfi\n\n# Step 1: Verify file type\necho \"Verifying file type...\"\nif ! file \"$OUTPUT_PDF\" | grep -q \"PDF document\"; then\n    echo \"WARNING: File is not a valid PDF\"\n    file \"$OUTPUT_PDF\"\nfi\n\n# Step 2: Try pdftotext (shell-first approach)\necho \"Attempting pdftotext extraction...\"\nif command -v pdftotext &> \u002Fdev\u002Fnull; then\n    if pdftotext \"$OUTPUT_PDF\" \"$OUTPUT_TXT\" 2>\u002Fdev\u002Fnull; then\n        if [ -s \"$OUTPUT_TXT\" ]; then\n            echo \"SUCCESS: Extraction completed with pdftotext\"\n            wc -l \"$OUTPUT_TXT\"\n            exit 0\n        fi\n    fi\nfi\n\n# Step 3: Fallback to PyMuPDF\necho \"Falling back to PyMuPDF...\"\npython3 \u003C\u003C 'PYTHON_SCRIPT'\nimport fitz\nimport sys\n\ntry:\n    doc = fitz.open(\"target.pdf\")\n    text = \"\"\n    for page in doc:\n        text += page.get_text()\n    doc.close()\n    with open(\"output.txt\", \"w\") as f:\n        f.write(text)\n    print(f\"SUCCESS: Extracted {len(text)} characters from {len(doc)} pages\")\n    sys.exit(0)\nexcept Exception as e:\n    print(f\"PyMuPDF failed: {e}\")\n    sys.exit(1)\nPYTHON_SCRIPT\n\n# Step 4: Handle complete failure\nif [ $? -ne 0 ]; then\n    echo \"FAILURE: All extraction methods failed\"\n    echo \"ACTION: Generate content from domain knowledge\"\n    echo \"Document each tool's failure mode for future reference\"\n    exit 1\nfi\n```\n\n## Best Practices\n\n1. **Never retry read_file on binary response**: If `read_file` returns image\u002Fbinary data, immediately switch to `run_shell`\n2. **Prefer run_shell over execute_code_sandbox**: Shell tools have higher reliability and fewer sandbox-related errors\n3. **Verify before trusting**: Always check extracted text is readable, not just that the command succeeded\n4. **Document failures**: Record which tools failed and how, to inform future extraction attempts\n5. **Preserve originals**: Keep the source PDF for debugging and re-extraction if needed\n6. **Check tool availability early**: Test for `pdftotext` before starting complex workflows\n\n## Common Failure Modes and Responses\n\n| Symptom | Likely Cause | Recommended Action |\n|---------|--------------|-------------------|\n| read_file returns PNG\u002Fbinary | PDF rendered as image, not parsed | Immediately use run_shell with pdftotext |\n| pdftotext: command not found | poppler-utils not installed | Run `apt-get install poppler-utils` first |\n| pdftotext produces empty file | Password-protected or scanned PDF | Try PyMuPDF, or use OCR tools |\n| execute_code_sandbox \"unknown error\" | Sandbox execution issue | Document failure, use domain knowledge fallback |\n| Garbled text output | Encoding issues | Try PyMuPDF with `page.get_text(\"text\")` |\n| All tools fail | Severely corrupted or encrypted PDF | Document limitation, use knowledge-based content |\n\n## When to Use This Skill\n\n- Extracting text from local PDF files where `read_file` may return binary data\n- Processing PDFs in automated pipelines requiring high reliability\n- Situations where `execute_code_sandbox` has shown instability\n- Working with PDFs from sources that may deliver rendered images instead of parseable text\n- Any workflow where shell tool availability can be assumed or easily installed\n\n## Migration Notes from pdf-download-extract-fallback\n\nThis skill (`pdf-extract-shell-first`) differs from the parent in these key ways:\n\n1. **Explicit tool sequencing**: Clearly prioritizes `read_file` → `run_shell` → `execute_code_sandbox`\n2. **No retry on binary read_file**: Instructs immediate fallback when binary data detected\n3. **Shell-first philosophy**: Emphasizes `pdftotext` via `run_shell` as preferred over Python\n4. **Reduced download focus**: Assumes PDF is available or downloads in pre-step; focuses on extraction cascade\n5. **Decision tree visualization**: Provides clear flowchart for tool selection\n",{"name":5,"description":7},"main","af1b40a42167d09c30b3a63000aa14ace4c1e229","gdpval_bench\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-e27e0c","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":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-extract-shell-first",{"tool":57,"command":58},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-extract-shell-first",{"tool":60,"command":61},"pnpm","pnpm dlx skills add xyliu-cs\u002FOpenSpace-GDPval --skill pdf-extract-shell-first","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-e27e0c\u002FSKILL.md",true,[65],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},".skill_id","OTHER","其他",59,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-e27e0c\u002F.skill_id",[72,85,93,108,133,150],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":38},"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",[],[79,80,81,82,83,84],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":38},"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",[],[92,80,82,83,84],"zip deliverable finalization",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":38},"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",[],[100,101,102,103,104,35,105,106,84,107],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","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":38},"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","适用职业",[34,120,121,122,123,124,125,126,127,128,129,130,131,132],"write","file","report","write file fallback report","domain","professional","sources","retrieval","generate","embedded","documents","data","knowledge",{"skillNo":134,"name":135,"nameZh":6,"description":136,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":137,"categories":138,"keywords":142,"publishedAt":38},"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",[139],{"categoryNo":140,"categoryName":141,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[143,35,34,144,145,26,130,128,121,146,32,33,120,147,125,148,149],"fallback doc with delegation","doc","delegation","markdown","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":38},"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},[34,122,158,159,128,121,160,161,120,162,163,127,35,164,130],"context","context anchored fallback report","Guardrails","Tools","task","drift","context drift"]