md2html

Convert long-form Markdown into a self-contained HTML page with sidebar TOC and Mermaid diagrams.

414|27|Updated May 14, 2026
One-click install
npx skills add https://github.com/haidang1810/md2html --skill md2html-haidang1810
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: md2html
Source: https://github.com/haidang1810/md2html/tree/main
Command: npx skills add https://github.com/haidang1810/md2html --skill md2html-haidang1810

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

md2html converts long-form Markdown into a single self-contained HTML page with a polished UI: a sidebar table of contents, Mermaid diagrams, step timelines, callouts, and a Claude-orange theme.

Core Features & Use Cases

  • Self-contained HTML output with embedded CSS and a Mermaid CDN
  • Converts long-form docs (plans, specs, system designs, runbooks, incident postmortems, brainstorms, notes) into a single page
  • Multi-language UI labels and portable across Claude Code / Codex / Antigravity

Quick Start

Use /md2html <file.md> to generate an HTML file next to the source.

Frequently Asked Questions about md2html

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

FAQPage Schema
How do I convert long-form Markdown into a self-contained HTML page?

To convert Markdown into a self-contained HTML page, use the /md2html command on your source file to generate a portable HTML output with embedded CSS, a sidebar TOC, and Mermaid diagrams.

Can I render Mermaid diagrams and a sidebar TOC directly inside an HTML file?

Yes, rendering Mermaid diagrams and a sidebar table of contents inside an HTML file is supported by embedding a Mermaid CDN and CSS directly into the output page.

Does the generated HTML file work with Claude Code, Codex, or Antigravity?

Yes, the generated HTML file is fully portable and works with Claude Code, Codex, and Antigravity because all CSS and diagram rendering are embedded directly in the output.

What types of documents are best suited for Markdown to HTML conversion with a TOC?

Documents like plans, specs, system designs, RFCs, runbooks, incident postmortems, brainstorms, and notes are best suited for this conversion, as the sidebar TOC helps navigate long-form content.

How do I generate a portable HTML file from a Markdown document?

You can generate a portable HTML file by running the /md2html command with your target Markdown file, which creates the HTML output next to the source using a calibrated template and component catalog.