[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6XBQV75B6HT6ENN8MBTTKAY":3,"skill-same:01M6XBQV75B6HT6ENN8MBTTKAY":63},{"skillNo":4,"name":5,"nameZh":6,"description":6,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":14,"categories":15,"keywords":24,"publishedAt":32,"linkOnly":33,"markdownContent":34,"markdownBody":35,"frontMatter":36,"refName":37,"commitSha":38,"skillDirectory":39,"forksCount":12,"repositoryHtmlUrl":40,"repositoryHomepageUrl":6,"ownerHtmlUrl":41,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":42,"install":43,"resources":56},"01M6XBQV75B6HT6ENN8MBTTKAY","pdf-download-extract-fallback-enhanced-29b2f4",null,"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-download-extract-fallback-enhanced-29b2f4\u002FSKILL.md",[16,21],{"categoryNo":17,"categoryName":18,"taxonomyType":19,"taxonomyTypeDesc":20},"01JBSEEDCAT000000000000002","文档处理","SCENARIO","使用场景",{"categoryNo":22,"categoryName":23,"taxonomyType":19,"taxonomyTypeDesc":20},"01JBSEEDCAT000000000000023","Skill与智能体开发",[25,26,27,28,29,30,31],"PDF","download","extract","fallback","pdf download extract fallback enhanced 29b2f4","pdf download extract fallback enhanced","pdf download extract fallback","2026-11-10 10:12:30",false,"---\nname: pdf-extract-create-workflow\ndescription: Complete PDF lifecycle: download, extract, and generate structured documents with reportlab\n---\n\n# PDF Extract and Create Workflow\n\nThis skill provides a **complete PDF lifecycle workflow** for acquiring PDF documents from web sources or local files, extracting their text content, AND generating new structured PDFs from processed data—with multiple fallback mechanisms throughout.\n\n## Overview\n\nWhen working with PDFs, you may need to:\n1. **Download** PDFs from web sources (with anti-bot protection)\n2. **Extract** text content from PDFs (with fallback strategies)\n3. **Generate** new PDFs from processed data (with professional formatting)\n\nThis workflow ensures maximum success rate through progressive fallback strategies for extraction and templated approaches for generation.\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 2 (Verify File Type) | Step 1 (Download) |\n| PDF at a web URL | Step 1 (Download) | None |\n| Need to CREATE a PDF from data | Mode C (Generate) | Modes A & B |\n| Need to extract AND create | Mode A\u002FB → Mode C | None |\n\n---\n\n## Mode A: Web URL Download\n\n### Step 1: Download PDF with Browser User-Agent\n\nMany PDF hosting sites use JavaScript-based redirects or block automated requests. Use curl with a realistic 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 output.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**Additional headers for difficult sites:**\n```bash\ncurl -L \\\n  -A \"Mozilla\u002F5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\u002F537.36\" \\\n  -H \"Accept: application\u002Fpdf,*\u002F*\" \\\n  -H \"Accept-Language: en-US,en;q=0.9\" \\\n  -H \"Connection: keep-alive\" \\\n  -o output.pdf \"URL_HERE\"\n```\n\n---\n\n## Mode B: Local File Processing & Extraction\n\nIf you already have the PDF file locally, **skip Step 1** and begin here:\n\n### Step 2: Verify File Type Before Parsing\n\nAlways validate the downloaded file is actually a PDF before attempting extraction:\n\n```bash\nfile output.pdf\n```\n\nExpected output should contain \"PDF document\". If not:\n- The URL may have redirected to an HTML error page\n- The file may be corrupted\n- Access may be blocked\n\n### Step 3: Primary Extraction with pdftotext\n\nFirst attempt extraction using the standard `pdftotext` utility (part of poppler-utils):\n\n```bash\npdftotext output.pdf output.txt\n```\n\nIf `pdftotext` is not available, install it:\n```bash\n# Debian\u002FUbuntu\napt-get update && apt-get install -y poppler-utils\n\n# macOS\nbrew install poppler\n\n# RHEL\u002FCentOS\nyum install -y poppler-utils\n```\n\n### Step 4: Fallback to PyMuPDF (fitz)\n\nIf `pdftotext` fails or produces poor results, use Python's PyMuPDF library:\n\n```python\nimport fitz  # PyMuPDF\n\ndoc = fitz.open(\"output.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)\n```\n\nInstall if needed:\n```bash\npip install pymupdf\n```\n\n### Step 5: Graceful Degradation to Domain Knowledge\n\nIf the PDF cannot be accessed or extracted after all attempts:\n\n1. Document the failure mode (network issue, corrupted file, access denied, etc.)\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 note:\n```\nNOTE: Source document [URL] was inaccessible due to [reason]. \nContent below combines partial extraction with established domain knowledge \nfor [topic]. Verify against official sources when available.\n```\n\n---\n\n## Mode C: PDF Generation with ReportLab\n\nAfter extracting or processing data, generate professional PDFs using Python's reportlab library.\n\n### Installation\n\n```bash\npip install reportlab\n```\n\n### Step C1: Basic Document Structure\n\nCreate a multi-page PDF with title page, sections, and proper formatting:\n\n```python\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.units import inch\nfrom reportlab.lib.enums import TA_CENTER, TA_LEFT\n\ndef create_structured_pdf(output_path, title, sections):\n    \"\"\"\n    Create a structured PDF with title page and sections.\n    \n    Args:\n        output_path: Path for output PDF\n        title: Document title\n        sections: List of dicts with 'heading' and 'content' keys\n    \"\"\"\n    doc = SimpleDocTemplate(\n        output_path,\n        pagesize=letter,\n        rightMargin=72,\n        leftMargin=72,\n        topMargin=72,\n        bottomMargin=72\n    )\n    \n    styles = getSampleStyleSheet()\n    story = []\n    \n    # Title Page\n    title_style = ParagraphStyle(\n        'CustomTitle',\n        parent=styles['Heading1'],\n        fontSize=24,\n        alignment=TA_CENTER,\n        spaceAfter=30\n    )\n    story.append(Paragraph(title, title_style))\n    story.append(Spacer(1, 2*inch))\n    story.append(PageBreak())\n    \n    # Content Sections\n    heading_style = ParagraphStyle(\n        'CustomHeading',\n        parent=styles['Heading2'],\n        fontSize=16,\n        spaceBefore=12,\n        spaceAfter=6\n    )\n    body_style = ParagraphStyle(\n        'CustomBody',\n        parent=styles['Normal'],\n        fontSize=11,\n        leading=14,\n        spaceAfter=12\n    )\n    \n    for section in sections:\n        story.append(Paragraph(section['heading'], heading_style))\n        # Handle long text by splitting into paragraphs\n        for paragraph in section['content'].split('\\n\\n'):\n            if paragraph.strip():\n                story.append(Paragraph(paragraph, body_style))\n        story.append(Spacer(1, 0.2*inch))\n    \n    doc.build(story)\n    print(f\"PDF created: {output_path}\")\n```\n\n### Step C2: Adding Tables\n\nFor structured data, include tables with proper formatting:\n\n```python\nfrom reportlab.platypus import Table, TableStyle\nfrom reportlab.lib import colors\n\ndef create_table(data, col_widths=None):\n    \"\"\"\n    Create a formatted table for PDF.\n    \n    Args:\n        data: List of lists (rows x columns)\n        col_widths: Optional list of column widths\n    \"\"\"\n    table = Table(data, colWidths=col_widths)\n    table.setStyle(TableStyle([\n        # Header row\n        ('BACKGROUND', (0, 0), (-1, 0), colors.grey),\n        ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),\n        ('ALIGN', (0, 0), (-1, -1), 'LEFT'),\n        ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),\n        ('FONTSIZE', (0, 0), (-1, 0), 12),\n        ('BOTTOMPADDING', (0, 0), (-1, 0), 12),\n        # Data rows\n        ('BACKGROUND', (0, 1), (-1, -1), colors.beige),\n        ('TEXTCOLOR', (0, 1), (-1, -1), colors.black),\n        ('FONTNAME', (0, 1), (-1, -1), 'Helvetica'),\n        ('FONTSIZE', (0, 1), (-1, -1), 10),\n        # Grid\n        ('GRID', (0, 0), (-1, -1), 1, colors.black),\n        ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.white, colors.lightgrey]),\n    ]))\n    return table\n```\n\n### Step C3: Multi-Section Document Template\n\nComplete example creating an organized document with multiple sections:\n\n```python\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak, Table, TableStyle\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.enums import TA_CENTER\nfrom reportlab.lib import colors\n\ndef create_report_pdf(output_path, title, subtitle, sections, table_data=None):\n    \"\"\"\n    Create a complete report PDF with title, sections, and optional tables.\n    \n    Args:\n        output_path: Output PDF path\n        title: Main title\n        subtitle: Subtitle or date\n        sections: List of {'heading': str, 'content': str} dicts\n        table_data: Optional list of lists for tables\n    \"\"\"\n    doc = SimpleDocTemplate(\n        output_path,\n        pagesize=letter,\n        rightMargin=50,\n        leftMargin=50,\n        topMargin=50,\n        bottomMargin=50\n    )\n    \n    styles = getSampleStyleSheet()\n    story = []\n    \n    # Title Page\n    title_style = ParagraphStyle(\n        'Title',\n        parent=styles['Heading1'],\n        fontSize=28,\n        alignment=TA_CENTER,\n        spaceAfter=20,\n        fontName='Helvetica-Bold'\n    )\n    subtitle_style = ParagraphStyle(\n        'Subtitle',\n        parent=styles['Normal'],\n        fontSize=14,\n        alignment=TA_CENTER,\n        spaceAfter=50,\n        textColor=colors.darkgrey\n    )\n    \n    story.append(Paragraph(title, title_style))\n    story.append(Paragraph(subtitle, subtitle_style))\n    story.append(PageBreak())\n    \n    # Content\n    heading_style = ParagraphStyle(\n        'SectionHeading',\n        parent=styles['Heading2'],\n        fontSize=16,\n        spaceBefore=20,\n        spaceAfter=10,\n        fontName='Helvetica-Bold',\n        textColor=colors.darkblue\n    )\n    body_style = ParagraphStyle(\n        'Body',\n        parent=styles['Normal'],\n        fontSize=11,\n        leading=15,\n        spaceAfter=12\n    )\n    \n    for i, section in enumerate(sections):\n        story.append(Paragraph(section['heading'], heading_style))\n        \n        # Split content into paragraphs\n        for para in section['content'].split('\\n\\n'):\n            if para.strip():\n                # Handle very long paragraphs\n                story.append(Paragraph(para, body_style))\n        \n        # Add table after specific section if provided\n        if table_data and i == 0:\n            story.append(Spacer(1, 0.3*inch))\n            table = Table(table_data)\n            table.setStyle(TableStyle([\n                ('BACKGROUND', (0, 0), (-1, 0), colors.darkblue),\n                ('TEXTCOLOR', (0, 0), (-1, 0), colors.white),\n                ('ALIGN', (0, 0), (-1, -1), 'LEFT'),\n                ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),\n                ('GRID', (0, 0), (-1, -1), 0.5, colors.grey),\n                ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.white, colors.lightgrey]),\n            ]))\n            story.append(table)\n            story.append(Spacer(1, 0.3*inch))\n        \n        if i \u003C len(sections) - 1:\n            story.append(PageBreak())\n    \n    doc.build(story)\n    return output_path\n\n# Example usage\nif __name__ == \"__main__\":\n    sections = [\n        {\n            'heading': 'Section 1: Overview',\n            'content': 'This is the first section content...\\n\\nAdditional paragraph here.'\n        },\n        {\n            'heading': 'Section 2: Details',\n            'content': 'Detailed information goes here...'\n        }\n    ]\n    \n    table_data = [\n        ['Header 1', 'Header 2', 'Header 3'],\n        ['Row 1 Col 1', 'Row 1 Col 2', 'Row 1 Col 3'],\n        ['Row 2 Col 1', 'Row 2 Col 2', 'Row 2 Col 3'],\n    ]\n    \n    create_report_pdf(\n        \"output_report.pdf\",\n        \"Report Title\",\n        \"Generated: 2024\",\n        sections,\n        table_data\n    )\n```\n\n### Step C4: Error Handling for PDF Generation\n\nPDF generation can fail in multiple ways. Handle gracefully:\n\n```python\ndef safe_pdf_generation(output_path, title, sections, max_retries=3):\n    \"\"\"\n    Generate PDF with retry logic and error handling.\n    \"\"\"\n    import traceback\n    from reportlab.lib.utils import ImageReader\n    \n    for attempt in range(max_retries):\n        try:\n            create_report_pdf(output_path, title, sections)\n            # Verify file was created\n            import os\n            if os.path.exists(output_path) and os.path.getsize(output_path) > 0:\n                print(f\"✓ PDF generated successfully: {output_path}\")\n                return True\n            else:\n                raise Exception(\"PDF file empty or not created\")\n        except Exception as e:\n            print(f\"Attempt {attempt + 1}\u002F{max_retries} failed: {e}\")\n            if attempt \u003C max_retries - 1:\n                import time\n                time.sleep(1)  # Brief delay before retry\n            else:\n                print(f\"PDF generation failed after {max_retries} attempts\")\n                print(traceback.format_exc())\n                # Fallback: create minimal text file\n                with open(output_path.replace('.pdf', '.txt'), 'w') as f:\n                    f.write(f\"Title: {title}\\n\\n\")\n                    for section in sections:\n                        f.write(f\"{section['heading']}\\n{section['content']}\\n\\n\")\n                return False\n```\n\n### Step C5: Best Practices for PDF Generation\n\n1. **Page Breaks**: Insert `PageBreak()` between major sections for readability\n2. **Consistent Styling**: Define ParagraphStyle objects once and reuse\n3. **Text Wrapping**: ReportLab handles wrapping automatically; split long content with `\\n\\n`\n4. **Margins**: Use at least 50-72 point margins for standard letter size\n5. **Font Selection**: Stick to Helvetica, Times-Roman, or Courier for compatibility\n6. **File Verification**: Always check the PDF was created and has content > 0 bytes\n7. **Error Recovery**: Have a fallback (e.g., .txt output) if PDF generation fails\n8. **Memory Management**: For very large documents, build in chunks or use separate files\n\n---\n\n## Complete Workflow Script (Handles Download, Extract, and Generate)\n\n```bash\n#!\u002Fbin\u002Fbash\n# pdf-lifecycle-workflow.sh\n# Handles URL downloads, local files, and PDF generation\n\nINPUT=\"$1\"\nMODE=\"${2:-extract}\"  # extract, generate, or both\nOUTPUT_PDF=\"downloaded.pdf\"\nOUTPUT_TXT=\"extracted.txt\"\nOUTPUT_REPORT=\"generated_report.pdf\"\n\nif [[ \"$MODE\" == \"generate\" ]]; then\n    echo \"Mode: PDF Generation\"\n    python3 generate_pdf.py\n    exit $?\nfi\n\nif [[ \"$INPUT\" =~ ^https?:\u002F\u002F ]]; then\n    # Mode A: URL download\n    PDF_URL=\"$INPUT\"\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\" \"$PDF_URL\"\nelse\n    # Mode B: Local file\n    if [ ! -f \"$INPUT\" ]; then\n        echo \"ERROR: Local file not found: $INPUT\"\n        exit 1\n    fi\n    OUTPUT_PDF=\"$INPUT\"\n    echo \"Using local file: $INPUT\"\nfi\n\n# Step 2: 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    echo \"Attempting fallback extraction anyway...\"\nfi\n\n# Step 3: Try pdftotext\necho \"Attempting pdftotext extraction...\"\nif command -v pdftotext &> \u002Fdev\u002Fnull; then\n    if pdftotext \"$OUTPUT_PDF\" \"$OUTPUT_TXT\" 2>\u002Fdev\u002Fnull; then\n        echo \"Extraction successful with pdftotext\"\n        if [[ \"$MODE\" == \"both\" ]]; then\n            echo \"Proceeding to PDF generation...\"\n            python3 generate_pdf.py\n        fi\n        exit 0\n    fi\nfi\n\n# Step 4: Fallback to PyMuPDF\necho \"Falling back to PyMuPDF...\"\npython3 \u003C\u003C 'PYTHON_SCRIPT'\nimport fitz\nimport sys\n\ntry:\n    doc = fitz.open(\"downloaded.pdf\")\n    text = \"\"\n    for page in doc:\n        text += page.get_text()\n    doc.close()\n    with open(\"extracted.txt\", \"w\") as f:\n        f.write(text)\n    print(\"Extraction successful with PyMuPDF\")\nexcept Exception as e:\n    print(f\"PyMuPDF failed: {e}\")\n    sys.exit(1)\nPYTHON_SCRIPT\n\n# Step 5: Handle complete failure\nif [ $? -ne 0 ]; then\n    echo \"ERROR: All extraction methods failed.\"\n    echo \"ACTION: Generate content from domain knowledge and clearly mark source limitations.\"\nfi\n\nif [[ \"$MODE\" == \"both\" ]]; then\n    echo \"Proceeding to PDF generation with extracted\u002Ffallback content...\"\n    python3 generate_pdf.py\nfi\n```\n\n---\n\n## Common Failure Modes & Solutions\n\n| Symptom | Cause | Solution |\n|---------|-------|----------|\n| HTML content in PDF | URL redirected to error page | Check HTTP status, try alternate URL |\n| Empty extraction | Password-protected or scanned PDF | Try OCR tools or request accessible version |\n| Garbled text | Encoding issues | Try PyMuPDF with different extraction mode |\n| Curl blocked | Anti-bot measures | Add more headers, use delay between requests |\n| PDF generation fails | Missing fonts or memory | Use standard fonts, build in chunks |\n| ReportLab errors | Version incompatibility | Use `pip install --upgrade reportlab` |\n| Unknown shell_agent error | Timeout on complex operations | Use direct Python execution instead |\n\n---\n\n## When to Use This Skill\n\n| Mode | Use Case |\n|------|----------|\n| **Mode A (URL download)** | Downloading regulatory documents from government websites |\n| **Mode B (Local file)** | Processing PDFs already saved to disk |\n| **Mode C (Generate)** | Creating reports from extracted\u002Fprocessed data |\n| **Both (extract + generate)** | Full pipeline: acquire → process → report |\n\n### Specific Scenarios\n\n- Extracting content from technical manuals or handbooks\n- Processing PDFs in automated pipelines where reliability matters\n- Creating structured reports from multiple data sources\n- Generating documentation with consistent formatting\n- Any situation where PDF access may be unreliable or restricted\n- Producing professional PDFs from text data with tables and sections\n\n---\n\n## Quick Reference: Mode Selection\n\n```\nNeed to get PDF from web?          → Mode A (Download)\nHave PDF file already?             → Mode B (Extract)\nNeed to CREATE a PDF?              → Mode C (Generate)\nNeed full pipeline?                → Mode A\u002FB → Mode C\nExtraction failed?                 → Step 5 (Domain knowledge fallback)\nGeneration failed?                 → Step C4 (Error handling + txt fallback)\n```\n","# PDF Extract and Create Workflow\n\nThis skill provides a **complete PDF lifecycle workflow** for acquiring PDF documents from web sources or local files, extracting their text content, AND generating new structured PDFs from processed data—with multiple fallback mechanisms throughout.\n\n## Overview\n\nWhen working with PDFs, you may need to:\n1. **Download** PDFs from web sources (with anti-bot protection)\n2. **Extract** text content from PDFs (with fallback strategies)\n3. **Generate** new PDFs from processed data (with professional formatting)\n\nThis workflow ensures maximum success rate through progressive fallback strategies for extraction and templated approaches for generation.\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 2 (Verify File Type) | Step 1 (Download) |\n| PDF at a web URL | Step 1 (Download) | None |\n| Need to CREATE a PDF from data | Mode C (Generate) | Modes A & B |\n| Need to extract AND create | Mode A\u002FB → Mode C | None |\n\n---\n\n## Mode A: Web URL Download\n\n### Step 1: Download PDF with Browser User-Agent\n\nMany PDF hosting sites use JavaScript-based redirects or block automated requests. Use curl with a realistic 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 output.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**Additional headers for difficult sites:**\n```bash\ncurl -L \\\n  -A \"Mozilla\u002F5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\u002F537.36\" \\\n  -H \"Accept: application\u002Fpdf,*\u002F*\" \\\n  -H \"Accept-Language: en-US,en;q=0.9\" \\\n  -H \"Connection: keep-alive\" \\\n  -o output.pdf \"URL_HERE\"\n```\n\n---\n\n## Mode B: Local File Processing & Extraction\n\nIf you already have the PDF file locally, **skip Step 1** and begin here:\n\n### Step 2: Verify File Type Before Parsing\n\nAlways validate the downloaded file is actually a PDF before attempting extraction:\n\n```bash\nfile output.pdf\n```\n\nExpected output should contain \"PDF document\". If not:\n- The URL may have redirected to an HTML error page\n- The file may be corrupted\n- Access may be blocked\n\n### Step 3: Primary Extraction with pdftotext\n\nFirst attempt extraction using the standard `pdftotext` utility (part of poppler-utils):\n\n```bash\npdftotext output.pdf output.txt\n```\n\nIf `pdftotext` is not available, install it:\n```bash\n# Debian\u002FUbuntu\napt-get update && apt-get install -y poppler-utils\n\n# macOS\nbrew install poppler\n\n# RHEL\u002FCentOS\nyum install -y poppler-utils\n```\n\n### Step 4: Fallback to PyMuPDF (fitz)\n\nIf `pdftotext` fails or produces poor results, use Python's PyMuPDF library:\n\n```python\nimport fitz  # PyMuPDF\n\ndoc = fitz.open(\"output.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)\n```\n\nInstall if needed:\n```bash\npip install pymupdf\n```\n\n### Step 5: Graceful Degradation to Domain Knowledge\n\nIf the PDF cannot be accessed or extracted after all attempts:\n\n1. Document the failure mode (network issue, corrupted file, access denied, etc.)\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 note:\n```\nNOTE: Source document [URL] was inaccessible due to [reason]. \nContent below combines partial extraction with established domain knowledge \nfor [topic]. Verify against official sources when available.\n```\n\n---\n\n## Mode C: PDF Generation with ReportLab\n\nAfter extracting or processing data, generate professional PDFs using Python's reportlab library.\n\n### Installation\n\n```bash\npip install reportlab\n```\n\n### Step C1: Basic Document Structure\n\nCreate a multi-page PDF with title page, sections, and proper formatting:\n\n```python\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.units import inch\nfrom reportlab.lib.enums import TA_CENTER, TA_LEFT\n\ndef create_structured_pdf(output_path, title, sections):\n    \"\"\"\n    Create a structured PDF with title page and sections.\n    \n    Args:\n        output_path: Path for output PDF\n        title: Document title\n        sections: List of dicts with 'heading' and 'content' keys\n    \"\"\"\n    doc = SimpleDocTemplate(\n        output_path,\n        pagesize=letter,\n        rightMargin=72,\n        leftMargin=72,\n        topMargin=72,\n        bottomMargin=72\n    )\n    \n    styles = getSampleStyleSheet()\n    story = []\n    \n    # Title Page\n    title_style = ParagraphStyle(\n        'CustomTitle',\n        parent=styles['Heading1'],\n        fontSize=24,\n        alignment=TA_CENTER,\n        spaceAfter=30\n    )\n    story.append(Paragraph(title, title_style))\n    story.append(Spacer(1, 2*inch))\n    story.append(PageBreak())\n    \n    # Content Sections\n    heading_style = ParagraphStyle(\n        'CustomHeading',\n        parent=styles['Heading2'],\n        fontSize=16,\n        spaceBefore=12,\n        spaceAfter=6\n    )\n    body_style = ParagraphStyle(\n        'CustomBody',\n        parent=styles['Normal'],\n        fontSize=11,\n        leading=14,\n        spaceAfter=12\n    )\n    \n    for section in sections:\n        story.append(Paragraph(section['heading'], heading_style))\n        # Handle long text by splitting into paragraphs\n        for paragraph in section['content'].split('\\n\\n'):\n            if paragraph.strip():\n                story.append(Paragraph(paragraph, body_style))\n        story.append(Spacer(1, 0.2*inch))\n    \n    doc.build(story)\n    print(f\"PDF created: {output_path}\")\n```\n\n### Step C2: Adding Tables\n\nFor structured data, include tables with proper formatting:\n\n```python\nfrom reportlab.platypus import Table, TableStyle\nfrom reportlab.lib import colors\n\ndef create_table(data, col_widths=None):\n    \"\"\"\n    Create a formatted table for PDF.\n    \n    Args:\n        data: List of lists (rows x columns)\n        col_widths: Optional list of column widths\n    \"\"\"\n    table = Table(data, colWidths=col_widths)\n    table.setStyle(TableStyle([\n        # Header row\n        ('BACKGROUND', (0, 0), (-1, 0), colors.grey),\n        ('TEXTCOLOR', (0, 0), (-1, 0), colors.whitesmoke),\n        ('ALIGN', (0, 0), (-1, -1), 'LEFT'),\n        ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),\n        ('FONTSIZE', (0, 0), (-1, 0), 12),\n        ('BOTTOMPADDING', (0, 0), (-1, 0), 12),\n        # Data rows\n        ('BACKGROUND', (0, 1), (-1, -1), colors.beige),\n        ('TEXTCOLOR', (0, 1), (-1, -1), colors.black),\n        ('FONTNAME', (0, 1), (-1, -1), 'Helvetica'),\n        ('FONTSIZE', (0, 1), (-1, -1), 10),\n        # Grid\n        ('GRID', (0, 0), (-1, -1), 1, colors.black),\n        ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.white, colors.lightgrey]),\n    ]))\n    return table\n```\n\n### Step C3: Multi-Section Document Template\n\nComplete example creating an organized document with multiple sections:\n\n```python\nfrom reportlab.lib.pagesizes import letter\nfrom reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer, PageBreak, Table, TableStyle\nfrom reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle\nfrom reportlab.lib.enums import TA_CENTER\nfrom reportlab.lib import colors\n\ndef create_report_pdf(output_path, title, subtitle, sections, table_data=None):\n    \"\"\"\n    Create a complete report PDF with title, sections, and optional tables.\n    \n    Args:\n        output_path: Output PDF path\n        title: Main title\n        subtitle: Subtitle or date\n        sections: List of {'heading': str, 'content': str} dicts\n        table_data: Optional list of lists for tables\n    \"\"\"\n    doc = SimpleDocTemplate(\n        output_path,\n        pagesize=letter,\n        rightMargin=50,\n        leftMargin=50,\n        topMargin=50,\n        bottomMargin=50\n    )\n    \n    styles = getSampleStyleSheet()\n    story = []\n    \n    # Title Page\n    title_style = ParagraphStyle(\n        'Title',\n        parent=styles['Heading1'],\n        fontSize=28,\n        alignment=TA_CENTER,\n        spaceAfter=20,\n        fontName='Helvetica-Bold'\n    )\n    subtitle_style = ParagraphStyle(\n        'Subtitle',\n        parent=styles['Normal'],\n        fontSize=14,\n        alignment=TA_CENTER,\n        spaceAfter=50,\n        textColor=colors.darkgrey\n    )\n    \n    story.append(Paragraph(title, title_style))\n    story.append(Paragraph(subtitle, subtitle_style))\n    story.append(PageBreak())\n    \n    # Content\n    heading_style = ParagraphStyle(\n        'SectionHeading',\n        parent=styles['Heading2'],\n        fontSize=16,\n        spaceBefore=20,\n        spaceAfter=10,\n        fontName='Helvetica-Bold',\n        textColor=colors.darkblue\n    )\n    body_style = ParagraphStyle(\n        'Body',\n        parent=styles['Normal'],\n        fontSize=11,\n        leading=15,\n        spaceAfter=12\n    )\n    \n    for i, section in enumerate(sections):\n        story.append(Paragraph(section['heading'], heading_style))\n        \n        # Split content into paragraphs\n        for para in section['content'].split('\\n\\n'):\n            if para.strip():\n                # Handle very long paragraphs\n                story.append(Paragraph(para, body_style))\n        \n        # Add table after specific section if provided\n        if table_data and i == 0:\n            story.append(Spacer(1, 0.3*inch))\n            table = Table(table_data)\n            table.setStyle(TableStyle([\n                ('BACKGROUND', (0, 0), (-1, 0), colors.darkblue),\n                ('TEXTCOLOR', (0, 0), (-1, 0), colors.white),\n                ('ALIGN', (0, 0), (-1, -1), 'LEFT'),\n                ('FONTNAME', (0, 0), (-1, 0), 'Helvetica-Bold'),\n                ('GRID', (0, 0), (-1, -1), 0.5, colors.grey),\n                ('ROWBACKGROUNDS', (0, 1), (-1, -1), [colors.white, colors.lightgrey]),\n            ]))\n            story.append(table)\n            story.append(Spacer(1, 0.3*inch))\n        \n        if i \u003C len(sections) - 1:\n            story.append(PageBreak())\n    \n    doc.build(story)\n    return output_path\n\n# Example usage\nif __name__ == \"__main__\":\n    sections = [\n        {\n            'heading': 'Section 1: Overview',\n            'content': 'This is the first section content...\\n\\nAdditional paragraph here.'\n        },\n        {\n            'heading': 'Section 2: Details',\n            'content': 'Detailed information goes here...'\n        }\n    ]\n    \n    table_data = [\n        ['Header 1', 'Header 2', 'Header 3'],\n        ['Row 1 Col 1', 'Row 1 Col 2', 'Row 1 Col 3'],\n        ['Row 2 Col 1', 'Row 2 Col 2', 'Row 2 Col 3'],\n    ]\n    \n    create_report_pdf(\n        \"output_report.pdf\",\n        \"Report Title\",\n        \"Generated: 2024\",\n        sections,\n        table_data\n    )\n```\n\n### Step C4: Error Handling for PDF Generation\n\nPDF generation can fail in multiple ways. Handle gracefully:\n\n```python\ndef safe_pdf_generation(output_path, title, sections, max_retries=3):\n    \"\"\"\n    Generate PDF with retry logic and error handling.\n    \"\"\"\n    import traceback\n    from reportlab.lib.utils import ImageReader\n    \n    for attempt in range(max_retries):\n        try:\n            create_report_pdf(output_path, title, sections)\n            # Verify file was created\n            import os\n            if os.path.exists(output_path) and os.path.getsize(output_path) > 0:\n                print(f\"✓ PDF generated successfully: {output_path}\")\n                return True\n            else:\n                raise Exception(\"PDF file empty or not created\")\n        except Exception as e:\n            print(f\"Attempt {attempt + 1}\u002F{max_retries} failed: {e}\")\n            if attempt \u003C max_retries - 1:\n                import time\n                time.sleep(1)  # Brief delay before retry\n            else:\n                print(f\"PDF generation failed after {max_retries} attempts\")\n                print(traceback.format_exc())\n                # Fallback: create minimal text file\n                with open(output_path.replace('.pdf', '.txt'), 'w') as f:\n                    f.write(f\"Title: {title}\\n\\n\")\n                    for section in sections:\n                        f.write(f\"{section['heading']}\\n{section['content']}\\n\\n\")\n                return False\n```\n\n### Step C5: Best Practices for PDF Generation\n\n1. **Page Breaks**: Insert `PageBreak()` between major sections for readability\n2. **Consistent Styling**: Define ParagraphStyle objects once and reuse\n3. **Text Wrapping**: ReportLab handles wrapping automatically; split long content with `\\n\\n`\n4. **Margins**: Use at least 50-72 point margins for standard letter size\n5. **Font Selection**: Stick to Helvetica, Times-Roman, or Courier for compatibility\n6. **File Verification**: Always check the PDF was created and has content > 0 bytes\n7. **Error Recovery**: Have a fallback (e.g., .txt output) if PDF generation fails\n8. **Memory Management**: For very large documents, build in chunks or use separate files\n\n---\n\n## Complete Workflow Script (Handles Download, Extract, and Generate)\n\n```bash\n#!\u002Fbin\u002Fbash\n# pdf-lifecycle-workflow.sh\n# Handles URL downloads, local files, and PDF generation\n\nINPUT=\"$1\"\nMODE=\"${2:-extract}\"  # extract, generate, or both\nOUTPUT_PDF=\"downloaded.pdf\"\nOUTPUT_TXT=\"extracted.txt\"\nOUTPUT_REPORT=\"generated_report.pdf\"\n\nif [[ \"$MODE\" == \"generate\" ]]; then\n    echo \"Mode: PDF Generation\"\n    python3 generate_pdf.py\n    exit $?\nfi\n\nif [[ \"$INPUT\" =~ ^https?:\u002F\u002F ]]; then\n    # Mode A: URL download\n    PDF_URL=\"$INPUT\"\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\" \"$PDF_URL\"\nelse\n    # Mode B: Local file\n    if [ ! -f \"$INPUT\" ]; then\n        echo \"ERROR: Local file not found: $INPUT\"\n        exit 1\n    fi\n    OUTPUT_PDF=\"$INPUT\"\n    echo \"Using local file: $INPUT\"\nfi\n\n# Step 2: 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    echo \"Attempting fallback extraction anyway...\"\nfi\n\n# Step 3: Try pdftotext\necho \"Attempting pdftotext extraction...\"\nif command -v pdftotext &> \u002Fdev\u002Fnull; then\n    if pdftotext \"$OUTPUT_PDF\" \"$OUTPUT_TXT\" 2>\u002Fdev\u002Fnull; then\n        echo \"Extraction successful with pdftotext\"\n        if [[ \"$MODE\" == \"both\" ]]; then\n            echo \"Proceeding to PDF generation...\"\n            python3 generate_pdf.py\n        fi\n        exit 0\n    fi\nfi\n\n# Step 4: Fallback to PyMuPDF\necho \"Falling back to PyMuPDF...\"\npython3 \u003C\u003C 'PYTHON_SCRIPT'\nimport fitz\nimport sys\n\ntry:\n    doc = fitz.open(\"downloaded.pdf\")\n    text = \"\"\n    for page in doc:\n        text += page.get_text()\n    doc.close()\n    with open(\"extracted.txt\", \"w\") as f:\n        f.write(text)\n    print(\"Extraction successful with PyMuPDF\")\nexcept Exception as e:\n    print(f\"PyMuPDF failed: {e}\")\n    sys.exit(1)\nPYTHON_SCRIPT\n\n# Step 5: Handle complete failure\nif [ $? -ne 0 ]; then\n    echo \"ERROR: All extraction methods failed.\"\n    echo \"ACTION: Generate content from domain knowledge and clearly mark source limitations.\"\nfi\n\nif [[ \"$MODE\" == \"both\" ]]; then\n    echo \"Proceeding to PDF generation with extracted\u002Ffallback content...\"\n    python3 generate_pdf.py\nfi\n```\n\n---\n\n## Common Failure Modes & Solutions\n\n| Symptom | Cause | Solution |\n|---------|-------|----------|\n| HTML content in PDF | URL redirected to error page | Check HTTP status, try alternate URL |\n| Empty extraction | Password-protected or scanned PDF | Try OCR tools or request accessible version |\n| Garbled text | Encoding issues | Try PyMuPDF with different extraction mode |\n| Curl blocked | Anti-bot measures | Add more headers, use delay between requests |\n| PDF generation fails | Missing fonts or memory | Use standard fonts, build in chunks |\n| ReportLab errors | Version incompatibility | Use `pip install --upgrade reportlab` |\n| Unknown shell_agent error | Timeout on complex operations | Use direct Python execution instead |\n\n---\n\n## When to Use This Skill\n\n| Mode | Use Case |\n|------|----------|\n| **Mode A (URL download)** | Downloading regulatory documents from government websites |\n| **Mode B (Local file)** | Processing PDFs already saved to disk |\n| **Mode C (Generate)** | Creating reports from extracted\u002Fprocessed data |\n| **Both (extract + generate)** | Full pipeline: acquire → process → report |\n\n### Specific Scenarios\n\n- Extracting content from technical manuals or handbooks\n- Processing PDFs in automated pipelines where reliability matters\n- Creating structured reports from multiple data sources\n- Generating documentation with consistent formatting\n- Any situation where PDF access may be unreliable or restricted\n- Producing professional PDFs from text data with tables and sections\n\n---\n\n## Quick Reference: Mode Selection\n\n```\nNeed to get PDF from web?          → Mode A (Download)\nHave PDF file already?             → Mode B (Extract)\nNeed to CREATE a PDF?              → Mode C (Generate)\nNeed full pipeline?                → Mode A\u002FB → Mode C\nExtraction failed?                 → Step 5 (Domain knowledge fallback)\nGeneration failed?                 → Step C4 (Error handling + txt fallback)\n```\n",{},"main","0650921d63895de3997bc81f1ff1d0ac67032072","gdpval_bench\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-29b2f4","https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution","https:\u002F\u002Fgithub.com\u002FUF-gzj","2026-04-16 09:31:03",{"source":7,"skillName":5,"commands":44,"prompt":54,"zipAvailable":55},[45,48,51],{"tool":46,"command":47},"npx","npx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-download-extract-fallback-enhanced-29b2f4",{"tool":49,"command":50},"bunx","bunx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-download-extract-fallback-enhanced-29b2f4",{"tool":52,"command":53},"pnpm","pnpm dlx skills add UF-gzj\u002Fopenspace-claude-evolution --skill pdf-download-extract-fallback-enhanced-29b2f4","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-29b2f4\u002FSKILL.md",true,[57],{"path":58,"resourceType":59,"resourceTypeDesc":60,"sizeBytes":61,"sourceHtmlUrl":62},".skill_id","OTHER","其他",59,"https:\u002F\u002Fgithub.com\u002FUF-gzj\u002Fopenspace-claude-evolution\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fpdf-download-extract-fallback-enhanced-29b2f4\u002F.skill_id",[64,89,106,115,145,161],{"skillNo":65,"name":66,"nameZh":6,"description":67,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":68,"categories":69,"keywords":70,"publishedAt":32},"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",[],[71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88],"check","write","write special chars ts check","typescript","filters","characters","Existing","type-checking","for","errors","script","output","type","files","only","template","file","python",{"skillNo":90,"name":91,"nameZh":6,"description":92,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":93,"categories":94,"keywords":95,"publishedAt":32},"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",[],[96,97,72,87,98,88,99,100,101,102,103,86,104,105,76,79,81],"readback","write special chars readback","helper","post","via","scripts","cleanup","read","verification","with",{"skillNo":107,"name":108,"nameZh":6,"description":109,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":110,"categories":111,"keywords":112,"publishedAt":32},"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",[],[113,72,76,114,81,100,86,87,88,79],"write special chars heredoc","shell",{"skillNo":116,"name":117,"nameZh":6,"description":118,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":119,"categories":120,"keywords":126,"publishedAt":32},"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",[121],{"categoryNo":122,"categoryName":123,"taxonomyType":124,"taxonomyTypeDesc":125},"01JBSEEDCAT000000000000033","数据分析师","PROFESSION","适用职业",[127,128,129,130,131,74,132,133,134,135,136,79,137,138,139,140,141,142,143,144],"reference","worldmonitor","worldmonitor reference","architecture","dashboard","css","scheduler","layer","hierarchy","source","extracting","panel","patterns","edge functions","integrations","open","api","data",{"skillNo":146,"name":147,"nameZh":6,"description":148,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":149,"categories":150,"keywords":151,"publishedAt":32},"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",[],[152,153,154,155,79,156,105,157,158,159,160],"virtual list","list","virtual","chunk","dom","rendering","recycling","implement","performance",{"skillNo":162,"name":163,"nameZh":6,"description":164,"descriptionZh":6,"repositoryFullName":7,"ownerLogin":8,"ownerAvatarUrl":9,"ownerAccountNo":10,"ownerDisplayName":6,"repositoryNo":11,"starsCount":12,"licenseSpdxId":13,"licenseFileUrl":6,"sourceHtmlUrl":165,"categories":166,"keywords":167,"publishedAt":32},"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",[],[168,169,170,171,172,173,87,174,175,176],"directory","verify directory structure","structure","verify","access","first","issues","diagnose","file access"]