---
name: "pandoc-universal-document-converter"
description: "Convert documents across Markdown, Docx, PDF, HTML, EPUB, and LaTeX seamlessly."
metadata:
  author: "John MacFarlane"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "convert markdown to docx pandoc"
  - "convert html to markdown pandoc"
  - "apply pandoc lua filter"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Pandoc Universal Document Converter

Harnesses Pandoc universal document AST engine to convert between dozens of formats, applying custom Lua filters, citeproc bibliographies, and reference templates.

## When to Invoke
Invoke this skill whenever you need to:
- convert markdown to docx pandoc
- convert html to markdown pandoc
- apply pandoc lua filter

## Execution SOP & Rules
1. Use pandoc input.md -o output.docx --reference-doc=custom-template.docx to preserve corporate styles.
2. Process citations using --citeproc --bibliography=sources.bib --csl=ieee.csl.
3. Strip unnecessary formatting when converting to Markdown using -t gfm-raw_html.
4. Verify table formatting and math block rendering across target output formats.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
