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.
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-multiformatRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install document-gen-resilient-multiformat in Claude Code
git clone --depth 1 https://github.com/HKUDS/AgentPilot /tmp/AgentPilot && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/AgentPilot/openspace/benchmarks/gdpval/skills/document-gen-fallback-enhanced-enhanced-618c9b ~/.gemini/antigravity-cli/skills/document-gen-resilient-multiformatAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install document-gen-resilient-multiformat in Antigravity CLI
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
ANo 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 →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
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.
