Sponsored byOutsenseAI that finds your next clients
SponsorGROUOutbound, LinkedIn content and leads for B2B teamsSponsorOutsenseAI that finds your next clientsAd+Your tool hereSeen by people installing AI tools@Weekly picksThe best new tools, one email a week

document-gen-resilient-workflow

Skill by HKUDS

Resilient Document Generation Workflow is an agent skill that guides an assistant through creating DOCX and PDF files when tool errors occur. It is for users whose document tasks fail in run_shell or LaTeX conversion.

  • Score 89
  • 8.1k stars
  • MIT
  • Updated
Works withClaude CodeClaude apps Antigravity CLI

Install document-gen-resilient-workflow

Built from the published package, never by AI.

git clone --depth 1 https://github.com/HKUDS/AgentPilot /tmp/AgentPilot && mkdir -p ~/.claude/skills && cp -r /tmp/AgentPilot/openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced ~/.claude/skills/document-gen-resilient-workflow

Run in your terminal. Claude Code loads skills from ~/.claude/skills automatically.

Step-by-step: install document-gen-resilient-workflow in Claude Code

Skills can run scripts on your machine. Some need an API key: check the README.

About

Resilient Document Generation Workflow is an agent skill that guides an assistant through creating DOCX and PDF documents from Markdown. It splits the work into steps with explicit error capture, checks that pandoc and LaTeX engines are available, and tries several PDF engines in order. When a conversion fails, it falls back to Python libraries such as fpdf2 and python-docx.

The skill also covers Unicode sanitization for PDF output, with a replacement table and a reusable shell script. It includes an error diagnosis guide for 'unknown error' results, missing LaTeX engines, encoding problems, and workspace or permission issues. It is aimed at users whose assistant runs document tasks through run_shell and hits these failures.

Written from the project's SKILL.md and checked against it.

What it can do

  • Pre-flight checksVerifies the working directory, pandoc, LaTeX engines and Python libraries before conversion.
  • Progressive PDF conversionTries pandoc with several PDF engines in order, logging errors to a file at each step.
  • Python library fallbackGenerates PDF with fpdf2 and DOCX with python-docx when pandoc methods fail.
  • Unicode sanitizationReplaces em dashes, curly quotes, arrows and symbols that break LaTeX PDF output.
  • Output verificationChecks that DOCX and PDF files exist and are readable, including page counts.
  • Error diagnosis guideLists steps for 'unknown error', missing LaTeX, encoding errors and garbled PDFs.

What you need

  • pandoc
  • LaTeX engines such as pdflatex or xelatex, or wkhtmltopdf
  • Python 3 with fpdf2 and python-docx for the fallback

Try asking

  • Create a DOCX and PDF report from this Markdown, using the resilient workflow.
  • My pandoc PDF failed with an unknown error. Walk me through the diagnosis steps.
  • Sanitize this Markdown for LaTeX PDF output and replace the special characters.

Good to know

  • Unicode sanitization is only needed for PDF conversion through LaTeX engines.
  • DOCX and HTML are said to handle Unicode natively.
  • Relies on run_shell, write_file and execute_code_sandbox tools in the assistant environment.

Security check

B
  • Makes downloaded files executableIn openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced/SKILL.md: chmod +x sanitize_for_pdf.sh && ./sanitize_for_pdf.sh /tmp/document_source.md /tmp/

Checked automatically: openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced/SKILL.md, openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced/sanitize_for_pdf.sh. This looks for known risky patterns and is not a full audit. How grades work

Inside the skill

  • .skill_id53 B
  • SKILL.md13 KB
  • sanitize_for_pdf.sh1 KB

Alternatives to document-gen-resilient-workflow

All alternatives →

Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr

document-gen-resilient-workflow: common questions

When should I use this document generation skill?

The source says to use it when run_shell returns 'unknown error', PDF generation fails with LaTeX or engine errors, or shell_agent has failed several times on similar tasks.

Does it need LaTeX to make PDFs?

The main PDF method uses pandoc with LaTeX engines, but the source also lists wkhtmltopdf and a Python fpdf2 fallback that does not need pandoc.

How does it handle special characters in PDFs?

It provides a table and a sanitization script that replace characters such as em dashes, curly quotes and arrows with LaTeX-safe versions.

How do I install document-gen-resilient-workflow?

Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.

Is document-gen-resilient-workflow free?

The code is published under the MIT licence. The service it connects to may have its own pricing.

Is document-gen-resilient-workflow safe to use?

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade B (makes downloaded files executable). Review the code before you install. How grades work.

What are alternatives to document-gen-resilient-workflow?

Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.

document-gen-resilient-workflow Install

Add to stack

Loading.