report-to-pdf
Skill này làm gì
Skill này tạo PDF từ một báo cáo phân tích HTML tĩnh hoặc bản xuất bảng điều khiển. Skill dành cho người cần một bản PDF có thể in hoặc chia sẻ kết quả của mình.
Khi nào nên dùng
- ✓Khi bạn cần một bản PDF của một báo cáo phân tích có sẵn.
- ✓Khi bạn muốn bảng điều khiển hoặc bản xuất biểu đồ được lưu thành PDF.
- ✓Khi một bên liên quan yêu cầu một tệp để in hoặc đính kèm.
Liên kết skill
https://github.com/XiaomiMiMo/MiMo-Code/blob/main/packages/cli/src/skill/builtin/.bundle/data-analytics/workflows/build-report/report-to-pdf/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi muốn một bản PDF của báo cáo phân tích HTML hằng tháng để đính kèm vào email.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent in HTML tĩnh thành PDF trong trình duyệt không giao diện (headless), rồi kiểm tra PDF. Nếu nguồn chỉ là khung ứng dụng không có nội dung báo cáo, agent dừng lại và yêu cầu bản xuất thật.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Nguồn cần là gì?
Một báo cáo hoặc bản xuất HTML tĩnh, không phải khung ứng dụng đang chạy trực tiếp.
Nó có dựng lại báo cáo từ trí nhớ không?
Không. Skill nói dừng lại với một lý do chặn thay vì dựng lại báo cáo từ trí nhớ.
Có dùng skill này thường xuyên không?
Không. Skill chỉ được dùng khi bạn yêu cầu rõ ràng chuyển báo cáo thành PDF.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 14k
- Vị trí xếp hạng
- #11313
- Giấy phép
- MIT
- Cập nhật
- 2/11/2026
Bình luận
- …
Thêm skill từ kho mã này
effect
14kGiúp agent của bạn trả lời câu hỏi về framework TypeScript Effect bằng cách kiểm tra mã nguồn và tài liệu, thay vì dựa vào trí nhớ.
arxiv
14kGiúp agent của bạn tìm, đọc, trích dẫn và theo dõi các bài báo học thuật trên arXiv, gồm tóm tắt, trích dẫn BibTeX, tải PDF và liên kết trích dẫn.
claude-code
14kGiúp agent của bạn giao một tác vụ lập trình cho công cụ dòng lệnh Claude Code, dưới dạng chạy một lần, phiên tương tác hoặc tác vụ nền.
codex
14kGiúp agent của bạn chạy công cụ dòng lệnh OpenAI Codex mà không cần cửa sổ chat, cho tác vụ lập trình, tập lệnh và quy trình tự động.
Skill tương tự
feishu-doc
394kGiúp agent của bạn đọc, tạo và sửa tài liệu đám mây Feishu, gồm văn bản, hình ảnh và bảng, bằng công cụ tài liệu.
feishu-drive
394kCho phép agent của bạn duyệt, sắp xếp và bình luận các file trong một thư mục đám mây Feishu đã được chia sẻ với bot.
feishu-perm
394kGiúp agent của bạn kiểm tra và thay đổi ai có quyền truy cập một file Feishu, chọn quyền nhỏ nhất đáp ứng yêu cầu của bạn.