save-as-pdf
БесплатноБез исполняемых скриптовНе проверенPrint-ready PDF export
от lza6★ 19 звёзд на GitHubОб этом скилле
Save as PDF
Reformat the current HTML design into a paginated, paper-ready PDF. The "Instant" export already gives the user a PDF at the design's native pixel size — this path is for when they want real pages.
Do NOT rasterize the page into a PDF. Never use jsPDF, html2canvas, dom-to-image, or any other canvas/screenshot-to-PDF approach — they produce blurry, non-selectable, oversized output, and do not generate a PDF binary yourself. PDF export is print-based: a print-ready copy is handed to show_pdf_export_dialog and the browser's own print engine renders crisp, selectable, text-based pages. The only supported way to make a copy print-ready is a component that owns its print geometry — the doc_page starter for documents, or a source already built on <deck-stage> or <doc-page>. Do not hand-author @page rules or print CSS resets, and NEVER declare <meta name="omelette-owns-print"> yourself — the starters announce print ownership at runtime, and a hand-authored meta tells the platform to trust print CSS you would then have to hand-write and maintain. Hand-rolled print CSS behind that meta is the legacy path; the doc_page starter replaces it everywhere it is available.
Steps
Read the current HTML design file to understand its structure and content. Re-read it on every PDF request, even if you read it or made a print copy earlier in this conversation — the user may have changed content or tweak values (the Tweaks panel writes into the source file) since then. Note the
[version: v<N>]token in the read result's header — step 2's provenance stamp needs it, and only a version read in THIS request is valid to stamp.Write the print copy, stamped with its provenance. Always write it fresh from the source you just read — an existing
-printcopy from an earlier request is a stale snapshot, and reusing or only partially updating it ships outdated values to the PDF. The print file path is the source path with-printinserted before the extension — same directory, same basename. If the source isslides/deck.html, writeslides/deck-print.html; if the source isweb/index.html, writeweb/index-print.html. Do NOT use the deck title or project name as the filename, and do NOT write to the project root if the source is in a subdirectory — any change in directory depth breaks every relative URL (@font-facesrc: url(...),<img src>,<link href>, CSSbackground: url(...)) and the print tab shows missing images and system-font fallbacks.Stamp the copy's provenance (required whenever the read header shows a version — every arm of this step). Include this tag in the copy's
<head>, carrying the version from step 1's read header and the source's project-relative path (for a read header of[File: designs/report.html] [version: v172]):<meta name="omelette-print-source" content="v172 designs/report.html">show_pdf_export_dialogREFUSES a copy whose stamp is missing or no longer matches the source's current version — that is what makes a stale copy un-exportable. If it refuses with a stale-copy error, go back to step 1 (re-read the source) and rewrite the copy fresh; never just add or edit the stamp on an existing copy. If the read header shows no[version: ...]token, the project isn't versioned — omit the stamp; the export tool skips the freshness check there.If the source is already built on
<deck-stage>or<doc-page>, the copy is the source plus content-level print rules only. Both components own their print geometry — never add an@pagerule or reflow their layout. For<deck-stage>decks, setdata-deck-activeon every direct-child slide (not just the current one) so[data-deck-active]-keyed entrance styles resolve on every page — each slide is already one page. For<doc-page>documents there is nothing structural to do.Otherwise, rebuild the content on the doc_page starter. Call
copy_starter_componentwithkind: "doc_page.js"(once per project — the component file persists), then decide the pagination UP FRONT: a FLOWING document (pour the content into<doc-page margin="0.75in">as one normal HTML flow; the print engine paginates it — the default for reports, memos, letters, long-form), or EXPLICIT pagination (one<section class="page">child per page — when the user asks for a page count or the design implies one: a one-page resume, a two-sided flier, a certificate, a brochure). If in doubt, ask the user. Keep the design's typography, colors, and imagery intact either way. For FLOWING documents the component pins no paper size — the print engine paginates onto the user's real paper. Explicitly paginated pages print at a FIXED page box with overflow hidden — letter by default (set size="a4" for a clearly metric user), the user's chosen paper when they export — and content that misses the box is clipped, never reflowed: design each page to FILL the page box and fit letter and A4
Установить save-as-pdf в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл save-as-pdf?
Print-ready PDF export
Как установить скилл save-as-pdf?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл save-as-pdf запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
docx
Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include…
от AnthropicUse 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…
от Anthropicxlsx
Use this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing…
от Anthropicpptx
Use 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…
от Anthropic