pandoc-pdf-error-diagnosis

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

A diagnostic workflow for investigating vague errors when Pandoc, a document conversion tool, fails to create a PDF.

In plain words
What is it for?
Use it to check installed PDF engines, try a specific engine, and capture error details for troubleshooting.
Why use it?
It narrows down whether the problem is Pandoc itself, a missing PDF engine, or the conversion command and its output.

Skill for Claude CodeCodex

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

Good fit Use it to check installed PDF engines, try a specific engine, and capture error details for troubleshooting.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/hkuds/openspace/pandoc-pdf-error-diagnosis
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-diagnosis
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-diagnosis

README.md
[![agentmods](https://agentmods.dev/badge/skills/hkuds/openspace/pandoc-pdf-error-diagnosis/github.svg)](https://agentmods.dev/skills/hkuds/openspace/pandoc-pdf-error-diagnosis)
Your own site
<a href="https://agentmods.dev/skills/hkuds/openspace/pandoc-pdf-error-diagnosis"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/pandoc-pdf-error-diagnosis/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-diagnosis

Your own site · 80×15
<a href="https://agentmods.dev/skills/hkuds/openspace/pandoc-pdf-error-diagnosis"><img src="https://agentmods.dev/badge/skills/hkuds/openspace/pandoc-pdf-error-diagnosis.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 20 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 967 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: 1 finding, 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 80
    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.00020 $0.00967
Opus 5 $0.00010 $0.00483
Sonnet 5 $0.00004 $0.00193
Haiku 4.5 $0.00002 $0.00097

Measured 6d ago against content hash 2a883986cfcd, 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-diagnosis 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.

sudo apt-get install texlive-xetex texlive-fonts-recommended
benchmarks/gdpval/skills/pandoc-pdf-error-diagnosis/SKILL.md · 141 lines

How it starts

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

Pandoc PDF Error Diagnosis Workflow

When pandoc reports an "unknown error" during PDF conversion, follow this systematic diagnostic workflow to identify and resolve the issue.

Step 1: Verify Pandoc Installation

First, confirm pandoc is installed and check its version:

pandoc --version

This verifies pandoc is available and shows which version and features are supported.

Step 2: Check Available PDF Engines

Identify which PDF rendering engines are installed on the system:

which pdflatex xelatex lualatex wkhtmltopdf

Common engines and their characteristics:

  • pdflatex: Fast, widely available, good for simple documents
  • xelatex: Better Unicode/font support, handles modern fonts well
  • lualatex: Advanced Lua scripting, modern TeX features
  • wkhtmltopdf: HTML-to-PDF via WebKit, good for web-styled content

Step 3: Attempt Conversion with Explicit Engine

Try conversion with an explicit engine specification, starting with xelatex (most forgiving):

pandoc input.md -o output.pdf --pdf-engine=xelatex

Important: Capture the full stderr output for diagnosis:

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

Step 4: Analyze Error Output

Examine the captured stderr for common issues:

Error Pattern Likely Cause Solution
xelatex not found Engine not installed Install TeX Live or try different engine
Package xyz not found Missing LaTeX package Install missing package or remove feature
Font xyz not found Missing font Install font or change document fonts
LaTeX Error: File xyz.sty not found Missing style file Install texlive-extra or simplify document

Step 5: Fallback Strategy

If the primary engine fails, try alternatives in order:

# Try pdflatex (most basic)
pandoc input.md -o output.pdf --pdf-engine=pdflatex 2>&1

# Try lualatex (if xelatex failed)
pandoc input.md -o output.pdf --pdf-engine=lualatex 2>&1

# Try wkhtmltopdf (for HTML-heavy content)
pandoc input.md -o output.pdf --pdf-engine=wkhtmltopdf 2>&1

Read the full file on GitHub · 141 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 · 141 lines · 20 tokens per session scan B 2a883986cfcd

Subscribe to this mod's changes

pandoc-pdf-error-diagnosis is a skill published in the GitHub repository HKUDS/OpenSpace (7,552 stars, last pushed 28d ago), licensed MIT. It adds 20 tokens to every session and 967 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