resilient-document-pipeline
Qué hace
Esta skill es un flujo de trabajo de documentos para condiciones difíciles: herramientas que fallan, varios formatos de salida y caracteres especiales. Está pensada para quienes necesitan un documento terminado aunque las consultas no funcionen.
Cuándo usarla
- ✓Cuando leer archivos o buscar en la web sigue devolviendo errores durante un trabajo de documentos.
- ✓Cuando necesito el mismo documento en Word, PDF y HTML a partir de una sola fuente.
- ✓Cuando el documento contiene guiones largos, comillas tipográficas, flechas u otros símbolos.
Link de la skill
https://github.com/HKUDS/AgentPilot/blob/main/openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-merged/SKILL.mdCópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.
Cómo usar
La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.
Mensaje listo para pegar
Para Claude Code, Codex o Cursor: ejecútalo en la carpeta del proyecto y la skill queda instalada.
Descarga el SKILL.md y ponlo en la carpeta de skills de tu agente.
Ejemplo de qué pedirle a la IA
“La búsqueda en la web sigue fallando mientras escribo un informe. Escríbelo con tus propios conocimientos y dame versiones en Word y PDF.”
5 skills nuevas por semana. 1 minuto de lectura.
Cómo funciona
Tras varios fallos de herramientas, la IA escribe el contenido desde sus conocimientos integrados, limpia los caracteres especiales, prueba los métodos de conversión uno tras otro y revisa cada salida.
Contenido técnico (SKILL.md original)
Texto original del autor, en inglés, directo de 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, orexecute_code_sandboxreturn errors - Multiple formats are needed: Generate
.docx,.pdf,.htmlfrom 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:
- Stop attempting to fix the failing tools
- Acknowledge the limitation briefly in your output
- Commit to generating the document with available knowledge
- 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 |
Preguntas frecuentes
¿Se comprueba el contenido frente a fuentes?
No, cuando se usa la alternativa, porque depende de los conocimientos integrados. La IA debe indicarlo.
¿Qué cuenta como fallo de herramienta?
La guía menciona errores repetidos de las herramientas de lectura de archivos, búsqueda en la web o ejecución de código.
¿Qué formatos se generan?
La guía cubre .docx, .pdf y .html creados a partir de la misma fuente.
Detalles
Descripción original del autor
Unified document generation with tool failure detection, domain knowledge fallback, progressive conversion, and Unicode safety
repo: HKUDS/AgentPilot
Popularidad
- Estrellas en GitHub
- 7,8 mil
- Posición en el ranking
- #12863
- Licencia
- MIT
- Actualizada
- 1/11/2026
Comentarios
- …
Más skills de este repositorio
agentpilot
7,8 milAyuda a tu agente a mejorar un proyecto paso a paso, preparando una tarea y ejecutando el bucle de AgentPilot que propone, prueba y puntúa cambios.
openspace
7,8 milAyuda a tu agente a configurar OpenSpace, una herramienta que guarda y recupera skills de agentes, y a conectarla a tu app de IA mediante MCP.
rsi-arena
7,8 milAyuda a tu agente a configurar y ejecutar pruebas de referencia de IA conocidas, como AIME y Terminal-Bench, para comparar distintos métodos de mejora.
experiment-guide
7,8 milAyuda a tu agente a planificar experimentos pequeños, leer sus resultados y anotar conclusiones mientras investiga cómo mejorar un programa.
Skills parecidas
feishu-doc
394 milAyuda a tu agente a leer, crear y editar documentos en la nube de Feishu, incluidos texto, imágenes y tablas, usando la herramienta de documentos.
feishu-drive
394 milPermite que tu agente explore, organice y comente archivos de una carpeta de la nube de Feishu que se haya compartido con el bot.
feishu-perm
394 milAyuda a tu agente a revisar y cambiar quién puede acceder a un archivo de Feishu, eligiendo el permiso más pequeño que cumpla tu petición.