md-document
What it does
This skill turns long markdown documents such as specs, RFCs and reports into a single HTML page. It is for writers and teams who share long documents and want them easy to navigate.
When to use it
- βWhen you have a long spec, RFC, report or plan in markdown that you want as a web page.
- βWhen readers need a table of contents and search inside a long document.
- βWhen you want code blocks with copy buttons in a shared document.
Skill link
https://github.com/alirezarezvani/claude-skills/blob/main/markdown-html/skills/md-document/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agentβs skills folder.
Example of what to ask your AI
βConvert my product requirements markdown into a single HTML page with a table of contents and search.β
5 new skills a week. 1 minute to read.
How it works
It parses the markdown into structured sections, renders them as HTML using your brand settings and adds interactive features such as search and scrolling highlights.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
md-document β Long-form Markdown to HTML
The general-purpose converter β handles the 90% case Shihipar describes (specs, plans, RFCs, reports, explainers). Three stdlib tools pipeline together:
markdown_parser.py β html_renderer.py β interactivity_injector.py
(md β JSON AST) (AST + tokens β HTML) (HTML + JS behavior)
Output is one .html file with sticky TOC, search filter, scrollspy, code-copy buttons, and the user's 12 derived brand tokens. Externals limited to Google Fonts CSS + Prism.js CDN.
When to invoke
| Symptom | Action |
|---|---|
markdown-html-orchestrator routes input as DOCUMENT |
Invoke this skill |
User runs /cs-md-document <path>.md directly |
Invoke this skill |
| User says "convert this spec/report/RFC/plan to HTML" | Invoke this skill |
Input is a code review (has ```diff blocks) |
Route to md-review instead |
Input is a slide deck (clear --- boundaries) |
Route to md-slides instead |
| Input is < 100 lines | Refuse (Shihipar threshold β markdown still wins) |
| Design-system not onboarded | Refuse, surface /cs-design-system |
Pipeline
# 1. Parse markdown β JSON AST
python3 markdown-html/skills/md-document/scripts/markdown_parser.py \
--input <path>.md --output sections.json
# 2. Render AST + design-system config β single-file HTML
python3 markdown-html/skills/md-document/scripts/html_renderer.py \
--sections sections.json --output document.html
# 3. Inject lightweight JS (search, copycode, smoothscroll, scrollspy)
python3 markdown-html/skills/md-document/scripts/interactivity_injector.py \
--file document.html \
--features search,copycode,smoothscroll,scrollspy
Or all-in-one (sample render):
python3 markdown-html/skills/md-document/scripts/html_renderer.py --sample \
| python3 markdown-html/skills/md-document/scripts/interactivity_injector.py \
--file /dev/stdin --output document.html
What gets rendered
CommonMark subset sufficient for agent-generated artifacts:
- Headings H1-H6 (every H2+ gets an anchor id and TOC entry)
- Paragraphs with inline bold / italic /
code/ links / - Fenced code blocks (
```python) with Prism.js highlighting on demand - GFM tables with per-column alignment
- GFM callouts (
> [!NOTE],> [!TIP],> [!IMPORTANT],> [!WARNING],> [!CAUTION]) - Blockquotes, ordered + unordered lists (single-level), horizontal rules
Out of scope: nested lists, HTML inlines, footnotes, definition lists, task list checkboxes (rendered as plain text), reference-style links.
Hard rules
- Refuses input < 100 lines. Markdown wins below the threshold (Shihipar).
- Refuses without onboarding.
config_loader.setup_completed()must returnTrue. Otherwise surface/cs-design-system. - Single-file output. All CSS + JS inline. Only externals are
fonts.googleapis.comandcdn.jsdelivr.net(Prism). Anything else is a regression. - Customization must change behavior.
design_style=editorialproduces 720px-wide layout with 1.75 line-height;playfulrounds the callouts and adds shadow;technicalis dense with 0.875rem code. Smoke-tested. - WCAG-compliant tokens. Inherits the design-system's WCAG AA palette β body text β₯ 4.5:1 contrast, links iteratively walked to 4.5:1.
- Idempotent injection. Re-injecting interactivity is a no-op (marker check). Re-rendering with a different design_style works cleanly.
Forcing-question library (Matt Pocock grill discipline)
- What's the document for β skim, decide, or deep-read? Recommended: name it; density follows. Canon: Shihipar; Tufte Envisioning Information.
- Sticky-sidebar TOC or collapsible-top? Recommended: sticky-sidebar for > 800 words / 4+ H2s; collapsible-top for shorter mobile-first docs. Canon: NN/g TOC Best Practices (2023).
- All four interactive features, or a subset? Recommended: all four β none of them cost more than ~1 KB. Canon: Wattenberger Why React isn't great for actually building websites.
- Code theme β light, dark, or auto? Recommended: auto (follows OS
prefers-color-scheme). Canon: WCAG 2.2 Β§1.4.3. - Does the document have a clear H1 title? Recommended: yes β H1 becomes the page
<title>and is excluded from the TOC.
Distinct from
md-reviewβ that converter renders diff blocks + severity-tagged margin annotations. This one renders prose + tables + code + callouts.md-slidesβ that c
FAQ
What features does the page have?
It has a sticky table of contents, search filter, scroll highlighting and copy buttons on code.
Does it work for code reviews?
No, markdown with diff blocks is sent to the code review converter instead.
Does it need an internet connection?
It uses only a Google Fonts link and the Prism.js code highlighter from a CDN.
Details
Original description by the author
Use when converting long-form markdown (spec, RFC, report, plan) into a single-file HTML page with sticky TOC, search and code-copy. Parses with markdown_parser.py and renders with html_renderer.py using the design-system brand.
Popularity
- GitHub stars
- 29k
- Ranking position
- #9627
- License
- MIT
- Updated
- 11/2/2026
Comments
- β¦
More skills from this repository
agent-launcher-orchestrator
29kHelps your agent plan, build, test and schedule a Claude managed agent in your own account, step by step, starting from one clear goal.
grade-iterate
29kLets your agent grade a managed AI agent's work against a rubric and improve it in a fixed number of rounds, so it never loops forever.
interview
29kLets your agent interview you about an AI agent idea and turn your answers into a simple build plan before anything is launched.
run-without-you
29kHelps your agent set up a managed AI agent to run on a schedule or when an event happens, with the cron timing checked before launch.
Similar skills
obsidian-vault-maintainer
394kHelps your agent keep an Obsidian-friendly memory vault tidy, with working wiki links, consistent properties, and safe generated sections.
wiki-maintainer
394kHelps your agent maintain an OpenClaw memory wiki with repeatable pages, safe managed blocks, and checks for contradictions or gaps.
obsidian
394kLets your agent read, search, create, and edit Obsidian notes, tasks, links, and properties using the official Obsidian command line.