[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6HWMWM58PMS0HF3A3GTA4BB":3,"skill-same:01M6HWMWM58PMS0HF3A3GTA4BB":75},{"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":42,"linkOnly":43,"markdownContent":44,"markdownBody":45,"frontMatter":46,"refName":47,"commitSha":48,"skillDirectory":49,"forksCount":50,"repositoryHtmlUrl":51,"repositoryHomepageUrl":6,"ownerHtmlUrl":52,"ownerBlogUrl":53,"ownerDescription":6,"updatedAt":54,"install":55,"resources":68},"01M6HWMWM58PMS0HF3A3GTA4BB","pdf-extract-progressive-tools",null,"Progressive tool-chain PDF extraction with explicit read_file, run_shell, and execute_code_sandbox sequencing","HKUDS\u002FAgentPilot","HKUDS","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F118165258?v=4","01M6HW8VRNZP64G0P4MVJW2KKQ","✨Data Intelligence Lab@HKU✨","01M6HW8VWZVHBRHYH3T330PFWV",8029,"MIT","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fbenchmarks\u002Fgdpval\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-899f5b\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,38,39,40,41],"pdf extract progressive tools","pdf extract","Tools","extract","PDF","read","pdf extraction","with","sequencing","chain","execute","tool","shell","file","extraction","code","run","sandbox","2026-11-10 10:12:30",false,"---\nname: pdf-extract-progressive-tools\ndescription: Progressive tool-chain PDF extraction with explicit read_file, run_shell, and execute_code_sandbox sequencing\n---\n\n# PDF Text Extraction with Progressive Tool Fallback\n\nThis skill provides a robust workflow for extracting text from PDF documents using a sequenced approach with agent tools, with explicit fallback mechanisms based on observed tool behavior.\n\n## Critical Insight from Execution Data\n\n**read_file often returns binary\u002Fimage data for PDFs, not extracted text.** When this occurs, immediately escalate to run_shell with pdftotext before attempting Python-based extraction.\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 (read_file attempt) | Download steps |\n| PDF at a web URL | Download first, then Step 1 | None |\n| PDF content already extracted | Step 4 (Quality verification) | Steps 1-3 |\n\n## Overview\n\nPDF extraction failures cascade when tool sequencing is unclear. This workflow ensures maximum success rate through **explicit tool progression**:\n\n1. **read_file** - Quick attempt, but may return binary data\n2. **run_shell + pdftotext** - Reliable extraction when read_file fails\n3. **execute_code_sandbox + PyMuPDF** - Final fallback for complex PDFs\n\n## Step-by-Step Instructions\n\n### Step 1: Attempt read_file First\n\nAlways try the simplest approach first:\n\n```\nTool: read_file\nPath: document.pdf\n```\n\n**Expected outcome:** Extracted text content\n\n**Critical check:** Examine the returned content:\n- ✅ **Text visible:** Proceed to Step 4 (Quality verification)\n- ⚠️ **Binary\u002Fimage data detected:** Immediately proceed to Step 2\n- ❌ **File not found:** Verify path or download first\n\n**Binary data indicators:**\n- Content starts with `%PDF-` header without text extraction\n- Content appears as garbled characters or base64\n- Content contains PNG\u002FJPEG markers within PDF wrapper\n- File size seems reasonable but no readable text\n\n### Step 2: Escalate to run_shell with pdftotext\n\n**When read_file returns binary data, do NOT attempt execute_code_sandbox yet.** Use run_shell immediately:\n\n```\nTool: run_shell\nCommand: pdftotext document.pdf document.txt\n```\n\nIf pdftotext is not available:\n\n```\nTool: run_shell\nCommand: apt-get update && apt-get install -y poppler-utils && pdftotext document.pdf document.txt\n```\n\n**Then read the extracted text:**\n\n```\nTool: read_file\nPath: document.txt\n```\n\n**Expected outcome:** Clean text extraction\n\n**If this fails:**\n- Check if file is password-protected\n- Check if file is corrupted (run `file document.pdf`)\n- Proceed to Step 3\n\n### Step 3: Final Fallback to execute_code_sandbox with PyMuPDF\n\nOnly attempt this if Steps 1-2 fail:\n\n```\nTool: execute_code_sandbox\nLanguage: python\nCode: |\n  import fitz  # PyMuPDF\n  \n  try:\n      doc = fitz.open(\"document.pdf\")\n      text = \"\"\n      for page in doc:\n          text += page.get_text()\n      doc.close()\n      \n      with open(\"document_pymupdf.txt\", \"w\") as f:\n          f.write(text)\n      \n      print(\"SUCCESS: Extracted {} characters\".format(len(text)))\n  except Exception as e:\n      print(f\"FAILED: {e}\")\n```\n\n**Then read the result:**\n\n```\nTool: read_file\nPath: document_pymupdf.txt\n```\n\n### Step 4: Quality Verification\n\nRegardless of which method succeeded, verify extraction quality:\n\n1. **Check text length:** Should be proportional to PDF pages (~500-2000 chars per page)\n2. **Check readability:** Text should form coherent sentences\n3. **Check for truncation:** Look for cut-off words or missing sections\n4. **Compare methods:** If multiple methods worked, compare outputs\n\n**If quality is poor:**\n- Try alternative extraction tools (pdfplumber, camelot-py for tables)\n- Consider OCR for scanned documents\n- Document limitations clearly\n\n### Step 5: 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\n**Example degradation note:**\n\n```\nNOTE: Source document [path\u002FURL] was inaccessible due to [specific tool failures].\nContent below combines partial extraction with established domain knowledge \nfor [topic]. All claims verified against [alternative sources] where possible.\n\nTool Failure Log:\n- read_file: Returned binary data (no text extraction)\n- run_shell\u002Fpdftotext: Command not available in environment\n- execute_code_sandbox\u002FPyMuPDF: Sandbox execution failed with [error]\n```\n\n## Complete Tool Orchestration Script\n\n```python\n# pdf-extract-orchestrator.py\n# Implements the progressive tool fallback pattern\n\ndef extract_pdf_text(pdf_path):\n    \"\"\"\n    Progressive PDF extraction following tool precedence:\n    1. read_file (quick check)\n    2. run_shell + pdftotext (primary extraction)\n    3. execute_code_sandbox + PyMuPDF (final fallback)\n    \"\"\"\n    extraction_log = []\n    \n    # Step 1: Try read_file\n    print(\"Step 1: Attempting read_file...\")\n    try:\n        content = read_file(pdf_path)\n        if is_binary_or_image_data(content):\n            extraction_log.append(\"read_file: Returned binary data\")\n            # Proceed to Step 2\n        else:\n            extraction_log.append(\"read_file: Success\")\n            return content, extraction_log\n    except Exception as e:\n        extraction_log.append(f\"read_file: Failed - {e}\")\n    \n    # Step 2: Try run_shell with pdftotext\n    print(\"Step 2: Attempting run_shell + pdftotext...\")\n    try:\n        run_shell(f\"pdftotext {pdf_path} output.txt\")\n        content = read_file(\"output.txt\")\n        if content and len(content) > 100:\n            extraction_log.append(\"run_shell\u002Fpdftotext: Success\")\n            return content, extraction_log\n        else:\n            extraction_log.append(\"run_shell\u002Fpdftotext: Empty extraction\")\n    except Exception as e:\n        extraction_log.append(f\"run_shell\u002Fpdftotext: Failed - {e}\")\n    \n    # Step 3: Try execute_code_sandbox with PyMuPDF\n    print(\"Step 3: Attempting execute_code_sandbox + PyMuPDF...\")\n    try:\n        code = \"\"\"\nimport fitz\ndoc = fitz.open(\"\"\"\" + pdf_path + \"\"\"\")\ntext = \"\"\nfor page in doc:\n    text += page.get_text()\ndoc.close()\nprint(text[:1000])  # Preview\n\"\"\"\n        result = execute_code_sandbox(language=\"python\", code=code)\n        extraction_log.append(\"execute_code_sandbox\u002FPyMuPDF: Success\")\n        return result, extraction_log\n    except Exception as e:\n        extraction_log.append(f\"execute_code_sandbox\u002FPyMuPDF: Failed - {e}\")\n    \n    # Step 4: All methods failed\n    extraction_log.append(\"ALL METHODS FAILED - Escalate to domain knowledge\")\n    return None, extraction_log\n\ndef is_binary_or_image_data(content):\n    \"\"\"Detect if content is binary\u002Fimage data rather than extracted text\"\"\"\n    if not content:\n        return True\n    # Check for PDF header without text extraction\n    if content.startswith(\"%PDF-\"):\n        return True\n    # Check for high ratio of non-printable characters\n    non_printable = sum(1 for c in content if ord(c) \u003C 32 and c not in '\\n\\r\\t')\n    if len(content) > 0 and non_printable \u002F len(content) > 0.1:\n        return True\n    return False\n```\n\n## Tool Precedence Decision Tree\n\n```\n                    ┌─────────────────┐\n                    │  Start: PDF     │\n                    │  Available?     │\n                    └────────┬────────┘\n                             │\n                    ┌────────▼────────┐\n                    │   Step 1:       │\n                    │   read_file     │\n                    └────────┬────────┘\n                             │\n              ┌──────────────┼──────────────┐\n              │              │              │\n        ┌─────▼─────┐  ┌─────▼─────┐  ┌─────▼─────┐\n        │  Text     │  │  Binary   │  │  Error\u002F   │\n        │  Returned │  │  Data     │  │  Not Found│\n        └─────┬─────┘  └─────┬─────┘  └─────┬─────┘\n              │              │              │\n              │         ┌────▼─────┐  ┌────▼─────┐\n              │         │ Step 2:  │  │ Download │\n              │         │ run_shell│  │ or Fix   │\n              │         │ pdftotext│  │ Path     │\n              │         └────┬─────┘  └──────────┘\n              │              │\n              │         ┌────▼─────┐\n              │         │ Success? │\n              │         └────┬─────┘\n              │              │\n        ┌─────▼─────┐  ┌─────▼─────┐\n        │  Yes      │  │  No       │\n        └─────┬─────┘  └─────┬─────┘\n              │              │\n              │         ┌────▼─────────┐\n              │         │ Step 3:      │\n              │         │ execute_     │\n              │         │ code_sandbox │\n              │         │ PyMuPDF      │\n              │         └──────────────┘\n              │\n        ┌─────▼──────────────────┐\n        │  Step 4: Quality Check │\n        │  Step 5: Document      │\n        │  Limitations           │\n        └────────────────────────┘\n```\n\n## Best Practices\n\n1. **Check read_file output immediately:** Don't assume it extracted text - verify before proceeding\n2. **Escalate quickly on binary data:** Don't waste iterations trying read_file multiple times\n3. **Prefer run_shell over execute_code_sandbox:** Shell tools are more reliable for PDF extraction when available\n4. **Log each tool attempt:** Document which method succeeded for future reference\n5. **Preserve extraction artifacts:** Keep intermediate files for debugging\n6. **Verify extraction quality:** Check text length and readability before accepting results\n7. **Document tool failures:** When falling back to domain knowledge, specify which tools failed and why\n\n## Common Failure Modes by Tool\n\n| Tool | Symptom | Cause | Solution |\n|------|---------|-------|----------|\n| read_file | Binary PDF data | Tool doesn't extract PDF text | Escalate to run_shell immediately |\n| read_file | PNG\u002FJPEG data | PDF contains embedded images | Use OCR tools or request text version |\n| run_shell | pdftotext not found | Tool not installed | Install poppler-utils first |\n| run_shell | Empty output | Password-protected PDF | Request accessible version |\n| execute_code_sandbox | Unknown error | Sandbox execution issue | Try run_shell alternative or document limitation |\n| execute_code_sandbox | Import error | PyMuPDF not installed | Include pip install in script |\n\n## When to Use This Skill\n\n- **PDFs from web downloads:** After downloading, apply this extraction workflow\n- **PDFs already local:** Start at Step 1 with existing file path\n- **Automated document processing:** Where reliability matters more than speed\n- **Regulatory\u002Fcompliance documents:** Where source verification is critical\n- **Situations with tool uncertainty:** When environment capabilities are unknown\n\n## Migration from Parent Skill\n\nThis skill enhances `pdf-download-extract-fallback` by:\n\n1. **Explicit tool sequencing:** Parent described shell commands; this specifies agent tool order\n2. **Binary detection:** Parent assumed download success; this checks read_file output quality\n3. **Faster escalation:** Parent tried pdftotext then PyMuPDF; this escalates immediately on binary data\n4. **Agent-focused:** Parent was shell-script focused; this is optimized for agent tool calls\n5. **Execution insights:** Incorporates learnings from failed task 0353ee0c showing read_file limitations\n","# PDF Text Extraction with Progressive Tool Fallback\n\nThis skill provides a robust workflow for extracting text from PDF documents using a sequenced approach with agent tools, with explicit fallback mechanisms based on observed tool behavior.\n\n## Critical Insight from Execution Data\n\n**read_file often returns binary\u002Fimage data for PDFs, not extracted text.** When this occurs, immediately escalate to run_shell with pdftotext before attempting Python-based extraction.\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 (read_file attempt) | Download steps |\n| PDF at a web URL | Download first, then Step 1 | None |\n| PDF content already extracted | Step 4 (Quality verification) | Steps 1-3 |\n\n## Overview\n\nPDF extraction failures cascade when tool sequencing is unclear. This workflow ensures maximum success rate through **explicit tool progression**:\n\n1. **read_file** - Quick attempt, but may return binary data\n2. **run_shell + pdftotext** - Reliable extraction when read_file fails\n3. **execute_code_sandbox + PyMuPDF** - Final fallback for complex PDFs\n\n## Step-by-Step Instructions\n\n### Step 1: Attempt read_file First\n\nAlways try the simplest approach first:\n\n```\nTool: read_file\nPath: document.pdf\n```\n\n**Expected outcome:** Extracted text content\n\n**Critical check:** Examine the returned content:\n- ✅ **Text visible:** Proceed to Step 4 (Quality verification)\n- ⚠️ **Binary\u002Fimage data detected:** Immediately proceed to Step 2\n- ❌ **File not found:** Verify path or download first\n\n**Binary data indicators:**\n- Content starts with `%PDF-` header without text extraction\n- Content appears as garbled characters or base64\n- Content contains PNG\u002FJPEG markers within PDF wrapper\n- File size seems reasonable but no readable text\n\n### Step 2: Escalate to run_shell with pdftotext\n\n**When read_file returns binary data, do NOT attempt execute_code_sandbox yet.** Use run_shell immediately:\n\n```\nTool: run_shell\nCommand: pdftotext document.pdf document.txt\n```\n\nIf pdftotext is not available:\n\n```\nTool: run_shell\nCommand: apt-get update && apt-get install -y poppler-utils && pdftotext document.pdf document.txt\n```\n\n**Then read the extracted text:**\n\n```\nTool: read_file\nPath: document.txt\n```\n\n**Expected outcome:** Clean text extraction\n\n**If this fails:**\n- Check if file is password-protected\n- Check if file is corrupted (run `file document.pdf`)\n- Proceed to Step 3\n\n### Step 3: Final Fallback to execute_code_sandbox with PyMuPDF\n\nOnly attempt this if Steps 1-2 fail:\n\n```\nTool: execute_code_sandbox\nLanguage: python\nCode: |\n  import fitz  # PyMuPDF\n  \n  try:\n      doc = fitz.open(\"document.pdf\")\n      text = \"\"\n      for page in doc:\n          text += page.get_text()\n      doc.close()\n      \n      with open(\"document_pymupdf.txt\", \"w\") as f:\n          f.write(text)\n      \n      print(\"SUCCESS: Extracted {} characters\".format(len(text)))\n  except Exception as e:\n      print(f\"FAILED: {e}\")\n```\n\n**Then read the result:**\n\n```\nTool: read_file\nPath: document_pymupdf.txt\n```\n\n### Step 4: Quality Verification\n\nRegardless of which method succeeded, verify extraction quality:\n\n1. **Check text length:** Should be proportional to PDF pages (~500-2000 chars per page)\n2. **Check readability:** Text should form coherent sentences\n3. **Check for truncation:** Look for cut-off words or missing sections\n4. **Compare methods:** If multiple methods worked, compare outputs\n\n**If quality is poor:**\n- Try alternative extraction tools (pdfplumber, camelot-py for tables)\n- Consider OCR for scanned documents\n- Document limitations clearly\n\n### Step 5: 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\n**Example degradation note:**\n\n```\nNOTE: Source document [path\u002FURL] was inaccessible due to [specific tool failures].\nContent below combines partial extraction with established domain knowledge \nfor [topic]. All claims verified against [alternative sources] where possible.\n\nTool Failure Log:\n- read_file: Returned binary data (no text extraction)\n- run_shell\u002Fpdftotext: Command not available in environment\n- execute_code_sandbox\u002FPyMuPDF: Sandbox execution failed with [error]\n```\n\n## Complete Tool Orchestration Script\n\n```python\n# pdf-extract-orchestrator.py\n# Implements the progressive tool fallback pattern\n\ndef extract_pdf_text(pdf_path):\n    \"\"\"\n    Progressive PDF extraction following tool precedence:\n    1. read_file (quick check)\n    2. run_shell + pdftotext (primary extraction)\n    3. execute_code_sandbox + PyMuPDF (final fallback)\n    \"\"\"\n    extraction_log = []\n    \n    # Step 1: Try read_file\n    print(\"Step 1: Attempting read_file...\")\n    try:\n        content = read_file(pdf_path)\n        if is_binary_or_image_data(content):\n            extraction_log.append(\"read_file: Returned binary data\")\n            # Proceed to Step 2\n        else:\n            extraction_log.append(\"read_file: Success\")\n            return content, extraction_log\n    except Exception as e:\n        extraction_log.append(f\"read_file: Failed - {e}\")\n    \n    # Step 2: Try run_shell with pdftotext\n    print(\"Step 2: Attempting run_shell + pdftotext...\")\n    try:\n        run_shell(f\"pdftotext {pdf_path} output.txt\")\n        content = read_file(\"output.txt\")\n        if content and len(content) > 100:\n            extraction_log.append(\"run_shell\u002Fpdftotext: Success\")\n            return content, extraction_log\n        else:\n            extraction_log.append(\"run_shell\u002Fpdftotext: Empty extraction\")\n    except Exception as e:\n        extraction_log.append(f\"run_shell\u002Fpdftotext: Failed - {e}\")\n    \n    # Step 3: Try execute_code_sandbox with PyMuPDF\n    print(\"Step 3: Attempting execute_code_sandbox + PyMuPDF...\")\n    try:\n        code = \"\"\"\nimport fitz\ndoc = fitz.open(\"\"\"\" + pdf_path + \"\"\"\")\ntext = \"\"\nfor page in doc:\n    text += page.get_text()\ndoc.close()\nprint(text[:1000])  # Preview\n\"\"\"\n        result = execute_code_sandbox(language=\"python\", code=code)\n        extraction_log.append(\"execute_code_sandbox\u002FPyMuPDF: Success\")\n        return result, extraction_log\n    except Exception as e:\n        extraction_log.append(f\"execute_code_sandbox\u002FPyMuPDF: Failed - {e}\")\n    \n    # Step 4: All methods failed\n    extraction_log.append(\"ALL METHODS FAILED - Escalate to domain knowledge\")\n    return None, extraction_log\n\ndef is_binary_or_image_data(content):\n    \"\"\"Detect if content is binary\u002Fimage data rather than extracted text\"\"\"\n    if not content:\n        return True\n    # Check for PDF header without text extraction\n    if content.startswith(\"%PDF-\"):\n        return True\n    # Check for high ratio of non-printable characters\n    non_printable = sum(1 for c in content if ord(c) \u003C 32 and c not in '\\n\\r\\t')\n    if len(content) > 0 and non_printable \u002F len(content) > 0.1:\n        return True\n    return False\n```\n\n## Tool Precedence Decision Tree\n\n```\n                    ┌─────────────────┐\n                    │  Start: PDF     │\n                    │  Available?     │\n                    └────────┬────────┘\n                             │\n                    ┌────────▼────────┐\n                    │   Step 1:       │\n                    │   read_file     │\n                    └────────┬────────┘\n                             │\n              ┌──────────────┼──────────────┐\n              │              │              │\n        ┌─────▼─────┐  ┌─────▼─────┐  ┌─────▼─────┐\n        │  Text     │  │  Binary   │  │  Error\u002F   │\n        │  Returned │  │  Data     │  │  Not Found│\n        └─────┬─────┘  └─────┬─────┘  └─────┬─────┘\n              │              │              │\n              │         ┌────▼─────┐  ┌────▼─────┐\n              │         │ Step 2:  │  │ Download │\n              │         │ run_shell│  │ or Fix   │\n              │         │ pdftotext│  │ Path     │\n              │         └────┬─────┘  └──────────┘\n              │              │\n              │         ┌────▼─────┐\n              │         │ Success? │\n              │         └────┬─────┘\n              │              │\n        ┌─────▼─────┐  ┌─────▼─────┐\n        │  Yes      │  │  No       │\n        └─────┬─────┘  └─────┬─────┘\n              │              │\n              │         ┌────▼─────────┐\n              │         │ Step 3:      │\n              │         │ execute_     │\n              │         │ code_sandbox │\n              │         │ PyMuPDF      │\n              │         └──────────────┘\n              │\n        ┌─────▼──────────────────┐\n        │  Step 4: Quality Check │\n        │  Step 5: Document      │\n        │  Limitations           │\n        └────────────────────────┘\n```\n\n## Best Practices\n\n1. **Check read_file output immediately:** Don't assume it extracted text - verify before proceeding\n2. **Escalate quickly on binary data:** Don't waste iterations trying read_file multiple times\n3. **Prefer run_shell over execute_code_sandbox:** Shell tools are more reliable for PDF extraction when available\n4. **Log each tool attempt:** Document which method succeeded for future reference\n5. **Preserve extraction artifacts:** Keep intermediate files for debugging\n6. **Verify extraction quality:** Check text length and readability before accepting results\n7. **Document tool failures:** When falling back to domain knowledge, specify which tools failed and why\n\n## Common Failure Modes by Tool\n\n| Tool | Symptom | Cause | Solution |\n|------|---------|-------|----------|\n| read_file | Binary PDF data | Tool doesn't extract PDF text | Escalate to run_shell immediately |\n| read_file | PNG\u002FJPEG data | PDF contains embedded images | Use OCR tools or request text version |\n| run_shell | pdftotext not found | Tool not installed | Install poppler-utils first |\n| run_shell | Empty output | Password-protected PDF | Request accessible version |\n| execute_code_sandbox | Unknown error | Sandbox execution issue | Try run_shell alternative or document limitation |\n| execute_code_sandbox | Import error | PyMuPDF not installed | Include pip install in script |\n\n## When to Use This Skill\n\n- **PDFs from web downloads:** After downloading, apply this extraction workflow\n- **PDFs already local:** Start at Step 1 with existing file path\n- **Automated document processing:** Where reliability matters more than speed\n- **Regulatory\u002Fcompliance documents:** Where source verification is critical\n- **Situations with tool uncertainty:** When environment capabilities are unknown\n\n## Migration from Parent Skill\n\nThis skill enhances `pdf-download-extract-fallback` by:\n\n1. **Explicit tool sequencing:** Parent described shell commands; this specifies agent tool order\n2. **Binary detection:** Parent assumed download success; this checks read_file output quality\n3. **Faster escalation:** Parent tried pdftotext then PyMuPDF; this escalates immediately on binary data\n4. **Agent-focused:** Parent was shell-script focused; this is optimized for agent tool calls\n5. **Execution insights:** Incorporates learnings from failed task 0353ee0c showing read_file limitations\n",{"name":5,"description":7},"main","6b84b0689ca0d9e7b1e4061188ff6b60758e0f8a","openspace\u002Fbenchmarks\u002Fgdpval\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-899f5b",944,"https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot","https:\u002F\u002Fgithub.com\u002FHKUDS","https:\u002F\u002Fsites.google.com\u002Fview\u002Fchaoh","2026-11-12 22:26:39",{"source":8,"skillName":5,"commands":56,"prompt":66,"zipAvailable":67},[57,60,63],{"tool":58,"command":59},"npx","npx skills add HKUDS\u002FAgentPilot --skill pdf-extract-progressive-tools",{"tool":61,"command":62},"bunx","bunx skills add HKUDS\u002FAgentPilot --skill pdf-extract-progressive-tools",{"tool":64,"command":65},"pnpm","pnpm dlx skills add HKUDS\u002FAgentPilot --skill pdf-extract-progressive-tools","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fbenchmarks\u002Fgdpval\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-899f5b\u002FSKILL.md",true,[69],{"path":70,"resourceType":71,"resourceTypeDesc":72,"sizeBytes":73,"sourceHtmlUrl":74},".skill_id","OTHER","其他",59,"https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fbenchmarks\u002Fgdpval\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-899f5b\u002F.skill_id",[76,94,113,135,158,180],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":42},"01M6HYB297NDABRERJRVG0K8R0","agentpilot","Set up AgentPilot and use its single entry to prepare missing inputs and run configured RSI experiments. Use when the user requests AgentPilot installation or work with AgentPilot.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fplugins\u002Fagentpilot\u002Fskills\u002Fagentpilot\u002FSKILL.md",[],[78,83,84,31,85,86,87,88,89,90,91,92,40,93],"prepare","requests","missing","installation","rsi","up","use","user","work","SET","experiments",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":42},"01M6HYAYWXTTE1J7DJM0MFNQ4H","remember","Review auto-memory entries and propose promotions to OPENSPACE.md, OPENSPACE.local.md, or retained auto-memory topics; detect duplicates, stale facts, conflicts, and ambiguous entries before making changes.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fskills\u002Fremember\u002FSKILL.md",[],[96,101,102,103,104,105,106,107,108,109,110,111,112],"memory","review","auto","openspace","changes","facts","detect","entries","local","conflicts","stale","duplicates",{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":117,"categories":118,"keywords":122,"publishedAt":42},"01M6HYAVMPM4SBDV60R2B5HPV8","skill-discovery","Search reusable OpenSpace skills locally, and browse cloud packages step by step when a cloud skill may help. Reusing proven skills saves tokens, improves reliability, and extends your capabilities beyond built-in tools.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fhost_skills\u002Fskill-discovery\u002FSKILL.md",[119],{"categoryNo":120,"categoryName":121,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[123,124,125,104,126,127,128,129,130,131,132,133,134,26],"skill discovery","discovery","reusable","step by step","tokens","packages","help","cloud","reliability","capabilities","browse","search",{"skillNo":136,"name":137,"nameZh":6,"description":138,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":139,"categories":140,"keywords":142,"publishedAt":42},"01M6HYAR811B3RB0M50RBEDGN6","delegate-task","Delegate tasks to OpenSpace — a full-stack autonomous worker for coding, DevOps, web research, and desktop automation, backed by an extensive MCP tool and skill library. Skills auto-improve through use, reducing token consumption over time. A cloud community lets agents share and collectively evolve reusable skills.","https:\u002F\u002Fgithub.com\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Fopenspace\u002Fhost_skills\u002Fdelegate-task\u002FSKILL.md",[141],{"categoryNo":120,"categoryName":121,"taxonomyType":21,"taxonomyTypeDesc":22},[143,144,145,104,146,147,148,149,150,125,103,89,151,35,152,153,154,155,156,157],"delegate","task","delegate task","time","improve","desktop automation","worker","community","autonomous","stack","for","share","tasks","automation","MCP",{"skillNo":159,"name":160,"nameZh":6,"description":161,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":162,"categories":163,"keywords":164,"publishedAt":42},"01M6HYAM9FSGV6E52AYENDQXYH","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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[165,166,167,168,169,170,171,172,37,173,174,175,176,177,153,178,179],"write special chars ts check","write","check","type","files","filters","only","template","python","typescript","output","Existing","type-checking","errors","script",{"skillNo":181,"name":182,"nameZh":6,"description":183,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":184,"categories":185,"keywords":186,"publishedAt":42},"01M6HYAH05HGV7SVWSVR8PJRQD","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\u002FHKUDS\u002FAgentPilot\u002Fblob\u002Fmain\u002Fopenspace\u002Flegacy\u002Fv1\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[187,188,166,31,153,179,189,190,191,192,29,172,37,193,194,173],"write special chars readback","readback","helper","post","via","scripts","verification","cleanup"]