agentleFS
liorhai5liorhai5/ai-skills/skills/md2html/SKILL.md

md2html

Skill0 starsChanged 2 months agoMITView on GitHub

Convert a local markdown file to self-contained HTML for rich-text copy-paste into Google Docs. Use when the user asks to "turn this markdown into a Google Doc", "paste this md into Docs", or "convert md to html for pasting".

  • Installs packages

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. haidang1810/md2html★ 421same name
    2. DawnMoon1542/agents-skills★ 8same name
    3. polites-co-jp/claude-skills★ 0same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository6 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    No fonts are downloaded, embedded or installed.

    line 28
  2. Very specific:

    Use the Markdown as written: no special note labels, status vocabulary or HTML classes are required.

    line 37
  3. Distinctive:

    Do not re-theme or re-layout diagrams for the style.

    line 40
  4. Distinctive:

    Use ordinary rich paste (⌘V).

    line 43
  5. Distinctive:

    Every capability is served by whatever tool exists on the user's machine (first match wins).

    line 57
  6. Very specific:

    If the markdown engine itself is missing (exit ≠ 0), relay the printed candidates.

    line 76
  7. Very specific:

    Engine fidelity varies: if the document uses task lists or footnotes and pandoc is absent, tell the user the output may lose those …

    line 78
  8. Very specific:

    Keep the .svg source for later edits.

    line 83

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

md2html

Convert the markdown file given in $ARGUMENTS to HTML and open it in the browser. The user then selects-all (⌘A), copies (⌘C), and pastes (⌘V) into Google Docs.

Run

The skill is a single dependency-free script (Node ≥ 18, no install step, nothing bundled). Determine this SKILL.md's own directory as {baseDir}, then run:

node "{baseDir}/md2html.mjs" "$ARGUMENTS"

Flags: --no-open (convert only), --no-render (skip diagram/SVG rendering), --mermaid-cmd "<cmd {in} {out}>" (custom mermaid renderer, argv with placeholders).

Default document style

The reference style uses locally installed Wix Madefor Display (including the corporate App faces), with Madefor Text then Arial/sans-serif fallback. No fonts are downloaded, embedded or installed; the HTML's typography can differ on a machine without Madefor.

Body, lists, blockquotes and table cells use 12pt text with 1.15 line spacing. A leading H1 is a 26pt title. H1–H4 use 18/14/12/12pt, distinguished by regular, underlined, bold and bold-italic styles. Tables have light grids, pale headers and 16pt vertical/9pt horizontal cell padding, with no extra cell-paragraph margins. Section separators leave space without divider lines.

Use the Markdown as written: no special note labels, status vocabulary or HTML classes are required. Quotes are neutral; existing status text/icons and diagram colors/settings are preserved. Existing ✓/⚠/✕ symbols use green/amber/red; code stays literal. Do not re-theme or re-layout diagrams for the style. Temporary renders are removed after embedding; there is no persistent diagram cache.

Use ordinary rich paste (⌘V). Check font, spacing, tables and images in the pasted document when exact appearance matters; HTML appearance does not prove Docs paste fidelity or linkage to its named styles. The skill supplies its own house style.

Select-all/copy automatically prepares rich HTML with 755px-wide tables and the same cap for large images, matching the accepted pageless reference. Smaller images retain their natural size. This width does not automatically follow a different target's page margins or a viewer's pageless text-width setting. Copy includes explicit text styles and excludes CSS-hidden content, without an extra button or step. Partial selections use normal browser copying; unavailable copy handling falls back to it.

How it works — env tools, never bundled libraries

Every capability is served by whatever tool exists on the user's machine (first match wins); when a tool is missing, md2html says exactly what to install:

CapabilityTools tried in orderIf none found
markdown → HTML (required)pandoc · markdown-it (npx cache) · python3 markdown moduleno output, exit ≠ 0, install suggestions printed
mermaid fence → PNG (optional)--mermaid-cmd · mmdc · npx-cached mmdcfence stays a code block + hint
local .svg → PNG (optional)rsvg-convert · inkscape · cairosvg · magick/convertSVG inlined as-is (Docs may not show it) + hint
  • Local images are inlined as base64 data URIs; rendered diagrams use PNG for Docs paste.
  • Remote images (https://…) pass through unchanged and may be fetched by the browser when viewed. Conversion and font resolution add no network requests.
  • PlantUML/graphviz fences stay code blocks.
  • macOS only for the auto-open step (open); elsewhere, open the printed .html path manually.

Agent duties

  1. Read stderr after every run. Degradation flags and install hints land there (exit code stays 0 when HTML was produced). Surface them to the user and offer the install as a question — never install anything silently.
  2. If the markdown engine itself is missing (exit ≠ 0), relay the printed candidates; pandoc is the recommended one (full GFM: tables, task lists, footnotes).
  3. Engine fidelity varies: if the document uses task lists or footnotes and pandoc is absent, tell the user the output may lose those constructs and recommend brew install pandoc.
  4. For UI mockups, author an .svg next to the markdown and reference it as an image (![](./mockup.svg)) — md2html rasterizes and inlines it in one pass. Keep the .svg source for later edits. Flow/architecture diagrams go in ```mermaid fences, rendered the same way (headless Chrome via mmdc — expect a few seconds per diagram).

Updates affect this skill folder. If an agent uses a copied installation, refresh that copy after updating the repository; a linked installation follows its target.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.