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.
npx skills add kochetkov-ma/claude-brewcode --skill md-to-pdfgit clone --depth 1 https://github.com/kochetkov-ma/claude-brewcodeWrote 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.
[](https://agentmods.dev/skills/kochetkov-ma/claude-brewcode/md-to-pdf)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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 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.
- 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). - Scope: the prompt may be a full sentence, not just tokens. Take
md_filefrom 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. - Ask: a sentence that implies CONVERT with no resolvable file -> ONE
main-chat user gatefor the file path; outcome-changing ambiguity (missing engine deps, no saved engine preference) -> ONEmain-chat user gate.
What ships with it
12 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.
- agents/openai.yaml 227 B
- LICENSE 1.1 KB
- README.md 1.6 KB
- scripts/check_deps.sh 2.7 KB runs code
- scripts/md_to_pdf.py 30 KB runs code
- styles/default.css 3.9 KB
- styles/default.json 727 B
- test/test-all-elements.md 8.1 KB
- tests/run.sh 2.1 KB runs code
- tests/suite-image-base.mjs 4.0 KB runs code
- tests/suite-tempfile.mjs 5.8 KB runs code
- tests/suite-test-mode.mjs 3.9 KB runs code
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.
- yesterday Changed 5aab81539141
- 3d ago Changed 6d1c68e3dc50
- 4d ago Changed ff89c376690b
- 5d ago Changed fe0223a03563
- 10d ago Changed 38a4f77ea177
- 11d ago Changed e880964375aa
- 12d ago Changed 6388311853c5
- 13d ago Changed · +12 lines scan A → D 8a9f3e301c39
- 14d ago Changed · -63 lines 190511ef5a46
- 21d ago First seen · 306 lines · 34 tokens per session scan A 69db066a7c15
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.
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…
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.
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.
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.
academic-pdf-to-gfm
Convert academic PDF papers to GitHub-renderable GFM markdown with math equations. TRIGGERS - PDF, GitHub markdown, math.
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…