Skill0 starsChanged 5 days agoMITView on GitHub
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.
- Installs packages
We split this skill into the rules it gives an agent
6 rules. 0 are common, 3 are distinctive, and 3 are very specific to this project.
0
Common
Most of the 179 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 13
If Chrome or Chromium is not installed, say so plainly and stop.
- Very specific: line 20
Remove YAML frontmatter: delete the block between the first two --- lines when the file starts with one.
- Distinctive: line 38
Check that the PDF exists and is not empty.
- Very specific: line 42
Use absolute paths in every command.
- Distinctive: line 43
Do not open the PDF after writing it.
- Distinctive: line 44
Never change the Markdown file.
“Common” is measured: kept by at least 6 in 10 of the 179 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Markdown to PDF with Chrome
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.
Steps
- 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
.pdfextension, 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]]becomeslabel, and[[target]]becomestarget. - Render each
```mermaidblock to PNG withnpx --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. Ifnpxis missing, leave the block as a code block and tell the user. - Convert the Markdown to HTML with the Python
markdownpackage and thetables,fenced_codeandtocextensions. 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
chromiumorgoogle-chromeon 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.
Rules
- Use absolute paths in every command. Chrome needs
file://URLs with absolute paths. - Do not open the PDF after writing it. Report the path and let the user open it.
- Never change the Markdown file.
- Mermaid diagrams are always drawn as images. Never leave placeholder text in the PDF.
Other versions192 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 192
- NousResearch/hermes-agent★ 259ksame name
- anthropics/skills★ 186ksame name
- shareAI-lab/learn-claude-code★ 80ksame name
- shareAI-lab/analysis_claude_code★ 78ksame name
- openai/skills★ 27ksame name
- spinabot/brigade★ 11ksame name
- netease-youdao/LobsterAI★ 6.2ksame name
- OpenBMB/PilotDeck★ 4.5ksame name
- nextlevelbuilder/goclaw★ 3.7ksame name
- awslabs/amazon-bedrock-agentcore-samples★ 3.5ksame name
182 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use Video Generation, VLM and 10 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
huang-x-hSkillVideo Generation
Implement AI-powered video generation capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to generate videos from text prompts or images, create video content programmatically, or build applications that produce video outputs. Supports asynchronous task management with status polling and result retrieval.
Also in 6 projects that use this
huang-x-hSkillVLM
Implement vision-based AI chat capabilities using the z-ai-web-dev-sdk. Use this skill when the user needs to analyze images, describe visual content, or create applications that combine image understanding with conversational AI. Supports image URLs and base64 encoded images for multimodal interactions.
Also in 6 projects that use this
dav-niu474Skillgift-evaluator
The PRIMARY tool for Spring Festival gift analysis and social interaction generation. Use this skill when users upload photos of gifts (alcohol, tea, supplements, etc.) to inquire about their value, authenticity, or how to respond socially. Integrates visual perception, market valuation, and HTML card generation.
Also in 5 projects that use this
dav-niu474SkillPodcast Generate
Generate podcast episodes from user-provided content or by searching the web for specified topics. If user uploads a text file/article, creates a dual-host dialogue podcast (or single-host upon request). If no content is provided, searches the web for information about the user-specified topic and generates a podcast. Duration scales with content size (3-20 minutes, ~240 chars/min). Uses z-ai-web-dev-sdk for LLM script generation and TTS audio synthesis. Outputs both a podcast script (Markdown) and a complete audio file (WAV).
Also in 5 projects that use this
OpenAISkillmigrate-to-codex
Migrate supported instruction files, skills, agents, and MCP config into Codex project and global files.
Also in 6 projects that use this
SeifBenayedSkillfile-reading
Use this skill when a file has been uploaded but its content is NOT in your context — only its path at /mnt/user-data/uploads/ is listed in an uploaded_files block. This skill is a router: it tells you which tool to use for each file type (pdf, docx, xlsx, csv, json, images, archives, ebooks) so you read the right amount the right way instead of blindly running cat on a binary. Triggers: any mention of /mnt/user-data/uploads/, an uploaded_files section, a file_path tag, or a user asking about an uploaded file you have not yet read. Do NOT use this skill if the file content is already visible in your context inside a documents block — you already have it.
Also in 5 projects that use this
- +1 more from huang-x-h
- +2 more from dav-niu474
In this repository3 other files it gives its agents.
- getting-startedSkill
- pdf-formsSkill
- web-image-prepSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

