any-to-pdf

any-to-pdf is a skill for Claude Code, Codex from cosmicstack-labs/mercury-agent. It costs 66 tokens per session (1,100 once invoked), scanned A, original, MIT.

A bundled converter that turns Markdown, text, Word files, HTML, tables, code, JSON, YAML, logs, and images into PDF files. A PDF is a fixed-layout document suitable for sharing or printing.

In plain words
What is it for?
Use it to create reports, notes, data tables, or image collections as formatted PDFs, including a table of contents when applicable.
Why use it?
It avoids separate conversion steps when source material comes in different formats and can preserve elements such as tables, code blocks, formulas, and non-Latin text.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it to create reports, notes, data tables, or image collections as formatted PDFs, including a table of contents when applicable.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/cosmicstack-labs/mercury-agent/any-to-pdf
About the project

Mercury Agent is an AI assistant that runs as a background process on a user's machine, remembers information on disk, and uses permission rules to control actions such as file changes and command execution. People use it from a terminal or messaging services including Telegram, Discord, Slack, and Signal for coding, research, scheduling, and other ongoing tasks.

cosmicstack-labs/mercury-agent · 4,080 stars · on GitHub · mercuryagent.sh

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 cosmicstack-labs/mercury-agent --skill any-to-pdf
Clone the repo
git clone --depth 1 https://github.com/cosmicstack-labs/mercury-agent

Made for: Claude Code, 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 any-to-pdf

README.md
[![agentmods](https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent/any-to-pdf/github.svg)](https://agentmods.dev/skills/cosmicstack-labs/mercury-agent/any-to-pdf)
Your own site
<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent/any-to-pdf"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent/any-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 any-to-pdf

Your own site · 80×15
<a href="https://agentmods.dev/skills/cosmicstack-labs/mercury-agent/any-to-pdf"><img src="https://agentmods.dev/badge/skills/cosmicstack-labs/mercury-agent/any-to-pdf.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,100 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 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.00066 $0.01100
Opus 5.5 $0.00026 $0.00440
Sonnet 5.5 $0.00013 $0.00220
Haiku 4.5 $0.00007 $0.00110

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

Security

Grade A, and why

any-to-pdf scanned grade A with 0 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 8d ago.

The scan reads SKILL.md. This mod also ships 2 executable files (scripts/any2pdf.py, scripts/md2pdf.py), 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.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

src/skills/bundled/any-to-pdf/SKILL.md · 62 lines

How it starts

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

Any to PDF

Use this when the owner wants a good-looking PDF: a report, a write-up, notes, a data table or a set of images. For other formats (Word, slides, spreadsheets) use the documents skill.

Run it

The converter is in this skill's scripts/ folder (the folder path is shown with these instructions). Run it with Python 3.8 or newer — python3 on macOS, Linux and Termux, python or py on Windows:

python3 "<skill folder>/scripts/any2pdf.py" report.md -o report.pdf
  • Inputs: Markdown and text; Word (.docx); HTML; CSV/TSV (become tables); code, JSON, YAML and logs (become code blocks); images (one page each). With pandoc installed, also ODT, RTF, EPUB, reStructuredText, LaTeX and notebooks. Several inputs make one PDF, in the order given.
  • Output: -o names the PDF; without it, the PDF sits next to the first input. It never overwrites an input.
  • First run: it installs what it needs into Mercury's cache (~/.mercury/cache/any2pdf), never into the system Python. reportlab first (about 20 MB). A Word file adds mammoth, HTML adds markdownify (each under 1 MB). Display formulas ($$ … $$) add matplotlib (about 100 MB) for typeset maths; if that can't be installed, formulas still appear as styled text. Tell the owner when a first run is installing something.

Options

Pass them after the inputs:

Option What it does
--theme NAME Look and colours (below). Default warm-academic.
--title, --subtitle, --author, --date, --version Cover page text (title defaults to the first heading).
--cover false, --toc false Leave out the cover page or the table of contents. Short documents read better without both.
--watermark "DRAFT" Diagonal watermark on every page.
--page-size Letter US Letter instead of A4.
--header-title, --footer-left Running header and footer text.
--frontispiece IMG, --banner IMG Full-page image after the cover; back-cover image.
--disclaimer, --copyright Back-cover text.

Read the full file on GitHub · 62 lines

Files

What ships with it

4 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.

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. 8d ago First seen · 62 lines · 66 tokens per session scan A 5bcda2f77c64

Subscribe to this mod's changes

any-to-pdf is a skill published in the GitHub repository cosmicstack-labs/mercury-agent (4,080 stars, last pushed today), licensed MIT. It adds 66 tokens to every session and 1,100 once invoked, about $0.0003 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-11-22.

Related

any-to-pdf compared with skills from other repositories

any-to-pdf next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
any-to-pdfcosmicstack-labs/mercury-agentSkill4.1ktodayMITA66Claude Code, Codex
ocr-and-documentsmoltis-org/moltisSkill3.0k1mo agoMITA54Claude Code, Codex
nano-pdfmoltis-org/moltisSkill3.0k1mo agoMITA38Claude Code, Codex
nano-pdftaracodlabs/aidenSkill9151mo agoAGPL-3.0A17Claude Code, Codex
apple-notesmoltis-org/moltisSkill3.0k1mo agoMITA23Claude Code, Codex
gogmoltis-org/moltisSkill3.0k1mo agoMITA20Claude Code, Codex
xbergCherryHQ/stellaSkill555d agoAGPL-3.0A38Claude Code, Codex