pandoc-pdf-error-recovery

pandoc-pdf-error-recovery is a skill for Claude Code, Codex from HKUDS/OpenSpace. It costs 22 tokens per session (862 once invoked), scanned B, original, MIT.

A recovery workflow for diagnosing unclear errors when Pandoc, a document conversion tool, cannot create a PDF.

In plain words
What is it for?
Use it to verify Pandoc, inspect engines such as XeLaTeX or wkhtmltopdf, and retry PDF conversion with an explicit engine.
Why use it?
It checks the installation and available PDF engines, then provides alternative conversion attempts to locate the failure.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to verify Pandoc, inspect engines such as XeLaTeX or wkhtmltopdf, and retry PDF conversion with an explicit engine.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/pandoc-pdf-error-recovery
About the project

OpenSpace is a skill-management layer for AI agents that stores, retrieves, evaluates, shares, and improves reusable workflows. It is intended for people using multiple coding agents who want skills to be reused and refined based on task outcomes. The catalogue provides 200 skills for use with OpenSpace and the agents it supports.

HKUDS/OpenSpace · 7,552 stars · on GitHub

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add HKUDS/OpenSpace --skill pandoc-pdf-error-recovery
Clone the repo
git clone --depth 1 https://github.com/HKUDS/OpenSpace

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pandoc-pdf-error-recovery

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/pandoc-pdf-error-recovery/github.svg)](https://agentmods.dev/skills/hkuds/openspace/pandoc-pdf-error-recovery)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/pandoc-pdf-error-recovery"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/pandoc-pdf-error-recovery/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for pandoc-pdf-error-recovery

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/pandoc-pdf-error-recovery"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/pandoc-pdf-error-recovery.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 22 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 862 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. A grade says what 26 rules found in the file — not that it is safe. Third-party audits
  • NVIDIA SkillSpector warn 7 Sept 2026
SkillSpector: 4 findings, up to medium

These are SkillSpector’s own severities. On a checked sample its high-severity flags on skills were ~96% false positives — a documented command, a public API, a “never do X” rule — so we show them as a caution to read, not a verdict. Why →

  • medium Privilege Escalation · line 24
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 89
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 86
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
  • medium Privilege Escalation · line 92
    Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
    Fix: Avoid sudo/root unless strictly required. Prefer least-privilege patterns. If elevation is needed, document the justification and scope.
How audits are shown
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00022 $0.00862
Opus 5 $0.00011 $0.00431
Sonnet 5 $0.00004 $0.00172
Haiku 4.5 $0.00002 $0.00086

Measured 6d ago against content hash 7b12b385843b, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade B, and why

pandoc-pdf-error-recovery scanned grade B with 1 finding against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 6d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

- Linux: `sudo apt-get install pandoc` or `sudo yum install pandoc`
benchmarks/gdpval/skills/pandoc-pdf-error-recovery/SKILL.md · 119 lines

How it starts

The opening of the file, as written. The whole thing — 119 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Pandoc PDF Error Recovery

Overview

When pandoc fails to convert documents to PDF with an "unknown error" or similar vague message, follow this systematic diagnostic and recovery workflow.

Step-by-Step Procedure

1. Verify Pandoc Installation

First confirm pandoc is installed and accessible:

pandoc --version

If this fails, install pandoc before proceeding:

2. Check Available PDF Engines

Identify which PDF rendering engines are available on the system:

which pdflatex xelatex lualatex wkhtmltopdf context

Common engines and their typical use cases:

  • pdflatex: Standard LaTeX, fast but limited Unicode support
  • xelatex: Full Unicode support, recommended for most modern documents
  • lualatex: Lua scripting support, good for complex layouts
  • wkhtmltopdf: HTML/CSS rendering, good for web-style documents
  • context: ConTeXt typesetting system

3. Attempt Conversion with Explicit Engine

Try conversion with xelatex first (most versatile for general documents):

pandoc input.md -o output.pdf --pdf-engine=xelatex 2>&1 | tee conversion.log

The 2>&1 | tee pattern captures both stdout and stderr to a log file for analysis.

4. Analyze Error Output

If conversion fails, examine the captured log:

cat conversion.log

Common error patterns and solutions:

  • Missing LaTeX packages: Install with tlmgr install <package> or system package manager
  • Font issues: Specify fonts with -V mainfont="Font Name"
  • Missing engine: Fall back to available engine (go to Step 5)

5. Try Alternative Engines

Systematically try other available engines:

# Fallback to pdflatex
pandoc input.md -o output.pdf --pdf-engine=pdflatex 2>&1 | tee conversion-pdflatex.log

# Or try wkhtmltopdf for HTML-rich content
pandoc input.md -o output.pdf --pdf-engine=wkhtmltopdf 2>&1 | tee conversion-wkhtmltopdf.log

# Or try lualatex for complex documents
pandoc input.md -o output.pdf --pdf-engine=lualatex 2>&1 | tee conversion-lualatex.log

Read the full file on GitHub · 119 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 6d ago First seen · 119 lines · 22 tokens per session scan B 7b12b385843b

Subscribe to this mod's changes

pandoc-pdf-error-recovery is a skill published in the GitHub repository HKUDS/OpenSpace (7,552 stars, last pushed 28d ago), licensed MIT. It adds 22 tokens to every session and 862 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 1 finding (asks for root). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

sk-create-diff

Local, Git-free before/after review of an edited document (text, Markdown, HTML, DOCX, text PDF) as a self-contained HTML report.

MichelKerkmeester/skilled-agent-harness_spec-driven-loops · 37 tokens

latex-rescue

Diagnose and fix LaTeX compilation errors. Handles undefined control sequences, missing brackets, math mode violations, package conflicts, undefined references, and environment mismatches.

Calix-L/awesome-latex-skills · 37 tokens

overleaf-compile

Recompile an Overleaf project and extract its build logs, errors and warnings in a standardized format. Use when asked to compile/recompile an Overleaf paper, debug why a PDF build fails, see what's broken after pushing changes, or pull LaTeX/biber errors and warnings out of an Overleaf project. Drives an…

mrshu/agent-skills · 83 tokens

tikz

Audit and fix TikZ visual collisions in any .tex file. Use when labels overlap arrows, text sits on boxes, or arrows cross each other. Applies mathematical gap calculations and Bézier depth formulas — no eyeballing.

franklee16/academic-research-skills · 47 tokens

latex-compilation-fix

Auto-diagnose and fix common LaTeX compilation errors for the PKU thesis template including missing packages, font issues, citation undefined, overfull hboxes, and float placement. Use when xelatex fails or produces warnings.

newtontech/PKU_PhD_Latex_Templete · 53 tokens

foundry-hosted-agent-validation

Step-by-step process for validating a Python Foundry hosted agent sample (under python/samples/04-hosting/foundry-hosted-agents/) end to end — running it locally (native runtime and azd ai agent run) and after deploying it to an Azure AI Foundry project with azd. Use this when asked to validate a hosted agent sample.

microsoft/agent-framework · 82 tokens