/eml-toolkit:thread-to-pdffrom eml-toolkit
Render an email thread to a single paginated PDF with correct bidirectional text — Hebrew and Arabic messages come out right-to-left, English ones left-to-right, in the same document. Use for archiving correspondence, sending a chain to a lawyer or regulator, or producing a readable record from loose .eml files. Triggers on "PDF of this email chain", "print this thread", "make a PDF of these emails", "RTL email PDF", "Hebrew email to PDF".
Ships in eml-toolkit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
cd ${CLAUDE_PLUGIN_ROOT} && source .venv/bin/activate
PYTHONPATH=scripts python3 -m eml_toolkit.cli pdf <source> --out chain.pdf
<source> is anything parse-thread accepts, or a thread.json it produced.
| Flag | Use |
|---|---|
--thread N | Pick a thread when the source held more than one (default 0, the largest) |
--title "…" | Override the cover heading |
--keep-quotes | Render quoted history at full weight instead of demoting it |
--redact | Apply default redaction rules before rendering — see redact-thread |
--keep a,b | Literals never to redact (your own address, a reference number) |
Use ... cli html <source> --out chain.html to inspect the intermediate markup
when a render looks wrong. That is the fastest way to see what direction each
block was assigned.
Do not try to fix an RTL problem by editing scripts/eml_toolkit/templates/thread.css.
WeasyPrint does not implement unicode-bidi: plaintext, so direction cannot be
resolved in CSS at all; it is decided per block in scripts/eml_toolkit/bidi.py
and written as an explicit dir attribute before WeasyPrint sees the document.
Full reasoning in docs/bidi-constraint.md — read it before touching direction
behaviour.
There is no separate "RTL mode", deliberately. Real threads are mixed: a Hebrew body with an English signature, or an English reply quoting Hebrew. A per-thread RTL switch gets exactly those cases wrong, so each block is resolved on its own.
pdftotext reports logical order with embedding marks, so it will show
< מזרחי טפחותservice@…> for a header that is in fact rendering correctly.
It is not a valid oracle for direction. To check visually:
pdftoppm -png -r 100 -f 1 -l 1 chain.pdf /tmp/page && # then read /tmp/page-1.png
Read the PNG. Confirm Hebrew paragraphs are right-aligned, Latin ones are
left-aligned, and Name <address> pairs are intact.
What SKILL.md sets; muted values are Claude Code's defaults
eml-toolkit@danielrosehill is listed by danielrosehill/claude-code-plugins — review the source before installing
npx claudepluginhub danielrosehill/claude-code-plugins --plugin eml-toolkit6 skills in this plugin
/bundle-evidenceBuild a numbered exhibit bundle from an email export — cover page, index, continuous pagination, and a SHA-256 of every source .eml — for a complaint, a regulator, an insurer or a lawyer. Triggers on "make an evidence bundle", "exhibit bundle from these emails", "prepare these emails for a complaint"./extract-attachmentsPull every attachment out of an .eml export to disk with a hash-deduped JSON manifest. Use when you need the files themselves rather than a rendering of the correspondence. Triggers on "get the attachments out of these emails", "extract email attachments", "what was attached to this thread"./parse-threadParse .eml files, a directory of them, or an .mbox into normalised thread JSON — headers, participants, bodies, attachment manifest, and reconstructed reply chains. Use this first; every other eml-toolkit skill consumes its output. Triggers on "parse these emails", "what's in this .eml", "reconstruct this email thread", "read this mbox".Other plugins' skills for the same job