[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBSP2SS51R6ZJKWCDEG59J":3,"skill-same:01M6XBSP2SS51R6ZJKWCDEG59J":70},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":22,"publishedAt":39,"linkOnly":40,"markdownContent":41,"markdownBody":42,"frontMatter":43,"refName":44,"commitSha":45,"skillDirectory":46,"forksCount":13,"repositoryHtmlUrl":47,"repositoryHomepageUrl":6,"ownerHtmlUrl":48,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":49,"install":50,"resources":63},"01M6XBSP2SS51R6ZJKWCDEG59J","pdf-text-extraction-fallback-85d5ca",null,"Fallback workflow for extracting text from PDFs when read_file returns binary data","UF-gzj\u002Fopenspace-claude-evolution","UF-gzj","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F272393507?v=4","01M6XBCZB755P01VVYGQWPYZY3","01M6XBCZFJA5AREA17WGETA3FW",0,"MIT","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback-85d5ca\u002FSKILL.md",[17],{"categoryNo":18,"categoryName":19,"taxonomyType":20,"taxonomyTypeDesc":21},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",[23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38],"PDF","extraction","text","fallback","pdf text extraction fallback 85d5ca","pdf text extraction fallback","pdf text extraction","workflow","file","data","returns","read","binary","extracting","for","when","2026-11-10 10:12:30",false,"---\nname: pdf-text-extraction-fallback-85d5ca\ndescription: Fallback workflow for extracting text from PDFs when read_file returns binary data\n---\n\n# PDF Text Extraction Fallback\n\nUse this skill when `read_file` returns binary data or garbled content for PDF files instead of readable text. This workflow provides a reliable fallback using command-line PDF tools.\n\n## When to Use\n\n- `read_file` with `filetype: pdf` returns binary data, unreadable characters, or errors\n- You need to extract text from a PDF to process its contents\n- Standard file reading methods fail to extract usable text\n\n## Step-by-Step Instructions\n\n### Step 1: Detect Binary\u002FUnreadable PDF Output\n\nAfter attempting to read a PDF with `read_file`, check if the output is:\n- Binary data (contains null bytes, non-printable characters)\n- Garbled text with many special characters\n- Empty or truncated content\n\n```\n# Example of problematic output from read_file\n%PDF-1.4\n1 0 obj\n\u003C\u003C \u002FType \u002FCatalog ...\n```\n\nIf the output looks like raw PDF structure or binary, proceed to Step 2.\n\n### Step 2: Use shell_agent with PDF Tools\n\nInvoke `shell_agent` to extract text using `pdftotext` (preferred) or `pdfplumber` (Python fallback):\n\n```\nTask: Extract all text content from \u003Cfilename.pdf> using pdftotext or pdfplumber.\nOutput the extracted text in readable format. If pdftotext is not available, use Python with pdfplumber library.\n```\n\n**Example shell_agent invocation:**\n```\nshell_agent task=\"Extract text from Move_Out_Inspection_Tracker.pdf using pdftotext. Save output to a .txt file and return the content.\"\n```\n\n### Step 3: Validate Extracted Content\n\nAfter extraction, validate that the content contains expected text patterns:\n\n```python\n# Validation checklist\ndef validate_pdf_extraction(text, expected_patterns=None):\n    checks = [\n        bool(text.strip()),  # Not empty\n        len(text) > 50,  # Has substantial content\n        not text.startswith('%PDF'),  # Not raw PDF structure\n    ]\n    \n    if expected_patterns:\n        for pattern in expected_patterns:\n            checks.append(pattern.lower() in text.lower())\n    \n    return all(checks)\n```\n\n**Common expected patterns to check:**\n- Document-specific keywords (e.g., \"inspection\", \"resident\", \"date\")\n- Expected data formats (dates, names, IDs)\n- Minimum word count threshold\n\n### Step 4: Handle Extraction Failures\n\nIf validation fails:\n\n1. **Try alternative tool:** If `pdftotext` failed, try `pdfplumber`:\n   ```\n   shell_agent task=\"Extract text from \u003Cfile.pdf> using Python pdfplumber library. Handle any encoding issues.\"\n   ```\n\n2. **Try OCR fallback:** For scanned PDFs:\n   ```\n   shell_agent task=\"This PDF may be scanned. Use pytesseract or similar OCR tool to extract text from \u003Cfile.pdf>.\"\n   ```\n\n3. **Report specific error:** Document what patterns were expected but not found.\n\n### Step 5: Proceed with Data Processing\n\nOnce validated text is obtained:\n- Parse the extracted text for required data\n- Store or process the content as needed\n- Continue with the original task workflow\n\n## Code Example\n\n```python\n# Complete extraction workflow\ndef extract_pdf_text_fallback(pdf_path, expected_patterns=None):\n    \"\"\"Extract text from PDF with fallback handling.\"\"\"\n    \n    # Step 1: Try read_file first\n    content = read_file(filetype=\"pdf\", file_path=pdf_path)\n    \n    # Step 2: Check if binary\u002Funreadable\n    if is_binary_or_garbled(content):\n        # Step 3: Use shell_agent fallback\n        result = shell_agent(\n            task=f\"Extract all text from {pdf_path} using pdftotext. Return the text content.\"\n        )\n        content = result.stdout\n        \n        # Step 4: Validate\n        if not validate_pdf_extraction(content, expected_patterns):\n            # Try pdfplumber as secondary fallback\n            result = shell_agent(\n                task=f\"Extract text from {pdf_path} using Python pdfplumber library.\"\n            )\n            content = result.stdout\n    \n    return content\n\ndef is_binary_or_garbled(text):\n    \"\"\"Check if text appears to be binary or unreadable.\"\"\"\n    if not text:\n        return True\n    if text.startswith('%PDF'):\n        return True\n    # Check for high ratio of non-printable characters\n    non_printable = sum(1 for c in text if ord(c) > 127 or ord(c) \u003C 32)\n    return non_printable \u002F len(text) > 0.3\n```\n\n## Tips\n\n- **pdftotext** is typically faster and pre-installed on many systems\n- **pdfplumber** handles complex layouts better but requires Python\n- For **scanned PDFs**, you'll need OCR tools (tesseract, pytesseract)\n- Always validate extracted content matches your expected data patterns\n- Save intermediate extraction results for debugging if needed","# PDF Text Extraction Fallback\n\nUse this skill when `read_file` returns binary data or garbled content for PDF files instead of readable text. This workflow provides a reliable fallback using command-line PDF tools.\n\n## When to Use\n\n- `read_file` with `filetype: pdf` returns binary data, unreadable characters, or errors\n- You need to extract text from a PDF to process its contents\n- Standard file reading methods fail to extract usable text\n\n## Step-by-Step Instructions\n\n### Step 1: Detect Binary\u002FUnreadable PDF Output\n\nAfter attempting to read a PDF with `read_file`, check if the output is:\n- Binary data (contains null bytes, non-printable characters)\n- Garbled text with many special characters\n- Empty or truncated content\n\n```\n# Example of problematic output from read_file\n%PDF-1.4\n1 0 obj\n\u003C\u003C \u002FType \u002FCatalog ...\n```\n\nIf the output looks like raw PDF structure or binary, proceed to Step 2.\n\n### Step 2: Use shell_agent with PDF Tools\n\nInvoke `shell_agent` to extract text using `pdftotext` (preferred) or `pdfplumber` (Python fallback):\n\n```\nTask: Extract all text content from \u003Cfilename.pdf> using pdftotext or pdfplumber.\nOutput the extracted text in readable format. If pdftotext is not available, use Python with pdfplumber library.\n```\n\n**Example shell_agent invocation:**\n```\nshell_agent task=\"Extract text from Move_Out_Inspection_Tracker.pdf using pdftotext. Save output to a .txt file and return the content.\"\n```\n\n### Step 3: Validate Extracted Content\n\nAfter extraction, validate that the content contains expected text patterns:\n\n```python\n# Validation checklist\ndef validate_pdf_extraction(text, expected_patterns=None):\n    checks = [\n        bool(text.strip()),  # Not empty\n        len(text) > 50,  # Has substantial content\n        not text.startswith('%PDF'),  # Not raw PDF structure\n    ]\n    \n    if expected_patterns:\n        for pattern in expected_patterns:\n            checks.append(pattern.lower() in text.lower())\n    \n    return all(checks)\n```\n\n**Common expected patterns to check:**\n- Document-specific keywords (e.g., \"inspection\", \"resident\", \"date\")\n- Expected data formats (dates, names, IDs)\n- Minimum word count threshold\n\n### Step 4: Handle Extraction Failures\n\nIf validation fails:\n\n1. **Try alternative tool:** If `pdftotext` failed, try `pdfplumber`:\n   ```\n   shell_agent task=\"Extract text from \u003Cfile.pdf> using Python pdfplumber library. Handle any encoding issues.\"\n   ```\n\n2. **Try OCR fallback:** For scanned PDFs:\n   ```\n   shell_agent task=\"This PDF may be scanned. Use pytesseract or similar OCR tool to extract text from \u003Cfile.pdf>.\"\n   ```\n\n3. **Report specific error:** Document what patterns were expected but not found.\n\n### Step 5: Proceed with Data Processing\n\nOnce validated text is obtained:\n- Parse the extracted text for required data\n- Store or process the content as needed\n- Continue with the original task workflow\n\n## Code Example\n\n```python\n# Complete extraction workflow\ndef extract_pdf_text_fallback(pdf_path, expected_patterns=None):\n    \"\"\"Extract text from PDF with fallback handling.\"\"\"\n    \n    # Step 1: Try read_file first\n    content = read_file(filetype=\"pdf\", file_path=pdf_path)\n    \n    # Step 2: Check if binary\u002Funreadable\n    if is_binary_or_garbled(content):\n        # Step 3: Use shell_agent fallback\n        result = shell_agent(\n            task=f\"Extract all text from {pdf_path} using pdftotext. Return the text content.\"\n        )\n        content = result.stdout\n        \n        # Step 4: Validate\n        if not validate_pdf_extraction(content, expected_patterns):\n            # Try pdfplumber as secondary fallback\n            result = shell_agent(\n                task=f\"Extract text from {pdf_path} using Python pdfplumber library.\"\n            )\n            content = result.stdout\n    \n    return content\n\ndef is_binary_or_garbled(text):\n    \"\"\"Check if text appears to be binary or unreadable.\"\"\"\n    if not text:\n        return True\n    if text.startswith('%PDF'):\n        return True\n    # Check for high ratio of non-printable characters\n    non_printable = sum(1 for c in text if ord(c) > 127 or ord(c) \u003C 32)\n    return non_printable \u002F len(text) > 0.3\n```\n\n## Tips\n\n- **pdftotext** is typically faster and pre-installed on many systems\n- **pdfplumber** handles complex layouts better but requires Python\n- For **scanned PDFs**, you'll need OCR tools (tesseract, pytesseract)\n- Always validate extracted content matches your expected data patterns\n- Save intermediate extraction results for debugging if needed",{"name":5,"description":7},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback-85d5ca","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":8,"skillName":5,"commands":51,"prompt":61,"zipAvailable":62},[52,55,58],{"tool":53,"command":54},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction-fallback-85d5ca",{"tool":56,"command":57},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction-fallback-85d5ca",{"tool":59,"command":60},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-text-extraction-fallback-85d5ca","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback-85d5ca\u002FSKILL.md",true,[64],{"path":65,"resourceType":66,"resourceTypeDesc":67,"sizeBytes":68,"sourceHtmlUrl":69},".skill_id","OTHER","其他",49,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-text-extraction-fallback-85d5ca\u002F.skill_id",[71,94,110,119,147,163],{"skillNo":72,"name":73,"nameZh":6,"description":74,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":75,"categories":76,"keywords":77,"publishedAt":39},"01M6XCCXD3NCM2YKR3WNGBASPC","write-special-chars-ts-check","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, plus a reliable TypeScript type-checking step that filters output to only the newly-written files to avoid being misled by pre-existing errors.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-ts-check\u002FSKILL.md",[],[78,79,80,81,82,83,84,85,37,86,87,88,89,90,91,92,31,93],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","errors","script","output","type","files","only","template","python",{"skillNo":95,"name":96,"nameZh":6,"description":97,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":98,"categories":99,"keywords":100,"publishedAt":39},"01M6XCCT7E3J922Q345PBGSHPN","write-special-chars-readback","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) using a Python heredoc script, with mandatory post-write verification via read_file and cleanup of \u002Ftmp helper scripts.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-readback\u002FSKILL.md",[],[101,102,79,31,103,93,104,105,106,107,34,92,108,109,83,37,87],"readback","write special chars readback","helper","post","via","scripts","cleanup","verification","with",{"skillNo":111,"name":112,"nameZh":6,"description":113,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":114,"categories":115,"keywords":116,"publishedAt":39},"01M6XCCMQX1R8B6FECWB3P63T7","write-special-chars-heredoc","Workaround for write_file failures caused by special characters (apostrophes, backticks, template literals) by using a Python heredoc script executed via shell.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fwrite-special-chars-heredoc\u002FSKILL.md",[],[117,79,83,118,87,105,92,31,93,37],"write special chars heredoc","shell",{"skillNo":120,"name":121,"nameZh":6,"description":122,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":123,"categories":124,"keywords":130,"publishedAt":39},"01M6XCCG41M994JJEX6VN52PEP","worldmonitor-reference","Curated architecture index of the WorldMonitor open-source dashboard. Reference for extracting patterns — vanilla TypeScript, Panel class hierarchy, service layer, CSS grid, API edge functions, refresh scheduler, and 60+ data source integrations.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fworldmonitor-reference\u002FSKILL.md",[125],{"categoryNo":126,"categoryName":127,"taxonomyType":128,"taxonomyTypeDesc":129},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[131,132,133,134,135,81,136,137,138,139,140,37,36,141,142,143,144,145,146,32],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","panel","patterns","edge functions","integrations","open","api",{"skillNo":148,"name":149,"nameZh":6,"description":150,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":151,"categories":152,"keywords":153,"publishedAt":39},"01M6XCCCHWNKG2W4VH9E6A10HF","virtual-list","Implement efficient virtual scrolling for rendering large lists with DOM recycling, chunk-based rendering, and performance optimizations","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fvirtual-list\u002FSKILL.md",[],[154,155,156,157,37,158,109,159,160,161,162],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":164,"name":165,"nameZh":6,"description":166,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":167,"categories":168,"keywords":169,"publishedAt":39},"01M6XCC7X8PKMR2DEW91XGHYSV","verify-directory-structure","Diagnose and resolve file access issues by first verifying the directory structure.","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fshowcase\u002Fskills\u002Fverify-directory-structure\u002FSKILL.md",[],[170,171,172,173,174,175,31,176,177,178],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]