yzsp-studio/mediakit-shared-suite / artifact-preview
artifact-preview
VerifiedRender workspace artifacts (pdf/pptx/docx/xlsx/html/png/jpg/txt/zip) into text + page screenshots + thumbnail + multi-page collages, saved under ./.preview/{hash}/. Use Read on the resulting jpg/png files to visually inspect your own deliverables before delivering them; it catches what a structural checker cannot — text truncation, colour clashes, clipped chart titles, layout drift, blank slides, CJK rendered as boxes. Triggered by: "看看产物长什么样", "视觉自检", "preview pptx", "render artifact", "screenshot pdf", "渲染产物", "我的报告画出来好看吗", "图表是否完整".
| File | Kind | Size |
|---|---|---|
| README.md | markdown | 7.6 KB |
| SKILL.md | skill md | 10.1 KB |
| bin/preview | other | 2.0 KB |
| bin/preview.cmd | script | 482 B |
| lib/__init__.py | script | 1.7 KB |
| lib/_common.py | script | 13.1 KB |
| lib/_types.py | script | 3.5 KB |
| lib/cache.py | script | 3.3 KB |
| lib/cli.py | script | 10.2 KB |
| lib/collage.py | script | 4.6 KB |
| lib/dispatch.py | script | 8.3 KB |
| lib/docx.py | script | 1.1 KB |
| lib/html.py | script | 2.1 KB |
| lib/image.py | script | 1.4 KB |
| lib/manifest.py | script | 2.7 KB |
| lib/pdf.py | script | 2.2 KB |
| lib/pptx.py | script | 2.5 KB |
| lib/render/__init__.py | script | 2.4 KB |
| lib/render/collage.py | script | 10.9 KB |
| lib/render/constants.py | script | 1.4 KB |
| lib/render/docx.py | script | 2.2 KB |
| lib/render/html.py | script | 12.4 KB |
| lib/render/pdf.py | script | 3.4 KB |
| lib/render/pptx.py | script | 5.6 KB |
| lib/render/types.py | script | 1.3 KB |
| lib/render/xlsx.py | script | 2.9 KB |
| lib/text.py | script | 1.4 KB |
| lib/xlsx.py | script | 1.1 KB |
| lib/zip_.py | script | 1.4 KB |
| requirements.txt | manifest | 4.2 KB |
requirements.txt
View on GitHub# artifact-preview hub -- Python + system dependencies
#
# NOTE (Windows): this file is intentionally ASCII-only. pip on a zh-CN
# Windows host decodes requirements files with the ANSI code page (GBK),
# so a single non-ASCII comment makes `pip install -r requirements.txt`
# die with UnicodeDecodeError before it reads any dependency line.
# Keep every comment below plain ASCII.
#
# HOW INSTALLATION WORKS
#
# superskill installs hubs via `wget <url>.zip && unzip -d <dir>`. It does
# NOT run `pip install`. These packages must already be present in the
# rollout VM image, or be installed by hand into a private directory:
#
# pip install --target "$HOME/.artifact-preview-pylibs" <pkg>
# export PYTHONPATH="$HOME/.artifact-preview-pylibs:$PYTHONPATH"
#
# A plain `pip install` fails in the sandbox: the venv site-packages is not
# writable and the user site lacks sys.path precedence.
#
# A missing Python package or system binary never crashes the CLI. The
# affected format degrades to text, `ok` stays true, and the reason lands in
# `result.warnings`.
#
# -- Quick install (development / new VM) ------------------------------
# pip install -r requirements.txt
# apt-get install -y libreoffice chromium-browser # PPTX + HTML screenshots
#
# -- Quick install (Windows / PowerShell) ------------------------------
# python -m pip install --user -r requirements.txt
# winget install --id TheDocumentFoundation.LibreOffice -e # PPTX screenshots
# HTML screenshots reuse the Edge or Chrome that Windows already has; the
# binary is auto-detected under %ProgramFiles% / %LOCALAPPDATA%.
#
# -- Versions verified in the rollout VM (Ubuntu 22.04, Python 3.10) ---
# PyMuPDF 1.28 Pillow 11 python-pptx 1.0 python-docx 1.2
# openpyxl 3.1 LibreOffice 7.4 headless Chromium 135
# ----------------------------------------------------------------------
# -- Python packages ---------------------------------------------------
# Core image manipulation: collage, thumbnail, letterbox.
# Used by: lib/render/collage.py, lib/collage.py, lib/image.py
Pillow>=9.0,<13.0
# PDF text extraction + per-page PNG screenshots (no external binary needed).
# Used by: lib/render/pdf.py (import fitz)
PyMuPDF>=1.22,<2.0
# PPTX text extraction (slide titles + body text).
# Screenshots require LibreOffice -- see system deps below.
# Used by: lib/render/pptx.py (from pptx import Presentation)
python-pptx>=0.6.21,<2.0
# DOCX text + table dump.
# Used by: lib/render/docx.py (import docx)
python-docx>=0.8.11,<2.0
# XLSX cell dump (all sheets).
# Used by: lib/render/xlsx.py (import openpyxl)
openpyxl>=3.1,<4.0
# HTML screenshots are now driven via the system Chromium-family browser CLI
# (no Playwright dependency). The sandbox image cannot install Playwright's
# bundled Chromium because `python -m playwright install` is blocked by the
# sandbox security profile. See `lib/render/html.py` for the verified flag
# set used to drive headless Chromium directly.
# -- System / binary dependencies --------------------------------------
#
# LibreOffice (headless) -> PPTX -> PDF -> PNG rendering pipeline
# Ubuntu/Debian: apt-get install -y libreoffice
# macOS: brew install --cask libreoffice
# Windows: winget install --id TheDocumentFoundation.LibreOffice -e
# Binary checked: PATH lookup plus the standard install locations for the
# platform; --soffice / $ARTIFACT_PREVIEW_SOFFICE override.
# On Windows soffice.com is tried before soffice.exe, because
# the .exe is a launcher that returns before the conversion
# has been written to disk.
# Without it: PPTX collages are skipped; text extraction still works.
#
# Chromium-family browser -> HTML page screenshots
# Ubuntu/Debian: apt-get install -y chromium-browser
# Windows: the preinstalled Microsoft Edge is enough; Chrome and
# Chromium are detected too.
# Binaries checked on PATH: chromium-browser, chromium, google-chrome,
# chrome, msedge; plus the per-platform install locations.
# Without any of them: HTML render returns text-only (no screenshots).
#
# Python >= 3.10 required (dataclasses / type-union syntax from 3.10+ is used
# in lib/render/types.py)
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |