When to use this skill
Use this when the user asks for a “printable” or wants a document formatted nicely for printing (handouts, letters, notes, one-page briefs). The output is a single self-contained .html file saved under the working folder, then opened in the default browser for print preview.
This workflow is for formatting and presentation, not fine-grained editing. Prefer whole-file rewrites rather than incremental patching.
Seperately, MiChat also allows for utilitarian text printing from the scratchpad. The current workflow is for well-formatted, attractive print documents.
Tools this skill expects
- Documents toolset: to read source text (optional) and to write the final
.html file under workspace_root.
- Open file toolset: to open the generated
.html file in the OS default browser.
If workspace_root is unset or invalid, documents/opening will be unavailable; help the user set the Working folder in Settings → Paths.
Default output convention
By default, write to a subfolder under the working folder:
printables/ (create if missing)
- filename: short, safe, descriptive (e.g.
meeting-notes.html, lesson-outline.html)
- if overwriting would be surprising, version it (e.g.
meeting-notes_v2.html)
Always report the output path to the user.
High-level workflow
- Decide the source
If the user provided text in chat: use it as the source.
If the source is a local document: use documents tools to read enough of it to format correctly.
If it’s Markdown: convert it to HTML in a best-effort way.
- Supported (best-effort): headings, paragraphs, emphasis/strong, ordered/unordered lists, blockquotes, horizontal rules, code blocks/inline code, and simple tables.
- If there are unsupported/ambiguous features, prefer a clean fallback (plain text or simplified structure) rather than complex rendering.
- Confirm the print intent (lightly)
If anything is unclear, ask one short question (e.g. “A4 or US Letter?” or “Serif or sans?”). Otherwise proceed with defaults.
Defaults if the user doesn’t specify:
Paper: A4, portrait
Typeface: system sans
- Generate single-file HTML
Inline CSS in a <style> block.
No external assets by default (no remote fonts, no external images, no scripts).
Body content should be clean, semantic HTML: headings, paragraphs, lists.
Write the file
Use docs_write to write the full HTML file to the chosen path. Prefer docs_write over append/section tools for HTML.
Open for preview
Call open_file on the generated file so the user can print from the browser.
House style (portable, print-first)
Page + typography defaults
- Page: A4 portrait by default.
- Font: system sans stack (portable), 12pt.
- Line height: 1.35.
- Paragraph spacing: ~0.75 line.
- Left aligned.
- No hyphenation.
- Color: default to black text on white background (print-friendly) unless the user asks for color.
- Avoid borders, heavy backgrounds, and decorative effects unless asked.
Tables
- Prefer readable borders and cell padding.
- Allow wrapping in table cells; avoid forcing fixed widths that can overflow the page.
- If a table is too wide, prefer wrapping and slightly smaller font over horizontal scrolling.
Browser/print dialog reality
CSS can suggest page size/margins, but the print dialog is still authoritative. If the user’s printout looks wrong, suggest: correct paper size, scale 100%, and disabling headers/footers if the browser provides those options.
Template (recommended structure)
Produce a full HTML document with:
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
- Inline CSS
- A screen-only wrapper
.page that previews an A4 sheet
- Print styles that remove screen wrapper styling
A good default CSS approach is:
- Use
@page for size/margins (with sensible fallback if the browser ignores it).
- Use
.page to simulate paper on screen (fixed mm dimensions) but do not force that in print.
Tweak requests (natural language)
If the user asks, support small adjustments like:
- “Make it A5” / “Landscape”
- “Tighter margins” / “Roomier margins”
- “Bigger headings” / “Smaller body text”
- “Serif headings only” / “Serif everything”
- “Use this font: …” (best effort; fall back to system fonts if unavailable)
Do not mention web fonts by default. If the user explicitly asks for a specific web font, explain it may depend on internet access and printing environment.
Safety + robustness rules
- Don’t include JavaScript unless the user explicitly asks.
- Keep everything in one file: HTML + CSS inline.
- Avoid relying on fragile print-only CSS features (page counters, running headers) unless requested, and note they can be browser-dependent.
- Prefer rewriting the whole file for revisions. If the user wants edits, read the current file, update, and write a new full version.
Troubleshooting
If open_file fails:
- Confirm the file is under the working folder.
- If it’s blocked by
open_file rules, the allow/block list is configured in toolsets/open_file/config.json. The user may need to allow .html / .htm there.
If printing looks wrong:
- Ask which browser they used.
- Suggest checking paper size (A4 vs Letter), scale (100%), margins, and headers/footers settings in the print dialog.
1---2name: print-documents3description: Create a clean, well-formatted printable single-file HTML document under the working folder and open it for print preview.4---56## When to use this skill78Use this when the user asks for a “printable” or wants a document formatted nicely for printing (handouts, letters, notes, one-page briefs). The output is a single self-contained `.html` file saved under the working folder, then opened in the default browser for print preview.910This workflow is for formatting and presentation, not fine-grained editing. Prefer whole-file rewrites rather than incremental patching.1112Seperately, MiChat also allows for utilitarian text printing from the scratchpad. The current workflow is for well-formatted, attractive print documents.1314## Tools this skill expects1516- **Documents** toolset: to read source text (optional) and to write the final `.html` file under `workspace_root`.17- **Open file** toolset: to open the generated `.html` file in the OS default browser.1819If `workspace_root` is unset or invalid, documents/opening will be unavailable; help the user set the Working folder in Settings → Paths.2021## Default output convention2223By default, write to a subfolder under the working folder:2425- `printables/` (create if missing)26- filename: short, safe, descriptive (e.g. `meeting-notes.html`, `lesson-outline.html`)27- if overwriting would be surprising, version it (e.g. `meeting-notes_v2.html`)2829Always report the output path to the user.3031## High-level workflow32331. **Decide the source**34 3536- If the user provided text in chat: use it as the source.37 38- If the source is a local document: use documents tools to read enough of it to format correctly.39 40- If it’s Markdown: convert it to HTML in a **best-effort** way.41 42 - Supported (best-effort): headings, paragraphs, emphasis/strong, ordered/unordered lists, blockquotes, horizontal rules, code blocks/inline code, and simple tables.43 - If there are unsupported/ambiguous features, prefer a clean fallback (plain text or simplified structure) rather than complex rendering.44452. **Confirm the print intent (lightly)**46 If anything is unclear, ask one short question (e.g. “A4 or US Letter?” or “Serif or sans?”). Otherwise proceed with defaults.4748Defaults if the user doesn’t specify:4950- Paper: **A4**, portrait51 52- Typeface: **system sans**53 54553. **Generate single-file HTML**56 5758- Inline CSS in a `<style>` block.59 60- No external assets by default (no remote fonts, no external images, no scripts).61 62- Body content should be clean, semantic HTML: headings, paragraphs, lists.63 64654. **Write the file**66 Use `docs_write` to write the full HTML file to the chosen path. Prefer `docs_write` over append/section tools for HTML.67 685. **Open for preview**69 Call `open_file` on the generated file so the user can print from the browser.70 7172## House style (portable, print-first)7374### Page + typography defaults7576- Page: **A4 portrait** by default.77- Font: system sans stack (portable), 12pt.78- Line height: 1.35.79- Paragraph spacing: ~0.75 line.80- Left aligned.81- No hyphenation.82- Color: default to **black text on white background** (print-friendly) unless the user asks for color.83- Avoid borders, heavy backgrounds, and decorative effects unless asked.8485### Tables8687- Prefer readable borders and cell padding.88- Allow wrapping in table cells; avoid forcing fixed widths that can overflow the page.89- If a table is too wide, prefer wrapping and slightly smaller font over horizontal scrolling.9091### Browser/print dialog reality9293CSS can suggest page size/margins, but the print dialog is still authoritative. If the user’s printout looks wrong, suggest: correct paper size, scale 100%, and disabling headers/footers if the browser provides those options.9495## Template (recommended structure)9697Produce a full HTML document with:9899- `<meta charset="utf-8">`100- `<meta name="viewport" content="width=device-width, initial-scale=1">`101- Inline CSS102- A screen-only wrapper `.page` that previews an A4 sheet103- Print styles that remove screen wrapper styling104105A good default CSS approach is:106107- Use `@page` for size/margins (with sensible fallback if the browser ignores it).108- Use `.page` to simulate paper on screen (fixed mm dimensions) but do not force that in print.109110## Tweak requests (natural language)111112If the user asks, support small adjustments like:113114- “Make it A5” / “Landscape”115- “Tighter margins” / “Roomier margins”116- “Bigger headings” / “Smaller body text”117- “Serif headings only” / “Serif everything”118- “Use this font: …” (best effort; fall back to system fonts if unavailable)119120Do not mention web fonts by default. If the user explicitly asks for a specific web font, explain it may depend on internet access and printing environment.121122## Safety + robustness rules123124- Don’t include JavaScript unless the user explicitly asks.125- Keep everything in one file: HTML + CSS inline.126- Avoid relying on fragile print-only CSS features (page counters, running headers) unless requested, and note they can be browser-dependent.127- Prefer rewriting the whole file for revisions. If the user wants edits, read the current file, update, and write a new full version.128129## Troubleshooting130131If `open_file` fails:132133- Confirm the file is under the working folder.134- If it’s blocked by `open_file` rules, the allow/block list is configured in `toolsets/open_file/config.json`. The user may need to allow `.html` / `.htm` there.135136If printing looks wrong:137138- Ask which browser they used.139- Suggest checking paper size (A4 vs Letter), scale (100%), margins, and headers/footers settings in the print dialog.