print-from-html

Convert source files into self-contained print-ready HTML with syntax highlighting and print CSS.

Updated Apr 11, 2026
One-click install
npx skills add https://github.com/gozonerd/shadow-ai-assessment --skill print-from-html-gozonerd
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: print-from-html
Source: https://github.com/gozonerd/shadow-ai-assessment/tree/main/.claude/skills/print-from-html
Command: npx skills add https://github.com/gozonerd/shadow-ai-assessment --skill print-from-html-gozonerd

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @mermaid-js/mermaid-cli.

What problem does it solve? Source files like SQL, Python, YAML, and Markdown do not print well natively, making it hard to produce readable paper copies for reviewers who work offline. This Skill converts any source file into a single self-contained HTML page that opens in a browser and prints cleanly with Ctrl+P. ## Core Features & Use Cases - Format-aware rendering: Detects 16+ file formats (SQL, Python, JS/TS, YAML, JSON, Markdown, CSV, shell, and more) and applies print-safe syntax highlighting, rendered prose, or HTML tables as appropriate. - Print-optimized output: Embeds print CSS with page numbers, document-title headers, page-break rules, line wrapping for long code lines, and a muted color palette that survives black-and-white printing. - Mermaid diagram support: Pre-renders mermaid blocks to inline SVG via the mmdc CLI when available, with a documented CDN fallback for online printing. - Use Case: A developer needs schema.sql and architecture.md printed for a partner who reviews on paper. Invoke the skill on both files to get two styled HTML files in a print-queue folder, ready to open and Ctrl+P. ## Quick Start Ask the AI to make a specific file printable, for example by saying "make schema.sql printable", and it will generate a print-ready HTML file you can open in a browser and print with Ctrl+P.

Frequently Asked Questions about print-from-html

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I print a SQL or code file with clean formatting?

Convert the source file to a print-ready HTML page with monospace text, syntax highlighting, and print CSS, then open it in a browser and press Ctrl+P. This skill handles SQL, Python, JS/TS, YAML, JSON, shell, and several other languages automatically.

How to make a Markdown file printable with rendered formatting?

Render the Markdown to HTML prose with headings, tables, lists, and code blocks, then apply a print stylesheet with page numbers and margins. The output is a single self-contained HTML file that prints cleanly from any browser.

Does the printable HTML require an internet connection?

No, the generated HTML is fully self-contained with all CSS inline and no external dependencies. The only exception is the Mermaid CDN fallback, which is used only when the mmdc CLI is unavailable and the user confirms they will be online at print time.

How are Mermaid diagrams handled when printing Markdown?

Mermaid blocks are pre-rendered to inline SVG using the mmdc CLI from @mermaid-js/mermaid-cli when it is installed, producing offline-capable output. If mmdc is missing, a CDN-loaded mermaid.js fallback is offered after confirming network access at print time.

When should I not use HTML print conversion?

Skip it when the file is already HTML with print CSS, since you can print it directly. It also does not produce PDFs; for PDF output, use the browser's Ctrl+P and Save as PDF option on the generated HTML.

Why do long code lines get cut off when printing, and how is it fixed?

Fixed-width pre blocks clip lines at the page edge. The fix is applying white-space: pre-wrap and word-wrap: break-word in the print stylesheet so long lines wrap at the margin instead of disappearing.