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-multiformat

Skill by HKUDS

Generates Word, PDF and HTML documents from one Markdown source. It checks the environment first and cleans up characters that break PDF output. It is for users whose AI assistant runs shell commands and needs reliable document conversion.

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

Install document-gen-resilient-multiformat

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-618c9b ~/.claude/skills/document-gen-resilient-multiformat

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

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

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

About

This skill guides an AI assistant through generating documents in .docx, .pdf and .html formats. It runs in discrete steps: it checks which tools are installed, writes Markdown source content with write_file, and converts that source with pandoc. For PDF output it uses a sanitized copy of the source, because LaTeX handles Unicode poorly. The DOCX and HTML outputs use the original file.

If a PDF engine fails, the skill tries the next one in order: xelatex, pdflatex, then wkhtmltopdf. It also includes Python fallbacks using fpdf2 or reportlab, and a reusable shell script that replaces problem characters for PDF. The skill is aimed at users who see unclear errors during document generation or need several output formats from one source.

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

What it can do

  • Pre-flight environment checkChecks whether pandoc, a PDF engine and the fpdf2 and reportlab Python libraries are available.
  • Format conversionConverts one Markdown source into .docx, .pdf and .html files using pandoc.
  • PDF Unicode sanitizationReplaces characters such as em dashes, curly quotes and arrows with PDF-safe equivalents.
  • PDF engine fallbackTries xelatex, then pdflatex, then wkhtmltopdf when a PDF conversion fails.
  • Python PDF fallbackGenerates PDFs with fpdf2 or reportlab when pandoc or LaTeX is unavailable.
  • Output verificationLists generated files and checks that the PDF is not empty.
  • Sanitization scriptProvides a reusable sh script, sanitize_for_pdf.sh, that applies the character replacements.

What you need

  • pandoc
  • A PDF engine such as xelatex, pdflatex or wkhtmltopdf, or Python fpdf2 or reportlab
  • Python 3
  • Shell access through run_shell and file writing through write_file

Try asking

  • Create a report in DOCX, PDF and HTML from this Markdown outline.
  • Check whether pandoc and a PDF engine are installed before converting my file.
  • Make a PDF from this text, replacing em dashes and curly quotes first.

Good to know

  • PDF output has limited Unicode support, so PDF source files need sanitizing.
  • fpdf2 has limited Unicode support and may need embedded fonts or sanitized text.
  • The reportlab Markdown example is simplified and does not fully parse HTML.

Security check

A

No download-and-run commands, hidden instructions or signs of sending keys out were found.

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

Inside the skill

  • .skill_id60 B
  • SKILL.md14 KB
  • sanitize_for_pdf.sh1 KB

Alternatives to document-gen-resilient-multiformat

All alternatives →

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

document-gen-resilient-multiformat: common questions

Why does the skill make two versions of the source file?

PDF conversion through LaTeX often fails on characters like curly quotes or arrows. The skill sanitizes a copy for PDF and keeps the original for DOCX and HTML, which handle Unicode better.

What should I do if pandoc is not installed?

The skill says to install pandoc with apt-get or brew, or to use the Python-based PDF generation options. It lists fpdf2 and reportlab as fallbacks.

Which PDF engine does the skill try first?

It recommends xelatex for best Unicode support. If that fails it tries pdflatex, then wkhtmltopdf, and then Python fallbacks.

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

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

Is document-gen-resilient-multiformat free?

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

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

It scores 89 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.

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

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

document-gen-resilient-multiformat Install

Add to stack

Loading.