md-to-pdf

md-to-pdf is a skill for Codex from kochetkov-ma/claude-brewcode. It costs 34 tokens per session (3,172 once invoked), scanned D, original, MIT.

A document converter that turns Markdown, a plain-text format for structured documents, into PDF files.

In plain words
What is it for?
Use it to generate PDFs from Markdown with the ReportLab or WeasyPrint conversion engines.
Why use it?
It removes the need to reformat Markdown documents manually before sharing or printing them.

Skill for Codex

Written for Codex: agents/openai.yaml present. Also seen: reads ~/.codex paths; mentions Codex.

Good fit Use it to generate PDFs from Markdown with the ReportLab or WeasyPrint conversion engines.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/kochetkov-ma/claude-brewcode/md-to-pdf
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add kochetkov-ma/claude-brewcode --skill md-to-pdf
Clone the repo
git clone --depth 1 https://github.com/kochetkov-ma/claude-brewcode

Made for: Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for md-to-pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/md-to-pdf/github.svg)](https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/md-to-pdf)
Your own site
<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/md-to-pdf"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/md-to-pdf/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for md-to-pdf

Your own site · 80×15
<a href="https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/md-to-pdf"><img src="https://agentmods.dev/badge/skills/kochetkov-ma/claude-brewcode/md-to-pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 34 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 3,172 The whole file, excluding the scripts and references it only reads on demand.
Security scan D 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00034 $0.03172
Opus 5.5 $0.00014 $0.01269
Sonnet 5.5 $0.00007 $0.00634
Haiku 4.5 $0.00003 $0.00317

Measured yesterday against content hash 5aab81539141, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade D, and why

md-to-pdf scanned grade D with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

The scan reads SKILL.md. This mod also ships 6 executable files (scripts/check_deps.sh, scripts/md_to_pdf.py, tests/run.sh, …), listed below but not scanned — reading those needs a real analyzer, not pattern matching.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

TEST_DIR="$(mktemp -d "${TMPDIR:-/tmp}/md-to-pdf-test.XXXXXX")" && chmod 700 "$TEST_DIR" || { echo "---CONVERT_FAILED---"; exit 1; }

Recursive force deletehighDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

trap 'case "${TEST_DIR##*/}" in md-to-pdf-test.??????) rm -rf -- "$TEST_DIR" ;; esac' EXIT
.codex/plugins/brewdoc/skills/md-to-pdf/SKILL.md · 255 lines

How it starts

The opening of the file, as written. The whole thing — 255 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Markdown to PDF

Convert a local Markdown file with scripts/md_to_pdf.py. Check dependencies with scripts/check_deps.sh, choose a bundled style from styles/, and write only to the requested output path. Store project preferences in .codex/md-to-pdf.config.json only after confirmation. Render and inspect the result before reporting completion.

Complete native workflow

Follow every phase below. When a phase delegates work, use Codex collaboration with only task_name and message; treat each "Codex delegation brief" block as role and message content, not executable syntax. Required approval: main presents a concrete, reviewable proposal in chat and waits for an actual user reply before dependent action. Existing authorization for the same scope remains valid; do not ask again. Optional clarification: use request_user_input_async only if exposed, or request_user_input only if available in the current runtime/mode, for optional choices and never approval. Otherwise ask in main chat. Delegated agents return unresolved questions to main. Silence, elapsed time and tool errors are not approval. Resolve <skill-directory>, <plugin-root>, <project-root>, and <arguments> before running commands.

MD to PDF

Converts Markdown to PDF with the reportlab or weasyprint engine.

Prompt contract

<arguments> is one free-form RU/EN prompt; the file path, the --engine <name> flag, the styles/test tokens and the quoted LLM-preprocessing prompt may sit anywhere in it.

  1. Mode: a literal mode token (styles, config, test, help) wins outright; else the most distinct whole-word keyword hits (table below). Empty -> help (documented default, read-only, asks nothing).
  2. Scope: the prompt may be a full sentence, not just tokens. Take md_file from any path-shaped token or a filename explicitly named in prose (e.g. "convert my notes.md to pdf" -> md_file = notes.md, resolved against cwd). Never guess a file and never silently fall through to HELP.
  3. Ask: a sentence that implies CONVERT with no resolvable file -> ONE main-chat user gate for the file path; outcome-changing ambiguity (missing engine deps, no saved engine preference) -> ONE main-chat user gate.

Read the full file on GitHub · 255 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday Changed 5aab81539141
  2. 3d ago Changed 6d1c68e3dc50
  3. 4d ago Changed ff89c376690b
  4. 5d ago Changed fe0223a03563
  5. 10d ago Changed 38a4f77ea177
  6. 11d ago Changed e880964375aa
  7. 12d ago Changed 6388311853c5
  8. 13d ago Changed · +12 lines scan A → D 8a9f3e301c39
  9. 14d ago Changed · -63 lines 190511ef5a46
  10. 21d ago First seen · 306 lines · 34 tokens per session scan A 69db066a7c15

Subscribe to this mod's changes

md-to-pdf is a skill published in the GitHub repository kochetkov-ma/claude-brewcode (38 stars, last pushed today), licensed MIT. It adds 34 tokens to every session and 3,172 once invoked, about $0.0001 per session on Opus 5.5. A static security scan graded it D with 2 findings (asks for root, recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

doc-digest

Turn a long document, PDF, transcript, spreadsheet or log into a compact working digest the conversation can continue from. Use when the user shares or pastes something long (several pages or more) and wants to discuss, analyze, compare or use it over more than one message, or asks to summarize a document so they can…

egorfedorov/claude-context-optimizer · 75 tokens

transcript-to-pdf

Convert a GuideAnts / Code-Executor markdown conversation transcript into a styled, print-ready PDF with a cover page, role-badged turns, full tool-call inputs (heredoc-aware) and highlighted code. Use when the user wants to export, archive, or share a conversation log as a polished PDF document.

Elumenotion/GuideAnts · 71 tokens

data-export

Generates data export/import infrastructure for JSON, CSV, PDF formats with GDPR data portability, share sheet integration, and file import. Use when user wants data export functionality, CSV/JSON/PDF export, GDPR compliance data portability, import from files, or share sheet for data.

rshankras/claude-code-apple-skills · 59 tokens

document-skills

Professional document creation, editing, and analysis for Office formats (docx, pdf, pptx, xlsx). Use when working with Word documents, PDFs, PowerPoint presentations, or Excel spreadsheets.

travisjneuman/.claude · 44 tokens

academic-pdf-to-gfm

Convert academic PDF papers to GitHub-renderable GFM markdown with math equations. TRIGGERS - PDF, GitHub markdown, math.

terrylica/cc-skills · 35 tokens

unlimited-ocr-batch-folder

Batch parse a folder of PDFs and images to markdown with LaTeX, tables, and layout boxes using baidu/Unlimited-OCR locally — with checkpoint/resume, incremental writes, and per-file repetition detection. Use when processing a large folder of scanned documents or research papers, when you need results written…

terrylica/cc-skills · 134 tokens