document-gen-unicode-safe
Skill by HKUDS
Provides a Unicode-safe workflow for generating Word, PDF and HTML documents from Markdown with pandoc. It is for assistants that need a fallback when shell_agent fails on special characters or multi-format output.
Install document-gen-unicode-safe
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-c5d426 ~/.claude/skills/document-gen-unicode-safeRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
Step-by-step: install document-gen-unicode-safe 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-c5d426 ~/.gemini/antigravity-cli/skills/document-gen-unicode-safeAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Step-by-step: install document-gen-unicode-safe in Antigravity CLI
Skills can run scripts on your machine. Some need an API key: check the README.
About
This skill gives an AI assistant a step-by-step workflow for creating documents in several formats. The assistant writes the content as Markdown, creates a sanitized copy that replaces characters LaTeX may not render, and then runs pandoc to produce DOCX, PDF and HTML files. A final step lists the output files to verify they exist.
It also explains when to try a quick path that delegates directly to shell_agent and when to switch to the manual workflow. The manual workflow is recommended for documents with special symbols or non-ASCII text, multiple output formats, or earlier shell_agent failures. The skill is aimed at users who generate documents with an AI assistant and need more control over each conversion step.
Written from the project's SKILL.md and checked against it.
What it can do
- Quick path via shell_agentDelegates simple ASCII documents to shell_agent with a short task for one format.
- Manual Markdown workflowSplits document creation into write_file, sanitization, run_shell conversion and verification steps.
- Unicode sanitization tableLists problematic characters such as em dashes, curly quotes and arrows with safe replacements.
- Sanitization scriptProvides an optional sanitize_for_pdf.sh shell script that replaces listed characters with sed.
- pandoc format conversionShows pandoc commands to convert Markdown to DOCX, PDF and HTML.
- Output verificationUses ls -lh to check that the generated files exist and report their sizes.
- Troubleshooting guideCovers PDF encoding errors, missing LaTeX, DOCX styling and UTF-8 source issues.
What you need
- pandoc
- LaTeX (pdflatex or xelatex) for PDF output
- shell_agent, write_file and run_shell tools
- apt-get or brew for the install commands given
Try asking
- Turn my meeting notes in Markdown into DOCX, PDF and HTML files
- Convert this Markdown with em dashes and curly quotes to a PDF
- Make a simple Word document from these notes and verify the file
Good to know
- PDF generation through pandoc uses LaTeX, which has limited Unicode support.
- Characters such as em dashes and arrows must be replaced before PDF conversion.
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-c5d426/SKILL.md. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
.skill_id60 B -
SKILL.md12 KB
Alternatives to document-gen-unicode-safe
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-unicode-safe: common questions
When should I use the Unicode-safe workflow instead of shell_agent?
The source recommends the manual workflow when a document has special characters or non-ASCII text, when several formats are needed, or when shell_agent has already failed on similar content. Simple ASCII documents in one format can go to shell_agent first.
Why does the workflow create a sanitized copy of the Markdown?
The source says pandoc PDF output uses LaTeX, which has limited Unicode support, so a sanitized copy is used for PDF. The original file is kept for DOCX and HTML, which the source says handle Unicode better.
Which PDF engine does the skill suggest for better Unicode support?
The source suggests using the --pdf-engine=xelatex option for better Unicode support. It also mentions wkhtmltopdf as an alternative PDF engine.
How do I install document-gen-unicode-safe?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is document-gen-unicode-safe free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is document-gen-unicode-safe 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-unicode-safe?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
