본문으로 건너뛰기
Skillpedia
PDF, Word, 슬라이드7.8k · #12863

resilient-document-pipeline

하는 일

이 스킬은 도구 실패, 여러 출력 형식, 특수 문자가 함께 있는 어려운 상황에서 쓰는 문서 작업 흐름입니다. 자료 조회가 되지 않아도 완성된 문서가 필요한 사람에게 맞습니다.

사용하는 경우

  • ✓문서 작업 중 파일 읽기나 웹 검색에서 오류가 계속 날 때.
  • ✓같은 원본으로 Word, PDF, HTML 문서가 모두 필요할 때.
  • ✓문서에 긴 대시(—), 곡선 따옴표, 화살표 같은 기호가 들어 있는 경우.

스킬 링크

https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-merged/SKILL.md

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-merged/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“보고서를 쓰는 중에 웹 검색이 계속 실패합니다. 직접 알고 있는 내용으로 작성하고 Word와 PDF 버전을 만들어 주세요.”

매주 새 스킬 5개. 읽는 데 1분.

작동 방식

도구가 반복해서 실패하면 AI는 내장 지식으로 내용을 쓰고, 특수 문자를 정리한 뒤, 변환 방법을 차례대로 시도하며 각 결과를 확인합니다.

기술 내용 (원본 SKILL.md)

작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.

Resilient Document Generation Pipeline

When to Use This Skill

Use this workflow when generating documents in challenging environments where:

  • Tool failures are likely or have occurred: read_file, search_web, read_webpage, or execute_code_sandbox return errors
  • Multiple formats are needed: Generate .docx, .pdf, .html from the same source
  • Unicode/special characters are present: Documents contain em dashes, curly quotes, arrows, symbols, or non-ASCII text
  • Primary conversion methods may fail: LaTeX/pandoc may not be available or misconfigured

This skill combines early failure detection, domain-knowledge content creation, progressive conversion fallbacks, and Unicode safety into a single resilient workflow.

Core Workflow Overview

┌─────────────────────────────────────────────────────────────────┐
│  1. DETECT tool failures (2+ indicators → pivot immediately)   │
└────────────────┬────────────────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────────────────┐
│  2. CREATE content with write_file using embedded domain       │
│     knowledge (professionally structured markdown)              │
└────────────────┬────────────────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────────────────┐
│  3. SANITIZE unicode (create LaTeX-safe version for PDF)       │
└────────────────┬────────────────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────────────────┐
│  4. CONVERT with progressive fallbacks:                        │
│     pandoc → reportlab → fpdf2 → wkhtmltopdf                   │
└────────────────┬────────────────────────────────────────────────┘
                 │
┌────────────────▼────────────────────────────────────────────────┐
│  5. VERIFY outputs exist and are valid                          │
└─────────────────────────────────────────────────────────────────┘

Step-by-Step Workflow

Step 1: Detect Tool Failure Pattern

Before attempting document generation, check for failure indicators:

TOOL_FAILURE_INDICATORS = [
    "read_file returns binary/image data instead of text",
    "search_web returns unknown error or empty results",
    "read_webpage returns unknown error on multiple URLs",
    "execute_code_sandbox fails unexpectedly",
    "pandoc command fails with 'unknown error'",
    "Multiple consecutive tool failures on data retrieval"
]

Decision point: If 2+ indicators are present within the first 2-3 iterations:

  1. Stop attempting to fix the failing tools
  2. Acknowledge the limitation briefly in your output
  3. Commit to generating the document with available knowledge
  4. Proceed to Step 2 immediately

Step 2: Create Content with write_file

Write your document as professionally structured Markdown using embedded domain knowledge:

write_file
path: /tmp/document_source.md
content: |
  # [Document Title]
  
  ## Executive Summary
  [Brief overview of key content - use domain knowledge]
  
  ## Background
  [Context and scope - leverage embedded expertise]
  
  ## Main Content
  [Organized sections with headers, lists, tables]
  
  ## Limitations & Notes
  [Transparent about data source limitations if relevant]
  
  ## Recommendations/Next Steps
  [Actionable guidance based on available information]

Best practices for content:

  • Use general domain knowledge appropriately when external data is unavailable
  • Clearly distinguish between verified facts and general guidance
  • Include actionable frameworks rather than specific unverified data
  • Add placeholder notes where specific data would enhance the document:
> **Note**: Specific [metric/data point] would typically be sourced from 
> [expected source]. The guidance below reflects established best practices.

Step 3: Sanitize Unicode Characters (Pre-PDF Conversion)

Critical: PDF generation via pandoc typically uses LaTeX, which has limited Unicode support. Create a sanitized version:

Option A: Manual write_file (Recommended for control)

write_file
path: /tmp/document_source_sanitized.md
content: |
  [Same content as Step 2, but with these replacements:]

Character replacement table:

Character Issue Safe Replacement
— (em dash) May not render
자주 묻는 질문

내용이 출처와 대조되나요?

대체 방법을 쓸 때는 대조하지 않습니다. 내장 지식에 의존하므로 AI가 이를 밝혀야 합니다.

반복 실패는 어떤 경우로 보나요?

파일 읽기, 웹 검색, 코드 실행 도구에서 반복되는 오류를 가리킵니다.

어떤 형식이 만들어지나요?

가이드는 같은 원본에서 만든 .docx, .pdf, .html 파일을 다룹니다.

상세 정보

작성자의 원본 설명

Unified document generation with tool failure detection, domain knowledge fallback, progressive conversion, and Unicode safety

repo: HKUDS/AgentPilot

인기도

GitHub 스타
7.8k
순위
#12863
라이선스
MIT
업데이트
2026. 11. 1.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬