report-to-pdf
Ce qu’il fait
Cette compétence produit un PDF à partir d'un rapport d'analyse HTML statique ou d'un export de tableau de bord. Elle s'adresse aux personnes qui ont besoin d'un PDF imprimable ou partageable de leurs conclusions.
Quand l’utiliser
- ✓Quand vous avez besoin d'une copie PDF d'un rapport d'analyse existant.
- ✓Quand vous voulez enregistrer en PDF un export de tableau de bord ou de graphique.
- ✓Quand un interlocuteur demande un fichier à imprimer ou à joindre.
Lien du skill
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/data-analytics/workflows/build-report/report-to-pdf/SKILL.mdCopiez-le et collez-le dans votre IA (Claude, ChatGPT ou Cursor) en lui demandant de suivre les instructions.
Comment l’utiliser
Le plus simple : copiez le message et collez-le dans votre IA. Elle lit le skill et suit les instructions.
Message prêt à coller
Pour Claude Code, Codex ou Cursor : lancez-la dans le dossier du projet et le skill est installé.
Téléchargez le SKILL.md et placez-le dans le dossier de skills de votre agent.
Exemple de demande à votre IA
“Je veux une copie PDF de mon rapport mensuel d'analyse HTML, que je peux joindre à un e-mail.”
5 nouveaux skills par semaine. 1 minute de lecture.
Comment ça marche
L'agent imprime le HTML statique en PDF dans un navigateur sans interface, puis vérifie le PDF. Si la source n'est qu'une coquille d'application sans contenu de rapport, il s'arrête et demande l'export réel.
Contenu technique (SKILL.md original)
Texte original de l’auteur, en anglais, directement depuis 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
Questions fréquentes
Quelle source faut-il ?
Un rapport ou un export HTML statique est la source, et non une coquille d'application en direct.
Reconstruit-elle le rapport de mémoire ?
Non. La compétence préfère s'arrêter en signalant le blocage plutôt que de reconstruire le rapport de mémoire.
Est-elle utilisée seulement sur demande ?
Oui. La compétence n'est utilisée que lorsque vous demandez explicitement de convertir un rapport en PDF.
Détails
Description originale de l’auteur
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
Popularité
- Étoiles GitHub
- 14k
- Position au classement
- #11313
- Licence
- MIT
- Mis à jour
- 02/11/2026
Commentaires
- …
Autres skills de ce dépôt
effect
14kAide votre agent à répondre aux questions sur le framework TypeScript Effect en vérifiant le code source et la documentation plutôt qu'en s'appuyant sur sa mémoire.
arxiv
14kAide votre agent à chercher, lire, citer et suivre des articles scientifiques sur arXiv : résumés, citations BibTeX, téléchargements PDF et liens de citation.
claude-code
14kAide votre agent à confier une tâche de programmation à l'outil en ligne de commande Claude Code, en exécution unique, en session interactive ou en tâche de fond.
codex
14kAide votre agent à exécuter l'outil en ligne de commande OpenAI Codex sans fenêtre de discussion, pour des tâches de code, des scripts et des pipelines automatisés.
Skills similaires
feishu-doc
394kAide votre agent à lire, créer et modifier des documents cloud Feishu, y compris du texte, des images et des tableaux, grâce à l'outil de document.
feishu-drive
394kPermet à votre agent de parcourir, organiser et commenter des fichiers d'un dossier cloud Feishu partagé avec le bot.
feishu-perm
394kAide votre agent à vérifier et modifier qui peut accéder à un fichier Feishu, en choisissant la plus petite autorisation qui répond à votre demande.