/documents:single-html-documentfrom Documents
Builds polished, self-contained single-file HTML documents with all content, CSS, JS, and media inlined. Use for interactive briefings, dashboards, workbooks, or any standalone browser-openable document.
Ships in Documents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Build the website first. Package it second.
Treat single-file HTML as a delivery format, not an authoring format. Keep content, styling, scripts, media, interaction state, and export contracts separate while building the project, then collapse the finished document into one browser-openable file only after the normal website works.
The delivered document is one modern, polished HTML file that contains the full reading or working experience.
.html.references/html-effectiveness-patterns.md before UI code.Inspect local precedents only when the user explicitly points to them. Useful patterns to reuse:
Prefer reusing proven content-build patterns over inventing a new schema from scratch.
file://, test navigation, media, search, downloads, and attachment export. Run scripts/audit-single-html.mjs on the final file.Use these as project heuristics, not hard browser limits:
| Mode | Use when | Packaging rule |
|---|---|---|
| Direct inline | Small to medium deliverable, modest media, no heavy attachments | Inline app JS/CSS and imported assets directly into the final HTML |
| Blob-backed payload | Rich document with larger images, PDFs, spreadsheets, or media downloads | Embed attachment/media payloads as Base64 or gzip+Base64 data records, then materialize Blob URLs lazily in the browser |
| Compressed bootstrap | Large deliverable where raw inline HTML becomes unwieldy | Ship a small HTML bootstrap plus compressed embedded payload that is decompressed on load in a modern browser |
Do not use Web Bundles as the primary plan. They remain experimental and were removed from Chrome's normal implementation path. Do not use MHTML as the primary plan either unless the user explicitly asks for that format.
content/ plus a compile step over fetching raw Markdown at runtime.href="data:..." links sprinkled through templates.public/ assets for anything that must end up inside the final file.file:// usage./assets/... in the final file.Blob URLs and a.download, not with multi-megabyte data: anchors.When starting from scratch in a new project:
npm create vite@latest document-site -- --template react-ts
cd document-site
npm install
npm add gray-matter fast-glob
npm add -D vite-plugin-singlefile
Before the first build, remove the template's favicon link from index.html, as the audit rejects it as a local asset reference. Remove the demo content too, as it contains external links. If the repo already uses another package manager, such as bun, stay with it. The commands translate directly.
Requirements: Node.js 20.19 or later (or 22.12 or later), which the current Vite needs, to run the helper scripts (they are ES modules and need no npm packages) and the Vite build; npm; and a modern browser to check the result.
scripts/make-attachment-manifest.mjs
Turn files or folders into an attachment manifest with MIME type, size, checksum, and Base64 or gzip+Base64 payloads.scripts/audit-single-html.mjs
Inspect a packaged HTML file for leftover local/remote dependencies, unsafe routing assumptions, split-bundle hints, absolute web addresses outside links, and size guidance.scripts/build-block-sample.mjs
Generate a single-file HTML document from a block manifest under scripts/manifests/. The script produces the composed-blocks handbook and walkthrough samples and can be reused for any composition of blocks. When building a document, pass your own output folder as the second argument. Without it, the script writes into this skill's assets/design-samples/, which a plugin update replaces. The script has no Markdown compiler. Supply each text field as HTML in its ...Html form (bodyHtml, answerHtml), as a field named body is dropped without a warning.scripts/feedback-media-runtime.js
Browser-side helper for standalone feedback documents that collect screenshots, pasted images, uploaded audio, recorded voice notes, selected-text annotations, and versioned JSON exports.scripts/extract-feedback-media.mjs
Extract Base64 screenshot and audio attachments from returned feedback workbook JSON files.Script paths in the reference files begin with the same variable as the commands in this file. If the shell does not expand it, put this skill's folder in its place.
Find the shipped design samples in assets/design-samples/.
Architecture and packaging:
Content model and authoring:
icon: "shield-alert"); the build tree-shakes so only used icons land in the output. Catalogue and how to add icons live here.references/patterns/<name>.md; renderers in scripts/patterns/<name>.js.references/blocks/<name>.md, renderer in scripts/blocks/<name>.js, and example in assets/blocks/<name>.example.yml.Design and delivery shape:
html-effectiveness examples. Required for visual, interactive, reviewable, editor-like, or "not boring" deliverables.Verification:
Pages compose out of typed blocks rather than ad-hoc HTML. The block layer keeps presentation in renderers (vanilla JS, packaging-safe) while authors stay in YAML/JSON.
references/blocks/<name>.md (schema and when-to-use), scripts/blocks/<name>.js (renderer), assets/blocks/<name>.example.yml (canonical example).references/blocks/_protocol.md; the catalogue is in references/blocks/_index.md.scripts/blocks/_bootstrap.js; static blocks are rendered at compile time with no JS shipped.custom escape hatch sparingly for one-offs that don't merit a permanent block type.Use these local single-file samples as visual and structural references:
assets/design-samples/institutional-analytics.single.htmlassets/design-samples/record-catalogue.single.htmlassets/design-samples/committee-briefing.single.htmlassets/design-samples/protocol-dossier.single.htmlassets/design-samples/tabbed-workshop.single.htmlassets/design-samples/inspection-gallery.single.htmlassets/design-samples/workshop-report.single.htmlassets/design-samples/composed-blocks-handbook.single.htmlassets/design-samples/composed-blocks-walkthrough.single.htmlRegenerate the composed-blocks samples after editing any block. To write elsewhere, pass an output folder as the second argument:
node "${CLAUDE_SKILL_DIR}/scripts/build-block-sample.mjs" "${CLAUDE_SKILL_DIR}/scripts/manifests/composed-blocks-handbook.mjs"
node "${CLAUDE_SKILL_DIR}/scripts/build-block-sample.mjs" "${CLAUDE_SKILL_DIR}/scripts/manifests/composed-blocks-walkthrough.mjs"
For slide-deck deliverables, prefer the browser slide deck pattern in
references/design-options.md and references/archetype-recipes.md over
repurposing dossier, briefing, or tabbed-workshop layouts. Institutional
styling should be expressed as a theme layer on the deck; it should not change
the artifact into a report. For institution-styled slide decks, default to clean
sans-serif typography and an unruled background; use colour, spacing, captions,
and a textual masthead for institutional identity.
node "${CLAUDE_SKILL_DIR}/scripts/audit-single-html.mjs" dist/document.html --strict
html-effectiveness interaction contract when one was selectedLICENSE (opens in a new tab)LICENSE-lucide (opens in a new tab)README.md (opens in a new tab)assets/blocks/annotated-diff.example.yml (opens in a new tab)assets/blocks/before-after.example.yml (opens in a new tab)assets/blocks/callout.example.yml (opens in a new tab)assets/blocks/concept-map.example.yml (opens in a new tab)assets/blocks/contact-sheet.example.yml (opens in a new tab)assets/blocks/drag-reorder.example.yml (opens in a new tab)assets/blocks/faq.example.yml (opens in a new tab)assets/blocks/flowchart.example.yml (opens in a new tab)assets/blocks/glossary.example.yml (opens in a new tab)assets/blocks/inline-svg.example.yml (opens in a new tab)assets/blocks/live-template.example.yml (opens in a new tab)assets/blocks/mind-map.example.yml (opens in a new tab)assets/blocks/module-map.example.yml (opens in a new tab)assets/blocks/severity-tag.example.yml (opens in a new tab)assets/blocks/side-by-side.example.yml (opens in a new tab)assets/blocks/slider.example.yml (opens in a new tab)assets/blocks/swatches.example.yml (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub shocklab/co-scientist-toolkit --plugin documents4 skills in this plugin
/course-to-pdfBind a static HTML course or documentation site into one textbook-typeset PDF, retypesetting the screen CSS for print. Use whenever someone wants a course, handbook, lesson notes, or docs site as a single printable PDF or book, or asks why an HTML-to-PDF export came out enormous. Triggers include: 'turn the course into a PDF', 'make a single PDF of the lessons', 'can I get this as a book', 'print the whole site', 'the PDF is 300 pages', 'export the docs as PDF'./explainer-videoMake a short narrated explainer video (3Blue1Brown style) on the user's Mac: Manim animates, the tts command (Kokoro, local) narrates, and two checks catch dropped sound and labels sitting on lines before anyone sees it. Use whenever the user wants an idea, derivation, algorithm or result explained as a video or animation: for a course, a talk, a student, or to understand something themselves. Triggers: 'make an explainer video', '3b1b style', 'animate this derivation', 'Manim', 'a video explaining X', 'narrated animation', 'show this as a video', 'explainer on'. No API key needed. Boundaries: a static figure is matplotlib; slides are polished-docs-and-decks; audio alone is text-to-audio; a paper read aloud is paper-to-audio./polished-docs-and-decksBuild polished, themed deliverables: PowerPoint slide decks (.pptx via python-pptx + matplotlib) and typeset PDFs from Markdown (pandoc + xelatex), verified by rendering to images with headless LibreOffice. Use whenever the user wants a slide deck, talk, pitch, or lecture as a .pptx, or a nicely typeset PDF / handout / explainer / report / one-pager from Markdown or notes, or asks to render / preview / proof / check / convert a .pptx or .docx, even if they don't name the tool. Bundles a Unicode-math LaTeX preamble, a python-pptx helper module, a figure-overlap pre-check and the LibreOffice render-to-verify step. Boundaries: an animated HTML deck opened in a browser is a different job; a self-contained HTML document or dashboard is single-html-document. Prefer this over hand-rolling pptx/LaTeX from scratch.Other plugins' skills for the same job