/lathe:pdffrom lathe
Convert a Markdown file to a PDF with Chrome or Chromium in headless mode. Use when the user asks to turn a Markdown note, report or spec into a PDF and Chrome or Chromium is installed. Lathe's own PDF tools do not render Markdown.
Ships in lathe. 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.
This skill needs Google Chrome or Chromium on the machine, plus Python 3. It does not use a Lathe tool. Lathe's PDF tools merge, split, compress, read and render existing PDFs, but they do not render Markdown.
If Chrome or Chromium is not installed, say so plainly and stop. Name the install step: install Google Chrome from google.com/chrome on macOS, or sudo apt install chromium on Debian and Ubuntu.
Get the input path. If the user gave none, ask which file to convert.
Pick the output path. Put the PDF beside the Markdown file, with the same name and a .pdf extension, unless the user names a folder.
Work in a new temporary folder for the HTML and any images. Never write into the source folder except for the PDF.
Remove YAML frontmatter: delete the block between the first two --- lines when the file starts with one.
Turn Obsidian links into plain text: [[target|label]] becomes label, and [[target]] becomes target.
Render each ```mermaid block to PNG with npx --yes @mermaid-js/mermaid-cli -i <block>.mmd -o <block>.png -b white -w 1200 --scale 2. Replace the block with an <img> tag that points at the PNG. If npx is missing, leave the block as a code block and tell the user.
Convert the Markdown to HTML with the Python markdown package and the tables, fenced_code and toc extensions. Install it in a virtual environment in the temporary folder: python3 -m venv venv && venv/bin/pip install markdown.
Wrap the HTML in a page with a <meta charset="utf-8"> tag and a <style> block for body text, headings, tables and code.
Print the page to PDF with Chrome in headless mode, using absolute paths:
macOS:
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" --headless --disable-gpu \
--print-to-pdf="/absolute/path/out.pdf" "file:///absolute/path/page.html"
Linux, with chromium or google-chrome on the PATH:
chromium --headless --disable-gpu --print-to-pdf="/absolute/path/out.pdf" "file:///absolute/path/page.html"
Check that the PDF exists and is not empty. Report its absolute path and size in KB.
file:// URLs with absolute paths.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
4 skills in this plugin
/getting-startedSet up and check the Lathe MCP bundle (images, PDF, audio and video, OCR, batch runs, metadata removal). Use when the user installs Lathe, asks what Lathe can do, gets a "lathe." error from a tool, sees a "missing" or "approval_unavailable" result, or wants to turn a module on or off./pdf-formsMake a PDF with real fillable fields (text boxes and checkboxes that a reader can tick or type in) from a page layout, for planners, trackers, checklists and order forms. Use when the user needs a PDF that people fill in on screen, not a static printable. Lathe's pdf tools read and split fields but do not create them./web-image-prepPrepare a folder of photos or screenshots for a website or post: remove GPS and camera metadata, resize, and optimize each file in one batch run. Use when the user wants to shrink, convert or clean photos before uploading them, or asks to remove location data from a picture.lathe@seayniclabs is listed by seayniclabs/plugins — review the source before installing
npx claudepluginhub seayniclabs/plugins --plugin lathe