report-to-pdf
What it does
This skill makes a PDF from a static HTML analytics report or dashboard export. It is for people who need a printable or shareable PDF of their findings.
When to use it
- ✓When you need a PDF copy of an existing analytics report.
- ✓When you want a dashboard or chart export saved as a PDF.
- ✓When a stakeholder asks for a file they can print or attach.
Skill link
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/data-analytics/workflows/build-report/report-to-pdf/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“I want a PDF copy of my HTML monthly analytics report that I can attach to an email.”
5 new skills a week. 1 minute to read.
How it works
The agent prints the static HTML to PDF in a headless browser, then checks the PDF. If the source is only an app shell with no report content, it stops and asks for the real export.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Report To PDF
Use this skill only when the user explicitly needs a PDF from an existing Data Analytics report, dashboard, or chart artifact. Prefer a static HTML export or another portable report file as the source.
The expected path is static HTML -> browser headless print-to-PDF -> PDF verification. If only a non-portable source exists, create or retrieve the matching static HTML/export source first.
Workflow
Resolve the static source.
Use an absolute local path to a static HTML report/export or a local URL served from that static export. If the source is a blob stub, sign-in page, redirect page, incomplete viewer, or an app shell that contains boot scripts but not the report content, stop and obtain a static HTML/export source before continuing.
When the user provides a hosted artifact URL, first determine whether it exposes a usable static export or package source. If the static export is unavailable but the validated artifact payload is still available in the current run, create the matching static HTML/export from that payload and preserve source provenance in the handoff. If neither a static export nor the artifact payload is available, stop with a blocker instead of printing the live app shell or rebuilding the report from memory.
When creating or repairing the static source, keep visible metadata reader-facing. Do not copy internal artifact runtime fields, package plumbing, or validator/debug state into the report body, header, footer, or source section. For example, omit raw labels such as snapshot status, package path, widget type, manifest path, renderer IDs, validation status, and local temp paths from the visible PDF. If a runtime detail matters for audit or troubleshooting, preserve it in support notes rather than the visible PDF. Translate data-state caveats into reader language only when they affect interpretation, such as "synthetic demo data" or "partial source coverage."
Generate the PDF with Chrome CLI headless print-to-PDF.
Use the platform-specific Chrome executable available in the environment. Common examples are
/Applications/Google Chrome.app/Contents/MacOS/Google Chromeon macOS andgoogle-chrome,chromium, orchromium-browseron Linux. This is the primary conversion method because it prints the static HTML with a browser rendering engine and usually preserves selectable text, layout, charts, tables, and print CSS.chrome \ --headless=new \ --disable-gpu \ --no-first-run \ --no-default-browser-check \ --no-pdf-header-footer \ --print-to-pdf=/absolute/path/to/report.pdf \ /absolute/path/to/report.htmlIf Chrome is unavailable or cannot produce a valid PDF, use a renderer-backed fallback.
Use the next available local mechanism that renders the same static HTML/export source and prints or saves that rendered page to PDF. Keep the fallback tool-agnostic: the requirement is faithful HTML rendering followed by PDF output, not a specific implementation. Do not replace this with a model-authored PDF layout, manually redrawn charts, or a report reconstructed from memory.
A fallback is acceptable only when:
- the static HTML/export remains the source of truth
- the rendered output preserves the report title, narrative, charts, tables, caveats, and source details
- app-only controls are omitted
- the resulting PDF passes the same verification checks as the primary Chrome path
If no available local renderer can print the static HTML/export faithfully, stop and report the blocker with the missing capability and the source file that could not be converted.
Verify the PDF itself.
Confirm page count and metadata with
pdfinfoor equivalent. Extract text withpdftotextor equivalent when the PDF should contain selectable text. Render representative pages withpdftoppmor equivalent and inspect them for blank charts, clipped content, missing source details, unwanted controls, internal runtime metadata, and layout regressions. For short reports, render every page. Include a negative check for app-only control labels such as share, edit, refresh, publish, toolbar, menu, and drag affordances, plus internal artifact labels such as snapshot status, widget type, manifest path, package path, validation status, and local temp paths.Repair before handoff.
If the output is blank, clipped, missing charts, missing source details, or includes app-only chrome, fix the static
FAQ
What source does it need?
A static HTML report or export is the source, not a live app shell.
Will it rebuild the report from memory?
No. The skill says to stop with a blocker rather than rebuild the report from memory.
Is it used only on request?
Yes. The skill is used only when you explicitly ask to convert a report to PDF.
Details
Original description by the author
Narrow conversion skill. Invoke only when the user explicitly asks to convert an existing Data Analytics report, dashboard, or inline chart export into a PDF artifact.
repo: XiaomiMiMo/MiMo-Code
Popularity
- GitHub stars
- 14k
- Ranking position
- #11313
- License
- MIT
- Updated
- 11/2/2026
Comments
- …
More skills from this repository
effect
14kHelps your agent answer questions about the Effect TypeScript framework by checking its source code and docs instead of relying on memory.
arxiv
14kHelps your agent search, read, cite, and track academic papers on arXiv, including abstracts, BibTeX citations, PDF downloads, and citation links.
claude-code
14kHelps your agent hand a coding task to the Claude Code command line tool, as a one-shot run, an interactive session, or a background job.
codex
14kHelps your agent run the OpenAI Codex command line tool without a chat window, for coding tasks, scripts, and automated pipelines.
Similar skills
feishu-doc
394kHelps your agent read, create, and edit Feishu cloud documents, including text, images, and tables, using the document tool.
feishu-drive
394kLets your agent browse, organize, and comment on files in a Feishu cloud folder that has been shared with the bot.
feishu-perm
394kHelps your agent check and change who can access a Feishu file, choosing the smallest permission that meets your request.