Skip to content
Back to skills

Md2pdf

ASecurity

Convert a Markdown file to PDF with GitHub-style formatting using the md2pdf tool.

  • 427 stars
  • 0 votes
  • 0 copies
  • 6 views
  • Added September 6, 2026
ai-agentsbashgit

Security analysis

A100/100

Scanned September 6, 2026

npx -y skills add joshukraine/dotfiles --skill md2pdf --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Md2pdf?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Md2pdf
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/joshukraine-md2pdf/badge)](https://www.skillsdirectory.com/skills/joshukraine-md2pdf)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: md2pdf
description: Convert a Markdown file to PDF with GitHub-style formatting using the md2pdf tool.
argument-hint: "[file.md]"
---

# 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

1. **Determine input files**:
   - If `$ARGUMENTS` are provided, use them as the file paths
   - If no arguments are provided, ask the user which files to convert

2. **Run the conversion**: Execute `md2pdf` with the specified files

3. **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

```bash
# 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
```

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.