docx-render
БесплатноБез исполняемых скриптовНе проверенUse when an EXISTING .docx, .doc, .pptx or .xlsx has to become a PDF or PNG — 'convert docx to pdf', 'docx to pdf', 'render this Word doc', 'word to pdf'…
от edwinhu★ 28 звёзд на GitHubОб этом скилле
Announce: "I'm using docx-render to convert this document to PDF via doc_render."
DOCX → PDF/PNG rendering
What this skill carries — grep references/ for any subject the names below miss:
!d=${CLAUDE_SKILL_DIR}; command -v skill-toc >/dev/null 2>&1 && exec skill-toc "$d"; s=$HOME/.claude/skills/plugin-utils/bin/skill-toc; [ -x "$s" ] && exec "$s" "$d"; echo "(skill-toc unavailable: references and scripts are NOT listed here — install the plugin-utils plugin, or start a new session so its bin/ reaches PATH)"
Office docs → PDF/PNG go through the shared converter ${CLAUDE_PLUGIN_ROOT}/scripts/doc_render.py
(convert()), which picks the best engine and applies the right fixes. Do not
hand-roll soffice/libreoffice or lean on the generic docx skill's own
export — those skip the Word-fidelity path and the x2t kerning/table fixes.
Default to --renderer word (Iron Law)
For any PDF a human will read — a deliverable, an email attachment, a reading-list
file, anything you hand to the user — pass --renderer word. The bare/auto
command is NOT the safe default: auto deliberately EXCLUDES Word (the check is
if avail["word"] and allow_word, and allow_word defaults False) and silently
uses x2t/LibreOffice, which reflow the layout (real case: a 5-page doc shipped
as 7). Word works even from a background/headless job via cmux dispatch (below), so
there is no reason to skip it for a deliverable.
Reserve bare auto for parallel pipeline builds (e.g. many law-review renders
at once) where headless/parallel-safety matters more than line-exact fidelity and
the docs are pipeline-generated (x2t/soffice already grid-faithful there).
On Linux, --renderer word cannot work — it drives Word.app through
AppleEvents. Use --renderer word-remote instead: the same real Word engine
in a Windows guest, driven over SSH. See "Word in a Windows guest" below.
Always verify the engine actually used via the PDF Producer before handing off
(see table below) — auto can fall back, and --renderer word only raises if
Word is truly unavailable.
A legacy .doc goes STRAIGHT to Word — never convert it first
Both Word engines open .doc natively, and WORD_SRC_SUFFIXES admits it:
python3 scripts/doc_render.py IN.doc OUT.pdf --renderer word-remote
Never soffice --convert-to docx a .doc and render the result. That hop
silently corrupts the document, and because the damage is in the intermediate it
survives into a genuine Word render, so the Producer string still says Word and
the output still looks authoritative. Measured on a 23-page expert report:
- every footnote gained a stray superscript
?— soffice writes the real<w:footnoteRef/>and then a literal<w:t>?</w:t>run beside it, where the legacy footnote mark was; - the page count grew by one (23 → 24), so pagination no longer matched what the sender saw.
Rendering the .doc itself reproduced the sender's 23 pages with clean footnote
numbers. If a ? opens every footnote, suspect the conversion, not the sender.
A wrong extension fails silently. Word dispatches on the suffix, so a .doc
staged under a .docx name makes it bail: the guest's scheduled task completes,
writes no PDF, and the only symptom is guest render did not complete. The
transport carries the real suffix through — keep it that way.
Entry point
# CLI (faithful Word engine — DEFAULT for anything a human reads):
python3 ${CLAUDE_SKILL_DIR}/../../scripts/doc_render.py IN.docx OUT.pdf --renderer word
# auto engine (LibreOffice/x2t; NO Word) — ONLY for parallel pipeline builds:
python3 ${CLAUDE_SKILL_DIR}/../../scripts/doc_render.py IN.docx OUT.pdf
import sys; sys.path.insert(0, "<plugin>/scripts")
from doc_render import convert
convert("in.docx", "out.pdf", renderer="word", allow_word=True) # gold standard
convert("in.docx", "out.pdf") # auto (headless)
Agents without the Skill tool (most workflow subagents): run the CLI above
directly — you don't need to invoke this skill, just call doc_render.py.
Which engine, and why it matters
| Engine | Fidelity | Notes |
|---|---|---|
Word (--renderer word) |
gold standard | native layout; only engine that keeps an auto-wrapping table as a grid in a hand-authored docx (LibreOffice collapses it to a stacked column). Recomputes Word fields (REF/NOTEREF/PAGEREF/TOC). macOS only — it drives Word.app over AppleEvents. |
word-remote (--renderer word-remote) |
gold standard | the same real Word engine, in a QEMU Windows guest over SSH. The Word path on Linux, where --renderer word cannot work at all. Also usable from macOS against a guest on that host. |
| x2t | good | OOXML-native; correct per-section footnote restart; doc_render injects GPOS/kern + EB-Garamond so it matches. |
| LibreOffice | good except | wrong for per-secti |
Установить docx-render в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл docx-render?
Use when an EXISTING .docx, .doc, .pptx or .xlsx has to become a PDF or PNG — 'convert docx to pdf', 'docx to pdf', 'render this Word doc', 'word to pdf', 'export docx as pdf', 'make a pdf of this docx', 'pdf from the docx', 'render the document to PDF', 'the PDF has the wrong page count', 'why did the layout reflow'. Use proactively before handing any Word document to a human as a PDF, and INSTEAD OF hand-rolling soffice/libreoffice, even when no one says 'render'. NEGATIVE ROUTING: NOT for editing docx content (use the generic 'docx' skill), NOT for building a docx from markdown (use 'law-review-docx' for Bluebook footnotes or 'law-econ-docx' for author-date), NOT for building one from a Typst source (use 'docx-typst'), NOT for a damaged docx (use 'docx-repair'), NOT for inspecting or diffing individual slides (use 'pptx-render').
Как установить скилл docx-render?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл docx-render запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or…
от Anthropic