md-to-html
Render Markdown thành standalone HTML — Mermaid, Chart.js, styled tables, TOC
How do I install this agent skill?
npx skills add https://github.com/rheinmir/setup --skill md-to-htmlIs this agent skill safe to install?
- Gen Agent Trust Hubpass
The skill is designed to convert Markdown files into styled HTML documents and maintains a log of outputs in a local wiki. The analysis found a low-risk attack surface for indirect prompt injection common to tools processing user-supplied content.
- Socketpass
No alerts
- Snykpass
Risk: LOW · No issues
What does this agent skill do?
Skill: md-to-html
WHAT
Purpose và context
- Purpose: Markdown → self-contained HTML: Mermaid diagrams, Chart.js, styled tables, code highlight, floating TOC.
- Trigger (when to use):
- Render/share
.mdas HTML - Doc has steps, comparisons, numbers to visualize
- Need browser-ready professional output
- Trigger phrases:
/md-to-html,md2html,biến md thành html,render md,xuất html từ md,visualize doc
- Render/share
- Non-goals: không sửa nội dung file
.mdnguồn; không ghi HTML cạnh file.mdnguồn; không phải site tài liệu nhiều trang có thiết kế riêng (đó làdocs-site-macos).
Mental model
file .md → (template đầy đủ ngoài) → HTML standalone (Mermaid · Chart.js · bảng · code highlight · TOC) + output requirements bắt buộc → html/<tên>.html → output report draft.
Input và output contract
| Field | Required? | Ý nghĩa | |
|---|---|---|---|
| In | file .md nguồn | có | nội dung cần render |
| In | Full instructions ~/.gemini/antigravity/skills/md-to-html/SKILL.md | không | template chi tiết bên ngoài; output requirements dưới đây áp dụng bất kể template |
| Out | HTML → html/ dir (e.g. html/tên-file.html) | có | NOT same dir as source .md; self-contained |
| Out | output report llmwiki/wiki/sources/draft/DDMMYY-<ten>.md + index + log | có (trừ khi 0 artefact) | mục Delivery |
Rules và capabilities
- RULE-01 (MUST): Output HTML →
html/dir, NOT same dir as source.md. - RULE-02 (MUST): Output requirements (don't ship a broken page) — the generated HTML must include every item in "Output requirements" below, regardless of the external template.
- Capabilities: đọc file Markdown; ghi file HTML tĩnh + draft wiki. Thư viện render (Mermaid, Chart.js) nhúng trong trang.
Failure boundaries
- Không tìm thấy file
.mdnguồn → blocked, hỏi đường dẫn. - Template ngoài (
~/.gemini/...) không có → vẫn render theo Purpose + Output requirements ở đây (không coi là lỗi). - Trang thiếu một mục trong Output requirements → failed, sửa trước khi giao ("don't ship a broken page").
HOW
Main workflow
| Step | Type | Inputs | Action | Outputs/exit | Failure/next |
|---|---|---|---|---|---|
| W01 | deterministic | đường dẫn .md | Đọc file nguồn (+ Full instructions ngoài nếu có) | nội dung | không có file → blocked |
| W02 | judgment | nội dung | Chọn cách visualize: steps/so sánh → Mermaid, số liệu → Chart.js, bảng styled, code highlight, floating TOC | bản dựng HTML | — |
| W03 | deterministic | HTML | Kiểm đủ Output requirements (danh sách dưới) | checklist đủ | thiếu → sửa, lặp W03 |
| W04 | effect | HTML | Ghi html/<tên-file>.html | file HTML | — |
| W05 | effect | kết quả | Output report draft (mục Delivery) | draft + index + log | 0 artefact → skip |
Chi tiết từng bước (nguồn chân lý cho W01–W05):
Output
HTML → html/ dir (e.g. html/tên-file.html). NOT same dir as source .md.
Output requirements (don't ship a broken page)
The generated HTML must include, regardless of the external template:
<meta charset="utf-8">+<meta name="viewport" content="width=device-width, initial-scale=1">and a real<title>— without viewport the TOC/tables overflow on mobile.:focus-visible{outline:2px solid <accent>;outline-offset:2px}so the floating-TOC links and any buttons show a keyboard focus ring.font-variant-numeric:tabular-numsontable(number columns must not jiggle).@media(prefers-reduced-motion:reduce)to skip Mermaid/Chart entry animation and setscroll-behavior:auto; addhtml{scroll-behavior:smooth}+scroll-margin-topso TOC anchor jumps glide and headings don't hide under any sticky header.- A favicon (inline data-URI is fine) and
alt/<title>on informative diagrams.
Full instructions
~/.gemini/antigravity/skills/md-to-html/SKILL.md
Branches
Không có nhánh phụ trong version này.
Validation và stopping
W03 là checklist tất định (grep được trong HTML: charset, viewport, <title>, :focus-visible, tabular-nums, prefers-reduced-motion, favicon). Chất lượng visualize (chọn Mermaid hay Chart) cần review mắt. Dừng khi file ở html/ qua đủ checklist và report đã ghi.
Examples
- Positive:
/md-to-html llmwiki/wiki/concepts/solid-what-how.md→html/solid-what-how.htmlcó TOC nổi, bảng WHAT/HOW styledtabular-nums, viewport + focus ring + reduced-motion; draftDDMMYY-md-to-html-swh.md+ dòng index/log. - Boundary/failure: bản dựng thiếu
<meta name="viewport">→ W03 fail (TOC/bảng tràn trên mobile) → thêm rồi mới ghi file; không ghi HTML cạnh file.mdnguồn.
Delivery — Output Report
After all main skill tasks complete, write a propose draft to the wiki.
Steps
1. Build the filename:
- Format:
DDMMYY-<ten>.md DDMMYY= today (e.g.,020626for 2 June 2026)<ten>= 2–4 kebab-case words summarising what was done (e.g.,landing-page-coteccons,brand-kit-fintech,ingest-auth-spec)
2. Write llmwiki/wiki/sources/draft/DDMMYY-<ten>.md:
---
type: draft
title: "DDMMYY-<ten>"
status: proposed
tags: [<skill-name>, output-report]
timestamp: YYYY-MM-DD
---
# DDMMYY-<ten>
**Type:** draft
**Status:** proposed
**Tags:** <skill-name>, output-report
**Proposed:** YYYY-MM-DD
## What
<One sentence — what this skill invocation produced or decided>
## Output
<Key artefacts, files created/modified, or decisions made>
## Files
| File | Action |
|------|--------|
| `path/to/file` | created / modified |
## Notes
- Invoked via: `/<skill-name>` skill
## Origin
- **Draft:** `wiki/sources/draft/DDMMYY-<ten>.md`
- **Commit:** _(filled by verify-before-commit)_
- **Date promoted:** _(filled by verify-before-commit)_
3. Update wiki index & log:
llmwiki/wiki/index.md— append one row:| [DDMMYY-<ten>](sources/draft/DDMMYY-<ten>.md) | draft | YYYY-MM-DD |llmwiki/wiki/log.md— append:## YYYY-MM-DD — <skill-name> — <ten>
Skip only when the skill produces zero artefacts and zero decisions (e.g., a pure display mode like
/caveman-stats).
How can the creator link this skill?
Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.
<a href="https://skillzs.dev/skills/rheinmir/setup/md-to-html">View md-to-html on skillZs</a>