[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6KFDM5C0JWNBNJERYZXC0M7":3,"skill-same:01M6KFDM5C0JWNBNJERYZXC0M7":71},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":38,"linkOnly":39,"markdownContent":40,"markdownBody":41,"frontMatter":42,"refName":43,"commitSha":44,"skillDirectory":45,"forksCount":14,"repositoryHtmlUrl":46,"repositoryHomepageUrl":6,"ownerHtmlUrl":47,"ownerBlogUrl":48,"ownerDescription":49,"updatedAt":50,"install":51,"resources":64},"01M6KFDM5C0JWNBNJERYZXC0M7","resilient-document-pipeline",null,"Unified document generation with tool failure detection, domain knowledge fallback, progressive conversion, and Unicode safety","xyliu-cs\u002FOpenSpace-GDPval","xyliu-cs","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F89236536?v=4","01M6KF8Z1V4TXS86CKSH48BY8T","xy","01M6KF8Z67443W0SHXM85JEF0B",0,"MIT","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fdocument-gen-fallback-enhanced-merged\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],"pipeline","document","resilient document pipeline","detection","Safety","knowledge","tool","conversion","fallback","domain","generation","Unicode","document generation","with","2026-11-10 10:12:30",false,"---\nname: resilient-document-pipeline\ndescription: Unified document generation with tool failure detection, domain knowledge fallback, progressive conversion, and Unicode safety\n---\n\n# Resilient Document Generation Pipeline\n\n## When to Use This Skill\n\nUse this workflow when generating documents in **challenging environments** where:\n\n- **Tool failures are likely or have occurred**: `read_file`, `search_web`, `read_webpage`, or `execute_code_sandbox` return errors\n- **Multiple formats are needed**: Generate `.docx`, `.pdf`, `.html` from the same source\n- **Unicode\u002Fspecial characters are present**: Documents contain em dashes, curly quotes, arrows, symbols, or non-ASCII text\n- **Primary conversion methods may fail**: LaTeX\u002Fpandoc may not be available or misconfigured\n\nThis skill combines **early failure detection**, **domain-knowledge content creation**, **progressive conversion fallbacks**, and **Unicode safety** into a single resilient workflow.\n\n## Core Workflow Overview\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│  1. DETECT tool failures (2+ indicators → pivot immediately)   │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n┌────────────────▼────────────────────────────────────────────────┐\n│  2. CREATE content with write_file using embedded domain       │\n│     knowledge (professionally structured markdown)              │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n┌────────────────▼────────────────────────────────────────────────┐\n│  3. SANITIZE unicode (create LaTeX-safe version for PDF)       │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n┌────────────────▼────────────────────────────────────────────────┐\n│  4. CONVERT with progressive fallbacks:                        │\n│     pandoc → reportlab → fpdf2 → wkhtmltopdf                   │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n┌────────────────▼────────────────────────────────────────────────┐\n│  5. VERIFY outputs exist and are valid                          │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## Step-by-Step Workflow\n\n### Step 1: Detect Tool Failure Pattern\n\n**Before attempting document generation**, check for failure indicators:\n\n```\nTOOL_FAILURE_INDICATORS = [\n    \"read_file returns binary\u002Fimage data instead of text\",\n    \"search_web returns unknown error or empty results\",\n    \"read_webpage returns unknown error on multiple URLs\",\n    \"execute_code_sandbox fails unexpectedly\",\n    \"pandoc command fails with 'unknown error'\",\n    \"Multiple consecutive tool failures on data retrieval\"\n]\n```\n\n**Decision point**: If **2+ indicators** are present within the first 2-3 iterations:\n\n1. **Stop** attempting to fix the failing tools\n2. **Acknowledge** the limitation briefly in your output\n3. **Commit** to generating the document with available knowledge\n4. **Proceed** to Step 2 immediately\n\n### Step 2: Create Content with write_file\n\nWrite your document as **professionally structured Markdown** using embedded domain knowledge:\n\n```\nwrite_file\npath: \u002Ftmp\u002Fdocument_source.md\ncontent: |\n  # [Document Title]\n  \n  ## Executive Summary\n  [Brief overview of key content - use domain knowledge]\n  \n  ## Background\n  [Context and scope - leverage embedded expertise]\n  \n  ## Main Content\n  [Organized sections with headers, lists, tables]\n  \n  ## Limitations & Notes\n  [Transparent about data source limitations if relevant]\n  \n  ## Recommendations\u002FNext Steps\n  [Actionable guidance based on available information]\n```\n\n**Best practices for content:**\n- Use **general domain knowledge** appropriately when external data is unavailable\n- **Clearly distinguish** between verified facts and general guidance\n- Include **actionable frameworks** rather than specific unverified data\n- Add **placeholder notes** where specific data would enhance the document:\n\n```markdown\n> **Note**: Specific [metric\u002Fdata point] would typically be sourced from \n> [expected source]. The guidance below reflects established best practices.\n```\n\n### Step 3: Sanitize Unicode Characters (Pre-PDF Conversion)\n\n**Critical**: PDF generation via pandoc typically uses LaTeX, which has limited Unicode support. Create a sanitized version:\n\n#### Option A: Manual write_file (Recommended for control)\n\n```\nwrite_file\npath: \u002Ftmp\u002Fdocument_source_sanitized.md\ncontent: |\n  [Same content as Step 2, but with these replacements:]\n```\n\n**Character replacement table:**\n\n| Character | Issue | Safe Replacement |\n|-----------|-------|------------------|\n| `—` (em dash) | May not render | `--` or `-` |\n| `–` (en dash) | May not render | `-` |\n| `\" \"` (curly quotes) | Encoding errors | `\" \"` (straight quotes) |\n| `' '` (curly apostrophe) | Encoding errors | `'` (straight apostrophe) |\n| `…` (ellipsis) | May not render | `...` |\n| `→` `←` `↑` `↓` (arrows) | LaTeX incompatibility | `->` `\u003C-` `^` `v` |\n| `✓` `✗` (checkmarks) | May not render | `[x]` `[ ]` |\n| `★` `●` (symbols) | May not render | `*` `-` |\n| `©` `®` `™` | May require packages | `(c)` `(r)` `(tm)` |\n| Non-ASCII letters (é, ñ, ü) | Font-dependent | Use xeLaTeX or keep for non-PDF formats |\n\n#### Option B: Shell script sanitization\n\n```\nrun_shell\ncommand: sed -e 's\u002F—\u002F--\u002Fg' -e 's\u002F–\u002F-\u002Fg' -e 's\u002F\"([^\"]*)\"\u002F\"\\1\"\u002Fg' -e \"s\u002F'([^']*)\u002F'\\1'\u002Fg\" -e 's\u002F…\u002F...\u002Fg' -e 's\u002F→\u002F->\u002Fg' -e 's\u002F←\u002F\u003C-\u002Fg' -e 's\u002F©\u002F(c)\u002Fg' -e 's\u002F®\u002F(r)\u002Fg' -e 's\u002F™\u002F(tm)\u002Fg' \u002Ftmp\u002Fdocument_source.md > \u002Ftmp\u002Fdocument_source_sanitized.md\n```\n\n**Important**: Keep the original unsanitized file for DOCX\u002FHTML conversion (these formats handle Unicode better).\n\n### Step 4: Convert to Target Formats with Progressive Fallbacks\n\nUse `run_shell` with **progressive fallback** strategy. Try each method; if it fails, move to the next.\n\n#### For DOCX (from original markdown):\n\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source.md -o output.docx\n```\n\n**Fallback if pandoc fails:**\n```\nexecute_code_sandbox\ncode: |\n  from docx import Document\n  # Parse markdown and create DOCX with python-docx\n  # (Implementation depends on complexity needs)\n```\n\n#### For PDF (from sanitized markdown):\n\n**Attempt 1 - pandoc with default engine:**\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source_sanitized.md -o output.pdf\n```\n\n**Attempt 2 - pandoc with xeLaTeX (better Unicode):**\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source_sanitized.md -o output.pdf --pdf-engine=xelatex\n```\n\n**Attempt 3 - pandoc with wkhtmltopdf:**\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source_sanitized.md -o output.pdf --pdf-engine=wkhtmltopdf\n```\n\n**Attempt 4 - Python fpdf2 (most reliable fallback):**\n```\nexecute_code_sandbox\ncode: |\n  from fpdf import FPDF\n  import re\n  \n  # Read sanitized markdown\n  with open('\u002Ftmp\u002Fdocument_source_sanitized.md', 'r') as f:\n      content = f.read()\n  \n  # Simple markdown-to-PDF conversion\n  pdf = FPDF()\n  pdf.add_page()\n  pdf.set_font('Arial', '', 12)\n  \n  # Process content (strip markdown, handle basic formatting)\n  lines = content.split('\\n')\n  for line in lines:\n      # Remove markdown syntax\n      clean = re.sub(r'[#*_`]', '', line)\n      if clean.strip():\n          pdf.cell(0, 10, clean, ln=True)\n  \n  pdf.output('output.pdf')\n  print('PDF created successfully')\n```\n\n**Attempt 5 - Python reportlab (alternative):**\n```\nexecute_code_sandbox\ncode: |\n  from reportlab.lib.pagesizes import letter\n  from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer\n  from reportlab.lib.styles import getSampleStyleSheet\n  import re\n  \n  doc = SimpleDocTemplate('output.pdf', pagesize=letter)\n  styles = getSampleStyleSheet()\n  story = []\n  \n  with open('\u002Ftmp\u002Fdocument_source_sanitized.md', 'r') as f:\n      content = f.read()\n  \n  lines = content.split('\\n')\n  for line in lines:\n      clean = re.sub(r'[#*_`]', '', line)\n      if clean.strip():\n          story.append(Paragraph(clean, styles['Normal']))\n          story.append(Spacer(1, 6))\n  \n  doc.build(story)\n  print('PDF created with reportlab')\n```\n\n#### For HTML (from original markdown):\n\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source.md -o output.html\n```\n\n**Fallback if pandoc fails:**\n```\nexecute_code_sandbox\ncode: |\n  import markdown\n  with open('\u002Ftmp\u002Fdocument_source.md', 'r') as f:\n      md_content = f.read()\n  html_content = markdown.markdown(md_content)\n  with open('output.html', 'w') as f:\n      f.write(f'\u003C!DOCTYPE html>\u003Chtml>\u003Cbody>{html_content}\u003C\u002Fbody>\u003C\u002Fhtml>')\n```\n\n### Step 5: Verify Outputs\n\nCheck that files were created successfully and have reasonable sizes:\n\n```\nrun_shell\ncommand: ls -lh output.* 2>\u002Fdev\u002Fnull || echo \"Some outputs missing\"\n```\n\n```\nrun_shell\ncommand: file output.pdf output.docx output.html 2>\u002Fdev\u002Fnull\n```\n\n**Validation criteria:**\n- [ ] File exists\n- [ ] File size > 0 bytes\n- [ ] File command recognizes the format correctly\n- [ ] (Optional) Open\u002Fpreview the file to confirm content renders\n\n## Complete Example\n\n```markdown\n# Generate Project Status Report\n\n## Step 1: Detect failures (if applicable)\nTool check: read_webpage failed 3x, search_web failed 2x → PIVOT to fallback workflow\n\n## Step 2: Write Markdown source\nwrite_file\npath: \u002Ftmp\u002Fproject_status.md\ncontent: |\n  # Project Status Report\n  \n  ## Executive Summary\n  This report summarizes project progress using established methodologies.\n  \n  ## Current Status\n  - Phase 1: Complete\n  - Phase 2: In Progress (75%)\n  - Phase 3: Not Started\n  \n  ## Risks & Mitigation\n  Standard risk framework applied...\n  \n  ## Recommendations\n  1. Continue current trajectory\n  2. Schedule stakeholder review\n\n> **Note**: Specific metrics from project management tool were unavailable; guidance reflects standard practices.\n\n## Step 3: Sanitize for PDF\nwrite_file\npath: \u002Ftmp\u002Fproject_status_sanitized.md\ncontent: |\n  [Same content with any special chars replaced per table above]\n\n## Step 4: Convert (try each, proceed on failure)\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fproject_status.md -o project_status.docx\n\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fproject_status_sanitized.md -o project_status.pdf\n\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fproject_status.md -o project_status.html\n\n## Step 5: Verify\nrun_shell\ncommand: ls -lh project_status.*\n```\n\n## Decision Tree for Conversion Failures\n\n```\npandoc PDF fails?\n  ├─→ Try --pdf-engine=xelatex\n  │   └─→ Fails?\n  │       ├─→ Try --pdf-engine=wkhtmltopdf\n  │       │   └─→ Fails?\n  │       │       └─→ Use Python fpdf2 (most reliable)\n  │       └─→ Success → Done\n  └─→ Success → Done\n```\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| PDF generation fails with encoding error | Use sanitized markdown; try `--pdf-engine=xelatex` |\n| Pandoc not found | Install via `apt-get install pandoc` or use Python fallbacks |\n| LaTeX not found | Use `--pdf-engine=wkhtmltopdf` or Python fpdf2 |\n| DOCX formatting issues | Add `--reference-doc=template.docx` for custom styles |\n| Unicode in any format | Use `-f markdown+utf8`; ensure UTF-8 encoding with `file -i source.md` |\n| All pandoc commands fail | Fall back to Python libraries (fpdf2, reportlab, python-docx, markdown) |\n| Python libraries missing | Install via `pip install fpdf2 reportlab python-docx markdown` |\n\n## Advantages Over Standard Approaches\n\n| Aspect | Standard Approach | Resilient Pipeline |\n|--------|------------------|-------------------|\n| Tool failure response | Retry same approach | Detect pattern, pivot immediately |\n| Content source | External data only | Embedded domain knowledge when needed |\n| Conversion robustness | Single method | Progressive fallbacks (5+ options) |\n| Unicode handling | May cause failures | Proactive sanitization |\n| Verification | Optional | Built-in validation step |\n| Transparency | May hide limitations | Explicit about constraints |\n\n## Best Practices\n\n| Do | Don't |\n|----|-------|\n| Pivot after 2+ tool failures | Retry failing tools 5+ times |\n| Sanitize before PDF conversion | Send raw Unicode to LaTeX |\n| Try multiple conversion methods | Give up after first failure |\n| Be transparent about limitations | Claim unverified facts as certain |\n| Verify all outputs | Assume files were created |\n| Use progressive fallbacks | Hard-code single approach |\n\n## When to Return to Standard Methods\n\nAfter successfully completing the resilient pipeline:\n\n1. **For similar future tasks**: You can attempt standard `shell_agent` delegation first\n2. **Keep this skill ready**: Use immediately if tool failures recur\n3. **For Unicode-heavy documents**: Consider always using this workflow with sanitization\n4. **For critical deliverables**: This workflow provides maximum reliability\n\n## Related Skills\n\n- `document-gen-fallback-enhanced`: Original Unicode-safe fallback (parent)\n- `write-file-fallback-report`: Domain-knowledge report generation (parent)\n- Use this unified skill when you need **all capabilities combined** in one workflow\n*** End Files\n*** Add File: sanitize_for_pdf.sh\n#!\u002Fbin\u002Fbash\n# sanitize_for_pdf.sh - Replace problematic unicode chars for LaTeX\u002FPDF\n# Usage: .\u002Fsanitize_for_pdf.sh \u003Cinput.md> [output.md]\n\nif [ -z \"$1\" ]; then\n  echo \"Usage: $0 \u003Cinput.md> [output.md]\"\n  exit 1\nfi\n\nINPUT=\"$1\"\nOUTPUT=\"${2:-${1%.md}_sanitized.md}\"\n\n# Check input file exists\nif [ ! -f \"$INPUT\" ]; then\n  echo \"Error: Input file not found: $INPUT\"\n  exit 1\nfi\n\n# Apply sanitization replacements\nsed -e 's\u002F—\u002F--\u002Fg' \\\n    -e 's\u002F–\u002F-\u002Fg' \\\n    -e 's\u002F\"([^\"]*)\"\u002F\"\\1\"\u002Fg' \\\n    -e \"s\u002F'([^']*)\u002F'\\1'\u002Fg\" \\\n    -e 's\u002F…\u002F...\u002Fg' \\\n    -e 's\u002F→\u002F->\u002Fg' \\\n    -e 's\u002F←\u002F\u003C-\u002Fg' \\\n    -e 's\u002F↑\u002F^^\u002Fg' \\\n    -e 's\u002F↓\u002Fvv\u002Fg' \\\n    -e 's\u002F✓\u002F[x]\u002Fg' \\\n    -e 's\u002F✗\u002F[ ]\u002Fg' \\\n    -e 's\u002F★\u002F*\u002Fg' \\\n    -e 's\u002F●\u002F-\u002Fg' \\\n    -e 's\u002F©\u002F(c)\u002Fg' \\\n    -e 's\u002F®\u002F(r)\u002Fg' \\\n    -e 's\u002F™\u002F(tm)\u002Fg' \\\n    \"$INPUT\" > \"$OUTPUT\"\n\necho \"Sanitized: $INPUT -> $OUTPUT\"\necho \"Verify with: diff $INPUT $OUTPUT\"\n*** Add File: convert_with_fallbacks.sh\n#!\u002Fbin\u002Fbash\n# convert_with_fallbacks.sh - Progressive fallback document conversion\n# Usage: .\u002Fconvert_with_fallbacks.sh \u003Cinput.md> \u003Coutput_format>\n# Formats: pdf, docx, html\n\nif [ -z \"$1\" ] || [ -z \"$2\" ]; then\n  echo \"Usage: $0 \u003Cinput.md> \u003Cpdf|docx|html>\"\n  exit 1\nfi\n\nINPUT=\"$1\"\nFORMAT=\"$2\"\nBASENAME=\"${INPUT%.*}\"\nOUTPUT=\"${BASENAME}.${FORMAT}\"\n\necho \"Converting $INPUT to $FORMAT...\"\n\nif [ \"$FORMAT\" = \"pdf\" ]; then\n  echo \"Attempt 1: pandoc default\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with pandoc default\"\n    exit 0\n  fi\n  \n  echo \"Attempt 2: pandoc with xeLaTeX\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" --pdf-engine=xelatex 2>\u002Fdev\u002Fnull; then\n    echo \"Success with xeLaTeX\"\n    exit 0\n  fi\n  \n  echo \"Attempt 3: pandoc with wkhtmltopdf\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" --pdf-engine=wkhtmltopdf 2>\u002Fdev\u002Fnull; then\n    echo \"Success with wkhtmltopdf\"\n    exit 0\n  fi\n  \n  echo \"Attempt 4: Python fpdf2\"\n  if python3 -c \"\nfrom fpdf import FPDF\nimport re\npdf = FPDF()\npdf.add_page()\npdf.set_font('Arial', '', 12)\nwith open('$INPUT', 'r') as f:\n    for line in f:\n        clean = re.sub(r'[#*_\\`]', '', line)\n        if clean.strip():\n            pdf.cell(0, 10, clean.strip(), ln=True)\npdf.output('$OUTPUT')\n\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with fpdf2\"\n    exit 0\n  fi\n  \n  echo \"All PDF conversion methods failed\"\n  exit 1\n\nelif [ \"$FORMAT\" = \"docx\" ]; then\n  echo \"Attempt 1: pandoc\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with pandoc\"\n    exit 0\n  fi\n  \n  echo \"Pandoc failed for DOCX - consider Python fallback (python-docx)\"\n  exit 1\n\nelif [ \"$FORMAT\" = \"html\" ]; then\n  echo \"Attempt 1: pandoc\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with pandoc\"\n    exit 0\n  fi\n  \n  echo \"Attempt 2: Python markdown\"\n  if python3 -c \"\nimport markdown\nwith open('$INPUT', 'r') as f:\n    content = f.read()\nhtml = markdown.markdown(content)\nwith open('$OUTPUT', 'w') as f:\n    f.write(f'\u003C!DOCTYPE html>\u003Chtml>\u003Cbody>{html}\u003C\u002Fbody>\u003C\u002Fhtml>')\n\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with markdown library\"\n    exit 0\n  fi\n  \n  echo \"All HTML conversion methods failed\"\n  exit 1\n\nelse\n  echo \"Unknown format: $FORMAT (use pdf, docx, or html)\"\n  exit 1\nfi\n","# Resilient Document Generation Pipeline\n\n## When to Use This Skill\n\nUse this workflow when generating documents in **challenging environments** where:\n\n- **Tool failures are likely or have occurred**: `read_file`, `search_web`, `read_webpage`, or `execute_code_sandbox` return errors\n- **Multiple formats are needed**: Generate `.docx`, `.pdf`, `.html` from the same source\n- **Unicode\u002Fspecial characters are present**: Documents contain em dashes, curly quotes, arrows, symbols, or non-ASCII text\n- **Primary conversion methods may fail**: LaTeX\u002Fpandoc may not be available or misconfigured\n\nThis skill combines **early failure detection**, **domain-knowledge content creation**, **progressive conversion fallbacks**, and **Unicode safety** into a single resilient workflow.\n\n## Core Workflow Overview\n\n```\n┌─────────────────────────────────────────────────────────────────┐\n│  1. DETECT tool failures (2+ indicators → pivot immediately)   │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n┌────────────────▼────────────────────────────────────────────────┐\n│  2. CREATE content with write_file using embedded domain       │\n│     knowledge (professionally structured markdown)              │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n┌────────────────▼────────────────────────────────────────────────┐\n│  3. SANITIZE unicode (create LaTeX-safe version for PDF)       │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n┌────────────────▼────────────────────────────────────────────────┐\n│  4. CONVERT with progressive fallbacks:                        │\n│     pandoc → reportlab → fpdf2 → wkhtmltopdf                   │\n└────────────────┬────────────────────────────────────────────────┘\n                 │\n┌────────────────▼────────────────────────────────────────────────┐\n│  5. VERIFY outputs exist and are valid                          │\n└─────────────────────────────────────────────────────────────────┘\n```\n\n## Step-by-Step Workflow\n\n### Step 1: Detect Tool Failure Pattern\n\n**Before attempting document generation**, check for failure indicators:\n\n```\nTOOL_FAILURE_INDICATORS = [\n    \"read_file returns binary\u002Fimage data instead of text\",\n    \"search_web returns unknown error or empty results\",\n    \"read_webpage returns unknown error on multiple URLs\",\n    \"execute_code_sandbox fails unexpectedly\",\n    \"pandoc command fails with 'unknown error'\",\n    \"Multiple consecutive tool failures on data retrieval\"\n]\n```\n\n**Decision point**: If **2+ indicators** are present within the first 2-3 iterations:\n\n1. **Stop** attempting to fix the failing tools\n2. **Acknowledge** the limitation briefly in your output\n3. **Commit** to generating the document with available knowledge\n4. **Proceed** to Step 2 immediately\n\n### Step 2: Create Content with write_file\n\nWrite your document as **professionally structured Markdown** using embedded domain knowledge:\n\n```\nwrite_file\npath: \u002Ftmp\u002Fdocument_source.md\ncontent: |\n  # [Document Title]\n  \n  ## Executive Summary\n  [Brief overview of key content - use domain knowledge]\n  \n  ## Background\n  [Context and scope - leverage embedded expertise]\n  \n  ## Main Content\n  [Organized sections with headers, lists, tables]\n  \n  ## Limitations & Notes\n  [Transparent about data source limitations if relevant]\n  \n  ## Recommendations\u002FNext Steps\n  [Actionable guidance based on available information]\n```\n\n**Best practices for content:**\n- Use **general domain knowledge** appropriately when external data is unavailable\n- **Clearly distinguish** between verified facts and general guidance\n- Include **actionable frameworks** rather than specific unverified data\n- Add **placeholder notes** where specific data would enhance the document:\n\n```markdown\n> **Note**: Specific [metric\u002Fdata point] would typically be sourced from \n> [expected source]. The guidance below reflects established best practices.\n```\n\n### Step 3: Sanitize Unicode Characters (Pre-PDF Conversion)\n\n**Critical**: PDF generation via pandoc typically uses LaTeX, which has limited Unicode support. Create a sanitized version:\n\n#### Option A: Manual write_file (Recommended for control)\n\n```\nwrite_file\npath: \u002Ftmp\u002Fdocument_source_sanitized.md\ncontent: |\n  [Same content as Step 2, but with these replacements:]\n```\n\n**Character replacement table:**\n\n| Character | Issue | Safe Replacement |\n|-----------|-------|------------------|\n| `—` (em dash) | May not render | `--` or `-` |\n| `–` (en dash) | May not render | `-` |\n| `\" \"` (curly quotes) | Encoding errors | `\" \"` (straight quotes) |\n| `' '` (curly apostrophe) | Encoding errors | `'` (straight apostrophe) |\n| `…` (ellipsis) | May not render | `...` |\n| `→` `←` `↑` `↓` (arrows) | LaTeX incompatibility | `->` `\u003C-` `^` `v` |\n| `✓` `✗` (checkmarks) | May not render | `[x]` `[ ]` |\n| `★` `●` (symbols) | May not render | `*` `-` |\n| `©` `®` `™` | May require packages | `(c)` `(r)` `(tm)` |\n| Non-ASCII letters (é, ñ, ü) | Font-dependent | Use xeLaTeX or keep for non-PDF formats |\n\n#### Option B: Shell script sanitization\n\n```\nrun_shell\ncommand: sed -e 's\u002F—\u002F--\u002Fg' -e 's\u002F–\u002F-\u002Fg' -e 's\u002F\"([^\"]*)\"\u002F\"\\1\"\u002Fg' -e \"s\u002F'([^']*)\u002F'\\1'\u002Fg\" -e 's\u002F…\u002F...\u002Fg' -e 's\u002F→\u002F->\u002Fg' -e 's\u002F←\u002F\u003C-\u002Fg' -e 's\u002F©\u002F(c)\u002Fg' -e 's\u002F®\u002F(r)\u002Fg' -e 's\u002F™\u002F(tm)\u002Fg' \u002Ftmp\u002Fdocument_source.md > \u002Ftmp\u002Fdocument_source_sanitized.md\n```\n\n**Important**: Keep the original unsanitized file for DOCX\u002FHTML conversion (these formats handle Unicode better).\n\n### Step 4: Convert to Target Formats with Progressive Fallbacks\n\nUse `run_shell` with **progressive fallback** strategy. Try each method; if it fails, move to the next.\n\n#### For DOCX (from original markdown):\n\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source.md -o output.docx\n```\n\n**Fallback if pandoc fails:**\n```\nexecute_code_sandbox\ncode: |\n  from docx import Document\n  # Parse markdown and create DOCX with python-docx\n  # (Implementation depends on complexity needs)\n```\n\n#### For PDF (from sanitized markdown):\n\n**Attempt 1 - pandoc with default engine:**\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source_sanitized.md -o output.pdf\n```\n\n**Attempt 2 - pandoc with xeLaTeX (better Unicode):**\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source_sanitized.md -o output.pdf --pdf-engine=xelatex\n```\n\n**Attempt 3 - pandoc with wkhtmltopdf:**\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source_sanitized.md -o output.pdf --pdf-engine=wkhtmltopdf\n```\n\n**Attempt 4 - Python fpdf2 (most reliable fallback):**\n```\nexecute_code_sandbox\ncode: |\n  from fpdf import FPDF\n  import re\n  \n  # Read sanitized markdown\n  with open('\u002Ftmp\u002Fdocument_source_sanitized.md', 'r') as f:\n      content = f.read()\n  \n  # Simple markdown-to-PDF conversion\n  pdf = FPDF()\n  pdf.add_page()\n  pdf.set_font('Arial', '', 12)\n  \n  # Process content (strip markdown, handle basic formatting)\n  lines = content.split('\\n')\n  for line in lines:\n      # Remove markdown syntax\n      clean = re.sub(r'[#*_`]', '', line)\n      if clean.strip():\n          pdf.cell(0, 10, clean, ln=True)\n  \n  pdf.output('output.pdf')\n  print('PDF created successfully')\n```\n\n**Attempt 5 - Python reportlab (alternative):**\n```\nexecute_code_sandbox\ncode: |\n  from reportlab.lib.pagesizes import letter\n  from reportlab.platypus import SimpleDocTemplate, Paragraph, Spacer\n  from reportlab.lib.styles import getSampleStyleSheet\n  import re\n  \n  doc = SimpleDocTemplate('output.pdf', pagesize=letter)\n  styles = getSampleStyleSheet()\n  story = []\n  \n  with open('\u002Ftmp\u002Fdocument_source_sanitized.md', 'r') as f:\n      content = f.read()\n  \n  lines = content.split('\\n')\n  for line in lines:\n      clean = re.sub(r'[#*_`]', '', line)\n      if clean.strip():\n          story.append(Paragraph(clean, styles['Normal']))\n          story.append(Spacer(1, 6))\n  \n  doc.build(story)\n  print('PDF created with reportlab')\n```\n\n#### For HTML (from original markdown):\n\n```\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fdocument_source.md -o output.html\n```\n\n**Fallback if pandoc fails:**\n```\nexecute_code_sandbox\ncode: |\n  import markdown\n  with open('\u002Ftmp\u002Fdocument_source.md', 'r') as f:\n      md_content = f.read()\n  html_content = markdown.markdown(md_content)\n  with open('output.html', 'w') as f:\n      f.write(f'\u003C!DOCTYPE html>\u003Chtml>\u003Cbody>{html_content}\u003C\u002Fbody>\u003C\u002Fhtml>')\n```\n\n### Step 5: Verify Outputs\n\nCheck that files were created successfully and have reasonable sizes:\n\n```\nrun_shell\ncommand: ls -lh output.* 2>\u002Fdev\u002Fnull || echo \"Some outputs missing\"\n```\n\n```\nrun_shell\ncommand: file output.pdf output.docx output.html 2>\u002Fdev\u002Fnull\n```\n\n**Validation criteria:**\n- [ ] File exists\n- [ ] File size > 0 bytes\n- [ ] File command recognizes the format correctly\n- [ ] (Optional) Open\u002Fpreview the file to confirm content renders\n\n## Complete Example\n\n```markdown\n# Generate Project Status Report\n\n## Step 1: Detect failures (if applicable)\nTool check: read_webpage failed 3x, search_web failed 2x → PIVOT to fallback workflow\n\n## Step 2: Write Markdown source\nwrite_file\npath: \u002Ftmp\u002Fproject_status.md\ncontent: |\n  # Project Status Report\n  \n  ## Executive Summary\n  This report summarizes project progress using established methodologies.\n  \n  ## Current Status\n  - Phase 1: Complete\n  - Phase 2: In Progress (75%)\n  - Phase 3: Not Started\n  \n  ## Risks & Mitigation\n  Standard risk framework applied...\n  \n  ## Recommendations\n  1. Continue current trajectory\n  2. Schedule stakeholder review\n\n> **Note**: Specific metrics from project management tool were unavailable; guidance reflects standard practices.\n\n## Step 3: Sanitize for PDF\nwrite_file\npath: \u002Ftmp\u002Fproject_status_sanitized.md\ncontent: |\n  [Same content with any special chars replaced per table above]\n\n## Step 4: Convert (try each, proceed on failure)\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fproject_status.md -o project_status.docx\n\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fproject_status_sanitized.md -o project_status.pdf\n\nrun_shell\ncommand: pandoc \u002Ftmp\u002Fproject_status.md -o project_status.html\n\n## Step 5: Verify\nrun_shell\ncommand: ls -lh project_status.*\n```\n\n## Decision Tree for Conversion Failures\n\n```\npandoc PDF fails?\n  ├─→ Try --pdf-engine=xelatex\n  │   └─→ Fails?\n  │       ├─→ Try --pdf-engine=wkhtmltopdf\n  │       │   └─→ Fails?\n  │       │       └─→ Use Python fpdf2 (most reliable)\n  │       └─→ Success → Done\n  └─→ Success → Done\n```\n\n## Troubleshooting\n\n| Issue | Solution |\n|-------|----------|\n| PDF generation fails with encoding error | Use sanitized markdown; try `--pdf-engine=xelatex` |\n| Pandoc not found | Install via `apt-get install pandoc` or use Python fallbacks |\n| LaTeX not found | Use `--pdf-engine=wkhtmltopdf` or Python fpdf2 |\n| DOCX formatting issues | Add `--reference-doc=template.docx` for custom styles |\n| Unicode in any format | Use `-f markdown+utf8`; ensure UTF-8 encoding with `file -i source.md` |\n| All pandoc commands fail | Fall back to Python libraries (fpdf2, reportlab, python-docx, markdown) |\n| Python libraries missing | Install via `pip install fpdf2 reportlab python-docx markdown` |\n\n## Advantages Over Standard Approaches\n\n| Aspect | Standard Approach | Resilient Pipeline |\n|--------|------------------|-------------------|\n| Tool failure response | Retry same approach | Detect pattern, pivot immediately |\n| Content source | External data only | Embedded domain knowledge when needed |\n| Conversion robustness | Single method | Progressive fallbacks (5+ options) |\n| Unicode handling | May cause failures | Proactive sanitization |\n| Verification | Optional | Built-in validation step |\n| Transparency | May hide limitations | Explicit about constraints |\n\n## Best Practices\n\n| Do | Don't |\n|----|-------|\n| Pivot after 2+ tool failures | Retry failing tools 5+ times |\n| Sanitize before PDF conversion | Send raw Unicode to LaTeX |\n| Try multiple conversion methods | Give up after first failure |\n| Be transparent about limitations | Claim unverified facts as certain |\n| Verify all outputs | Assume files were created |\n| Use progressive fallbacks | Hard-code single approach |\n\n## When to Return to Standard Methods\n\nAfter successfully completing the resilient pipeline:\n\n1. **For similar future tasks**: You can attempt standard `shell_agent` delegation first\n2. **Keep this skill ready**: Use immediately if tool failures recur\n3. **For Unicode-heavy documents**: Consider always using this workflow with sanitization\n4. **For critical deliverables**: This workflow provides maximum reliability\n\n## Related Skills\n\n- `document-gen-fallback-enhanced`: Original Unicode-safe fallback (parent)\n- `write-file-fallback-report`: Domain-knowledge report generation (parent)\n- Use this unified skill when you need **all capabilities combined** in one workflow\n*** End Files\n*** Add File: sanitize_for_pdf.sh\n#!\u002Fbin\u002Fbash\n# sanitize_for_pdf.sh - Replace problematic unicode chars for LaTeX\u002FPDF\n# Usage: .\u002Fsanitize_for_pdf.sh \u003Cinput.md> [output.md]\n\nif [ -z \"$1\" ]; then\n  echo \"Usage: $0 \u003Cinput.md> [output.md]\"\n  exit 1\nfi\n\nINPUT=\"$1\"\nOUTPUT=\"${2:-${1%.md}_sanitized.md}\"\n\n# Check input file exists\nif [ ! -f \"$INPUT\" ]; then\n  echo \"Error: Input file not found: $INPUT\"\n  exit 1\nfi\n\n# Apply sanitization replacements\nsed -e 's\u002F—\u002F--\u002Fg' \\\n    -e 's\u002F–\u002F-\u002Fg' \\\n    -e 's\u002F\"([^\"]*)\"\u002F\"\\1\"\u002Fg' \\\n    -e \"s\u002F'([^']*)\u002F'\\1'\u002Fg\" \\\n    -e 's\u002F…\u002F...\u002Fg' \\\n    -e 's\u002F→\u002F->\u002Fg' \\\n    -e 's\u002F←\u002F\u003C-\u002Fg' \\\n    -e 's\u002F↑\u002F^^\u002Fg' \\\n    -e 's\u002F↓\u002Fvv\u002Fg' \\\n    -e 's\u002F✓\u002F[x]\u002Fg' \\\n    -e 's\u002F✗\u002F[ ]\u002Fg' \\\n    -e 's\u002F★\u002F*\u002Fg' \\\n    -e 's\u002F●\u002F-\u002Fg' \\\n    -e 's\u002F©\u002F(c)\u002Fg' \\\n    -e 's\u002F®\u002F(r)\u002Fg' \\\n    -e 's\u002F™\u002F(tm)\u002Fg' \\\n    \"$INPUT\" > \"$OUTPUT\"\n\necho \"Sanitized: $INPUT -> $OUTPUT\"\necho \"Verify with: diff $INPUT $OUTPUT\"\n*** Add File: convert_with_fallbacks.sh\n#!\u002Fbin\u002Fbash\n# convert_with_fallbacks.sh - Progressive fallback document conversion\n# Usage: .\u002Fconvert_with_fallbacks.sh \u003Cinput.md> \u003Coutput_format>\n# Formats: pdf, docx, html\n\nif [ -z \"$1\" ] || [ -z \"$2\" ]; then\n  echo \"Usage: $0 \u003Cinput.md> \u003Cpdf|docx|html>\"\n  exit 1\nfi\n\nINPUT=\"$1\"\nFORMAT=\"$2\"\nBASENAME=\"${INPUT%.*}\"\nOUTPUT=\"${BASENAME}.${FORMAT}\"\n\necho \"Converting $INPUT to $FORMAT...\"\n\nif [ \"$FORMAT\" = \"pdf\" ]; then\n  echo \"Attempt 1: pandoc default\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with pandoc default\"\n    exit 0\n  fi\n  \n  echo \"Attempt 2: pandoc with xeLaTeX\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" --pdf-engine=xelatex 2>\u002Fdev\u002Fnull; then\n    echo \"Success with xeLaTeX\"\n    exit 0\n  fi\n  \n  echo \"Attempt 3: pandoc with wkhtmltopdf\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" --pdf-engine=wkhtmltopdf 2>\u002Fdev\u002Fnull; then\n    echo \"Success with wkhtmltopdf\"\n    exit 0\n  fi\n  \n  echo \"Attempt 4: Python fpdf2\"\n  if python3 -c \"\nfrom fpdf import FPDF\nimport re\npdf = FPDF()\npdf.add_page()\npdf.set_font('Arial', '', 12)\nwith open('$INPUT', 'r') as f:\n    for line in f:\n        clean = re.sub(r'[#*_\\`]', '', line)\n        if clean.strip():\n            pdf.cell(0, 10, clean.strip(), ln=True)\npdf.output('$OUTPUT')\n\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with fpdf2\"\n    exit 0\n  fi\n  \n  echo \"All PDF conversion methods failed\"\n  exit 1\n\nelif [ \"$FORMAT\" = \"docx\" ]; then\n  echo \"Attempt 1: pandoc\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with pandoc\"\n    exit 0\n  fi\n  \n  echo \"Pandoc failed for DOCX - consider Python fallback (python-docx)\"\n  exit 1\n\nelif [ \"$FORMAT\" = \"html\" ]; then\n  echo \"Attempt 1: pandoc\"\n  if pandoc \"$INPUT\" -o \"$OUTPUT\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with pandoc\"\n    exit 0\n  fi\n  \n  echo \"Attempt 2: Python markdown\"\n  if python3 -c \"\nimport markdown\nwith open('$INPUT', 'r') as f:\n    content = f.read()\nhtml = markdown.markdown(content)\nwith open('$OUTPUT', 'w') as f:\n    f.write(f'\u003C!DOCTYPE html>\u003Chtml>\u003Cbody>{html}\u003C\u002Fbody>\u003C\u002Fhtml>')\n\" 2>\u002Fdev\u002Fnull; then\n    echo \"Success with markdown library\"\n    exit 0\n  fi\n  \n  echo \"All HTML conversion methods failed\"\n  exit 1\n\nelse\n  echo \"Unknown format: $FORMAT (use pdf, docx, or html)\"\n  exit 1\nfi\n",{"name":5,"description":7},"main","af1b40a42167d09c30b3a63000aa14ace4c1e229","gdpval_bench\u002Fskills\u002Fdocument-gen-fallback-enhanced-merged","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs","https:\u002F\u002Fxyliu-cs.github.io","PhD Student in CS, CUHK-Shenzhen.","2026-04-06 20:32:15",{"source":8,"skillName":5,"commands":52,"prompt":62,"zipAvailable":63},[53,56,59],{"tool":54,"command":55},"npx","npx skills add xyliu-cs\u002FOpenSpace-GDPval --skill resilient-document-pipeline",{"tool":57,"command":58},"bunx","bunx skills add xyliu-cs\u002FOpenSpace-GDPval --skill resilient-document-pipeline",{"tool":60,"command":61},"pnpm","pnpm dlx skills add xyliu-cs\u002FOpenSpace-GDPval --skill resilient-document-pipeline","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fdocument-gen-fallback-enhanced-merged\u002FSKILL.md",true,[65],{"path":66,"resourceType":67,"resourceTypeDesc":68,"sizeBytes":69,"sourceHtmlUrl":70},".skill_id","OTHER","其他",51,"https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fdocument-gen-fallback-enhanced-merged\u002F.skill_id",[72,85,93,108,131,150],{"skillNo":73,"name":74,"nameZh":6,"description":75,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":76,"categories":77,"keywords":78,"publishedAt":38},"01M6KG8MF1S664SWBDENYRSCK8","zip-export-deliverable","Ensures codebase deliverables are properly exported as ZIP archives through a dedicated finalization step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-export-deliverable\u002FSKILL.md",[],[79,80,81,82,83,84],"zip export deliverable","zip","export","deliverables","codebase","as",{"skillNo":86,"name":87,"nameZh":6,"description":88,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":89,"categories":90,"keywords":91,"publishedAt":38},"01M6KG8GAZWHHEK7VNJDW0ME21","zip-deliverable-finalization","Ensure codebase deliverables are properly packaged as ZIP exports in a dedicated final step","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzip-deliverable-finalization\u002FSKILL.md",[],[92,80,82,83,84],"zip deliverable finalization",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":38},"01M6KG8CMQQ1PYMNTSRZ9VS1MD","zero-iteration-failure-analysis","Identify and handle agent failures with 0 iterations as pre-execution system issues","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fzero-iteration-failure-analysis\u002FSKILL.md",[],[100,101,102,103,104,37,105,106,84,107],"failure analysis","ZeRO","analysis","iteration","zero iteration failure analysis","issues","execution","system",{"skillNo":109,"name":110,"nameZh":6,"description":111,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":112,"categories":113,"keywords":119,"publishedAt":38},"01M6KG86W3PA07FT9W58YHHERM","write-file-fallback-report","Generate professional documents using write_file when primary data sources fail, leveraging embedded domain knowledge instead of external retrieval","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report\u002FSKILL.md",[114],{"categoryNo":115,"categoryName":116,"taxonomyType":117,"taxonomyTypeDesc":118},"01JBSEEDCAT000000000000034","行政与办公人员","PROFESSION","适用职业",[32,120,121,122,123,33,124,125,126,127,128,129,130,29],"write","file","report","write file fallback report","professional","sources","retrieval","generate","embedded","documents","data",{"skillNo":132,"name":133,"nameZh":6,"description":134,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":135,"categories":136,"keywords":140,"publishedAt":38},"01M6KG82GAEY3GG77CMGCK1C2T","fallback-doc-with-delegation","Generate professional documents after tool failures using shell_agent for complex formats or write_file for simple text\u002Fmarkdown","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced\u002FSKILL.md",[137],{"categoryNo":138,"categoryName":139,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[141,37,32,142,143,144,129,127,121,145,30,146,120,147,124,148,149],"fallback doc with delegation","doc","delegation","shell","markdown","text","simple","formats","for",{"skillNo":151,"name":152,"nameZh":6,"description":153,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":154,"categories":155,"keywords":157,"publishedAt":38},"01M6KG7WT7GX5NYCGEFHW22NV7","context-anchored-fallback-report","Generate documents with write_file when retrieval tools fail, with explicit guardrails against task context drift","https:\u002F\u002Fgithub.com\u002Fxyliu-cs\u002FOpenSpace-GDPval\u002Fblob\u002Fmain\u002Fgdpval_bench\u002Fskills\u002Fwrite-file-fallback-report-enhanced-4bc5c2\u002FSKILL.md",[156],{"categoryNo":115,"categoryName":116,"taxonomyType":117,"taxonomyTypeDesc":118},[32,122,158,159,127,121,160,161,120,162,163,126,37,164,129],"context","context anchored fallback report","Guardrails","Tools","task","drift","context drift"]