Md2pdf
Documentsmd2pdfMd2pdf is an Agent Skill for documents published in the joshukraine/dotfiles repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Convert a Markdown file to PDF with GitHub-style formatting using the md2pdf tool.
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/joshukraine/dotfiles/blob/HEAD/claude/.claude/skills/md2pdf/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/md2pdf, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Markdown to PDF
Convert Markdown files to PDF with GitHub-style formatting using the md2pdf tool.
Command Options
$ARGUMENTS: File paths or glob patterns to convert (e.g.,docs/guide.md,docs/*.md)-o FILE: Custom output path (only valid with a single input file)
Your task
-
Determine input files:
- If
$ARGUMENTSare provided, use them as the file paths - If no arguments are provided, ask the user which files to convert
- If
-
Run the conversion: Execute
md2pdfwith the specified files -
Report results: Confirm which PDFs were generated
Tool Details
The md2pdf tool uses pandoc + weasyprint with GitHub-style CSS. The CSS and script live in dotfiles (~/dotfiles/bin/.local/bin/). The MD2PDF_CSS environment variable can override the default CSS path.
Example Usage
# Convert a single file
/md2pdf docs/guide.md
# Convert multiple files with a glob
/md2pdf docs/qa-handoffs/qa-guide-*.md
# Convert with a custom output name
/md2pdf -o custom-name.pdf docs/guide.md