md-document
Skill by alirezarezvani
Converts long-form markdown such as specs, RFCs, reports and plans into a single HTML file. The page includes a sticky table of contents, search, scrollspy and copy buttons for code blocks.
Install md-document
Built from the published package, never by AI.
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills && mkdir -p ~/.claude/skills && cp -r /tmp/claude-skills/markdown-html/skills/md-document ~/.claude/skills/md-documentRun in your terminal. Claude Code loads skills from ~/.claude/skills automatically.
git clone --depth 1 https://github.com/alirezarezvani/claude-skills /tmp/claude-skills && mkdir -p ~/.gemini/antigravity-cli/skills && cp -r /tmp/claude-skills/markdown-html/skills/md-document ~/.gemini/antigravity-cli/skills/md-documentAntigravity CLI loads skills from ~/.gemini/antigravity-cli/skills, or .agents/skills for one project.
Skills can run scripts on your machine. Some need an API key: check the README.
About
md-document converts long-form markdown, such as specs, RFCs, reports, plans and explainers, into one HTML file. The output has a sticky table of contents, a search filter, scrollspy, and copy buttons on code blocks. Prism.js handles code highlighting and Google Fonts supplies the fonts. All CSS and JavaScript are inline.
The skill runs three Python stdlib scripts in sequence. markdown_parser.py turns the markdown into a JSON structure, html_renderer.py renders it using the design-system brand tokens, and interactivity_injector.py adds the JavaScript. It refuses inputs under 100 lines and requires the design system to be set up first. It suits users who want to turn agent-generated or existing markdown documents into standalone pages.
Written from the project's SKILL.md and checked against it.
What it can do
- Markdown to JSON parsingParses markdown into a JSON structure with markdown_parser.py.
- Single-file HTML renderingRenders the structure with design-system brand tokens using html_renderer.py.
- Sticky table of contentsAdds a sticky TOC with an entry for every H2 and deeper heading.
- Search filterAdds a search filter to the rendered page.
- ScrollspyHighlights the current section in the table of contents while scrolling.
- Code copy buttonsAdds copy buttons to fenced code blocks, with Prism.js highlighting.
- Design style optionsSupports editorial, playful and technical design styles that change the layout.
- Callouts and tablesRenders GFM tables and NOTE, TIP, IMPORTANT, WARNING and CAUTION callouts.
What you need
- Python 3
- Design system set up through /cs-design-system
Try asking
- Convert this spec.md into a single HTML page with a sticky TOC
- Turn my RFC markdown file into a searchable HTML document
- Make an HTML version of this project plan with code copy buttons
Good to know
- Refuses input under 100 lines.
- Nested lists are not supported.
- Task list checkboxes render as plain text.
- Footnotes and reference-style links are out of scope.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: markdown-html/skills/md-document/SKILL.md, markdown-html/skills/md-document/scripts/html_renderer.py, markdown-html/skills/md-document/scripts/interactivity_injector.py, markdown-html/skills/md-document/scripts/markdown_parser.py. This looks for known risky patterns and is not a full audit. How grades work
Inside the skill
-
SKILL.md6 KB -
assets/md_document_template.html4 KB -
references/information_density_patterns.md5 KB -
references/single_file_html_discipline.md5 KB -
references/toc_and_nav_ux.md4 KB
Show all 8 files
-
scripts/html_renderer.py21 KB -
scripts/interactivity_injector.py10 KB -
scripts/markdown_parser.py12 KB
Alternatives to md-document
All alternatives →Creates importable JSON templates for the Obsidian Web Clipper. It is for users who want to clip a site, understand the available variables, or format clipped content.
Harness Creator builds, audits, and improves the instruction and state files that help AI coding agents stay reliable across sessions. It is for developers whose agents forget context, drift out of scope, or claim work is done too early.
Guides an assistant through extracting text from scanned PDFs, photographed pages, and images with OCR. Covers backends, language packs, force-OCR, and performance tuning.
Edits a named local file in place to remove AI-writing patterns, using minimal targeted changes and post-edit verification. Built for users who explicitly ask to clean, rewrite, or humanize that specific file.
Polishes, translates, or tightens existing academic manuscript prose while preserving facts, terminology, and evidence boundaries. Made for researchers revising drafts, including Chinese-to-English translation and LaTeX layout fixes.
Adds PDF form analysis and filling, table extraction, OCR, validation and batch processing to an AI assistant. Aimed at developers who run complex or high-volume PDF workflows.
Compare with obsidian-clipper-template-creator, harness-creator or xberg-extracting-with-ocr
md-document: common questions
What kind of markdown does md-document convert?
It is designed for long-form documents such as specs, plans, RFCs, reports and explainers. Input with diff blocks routes to md-review and slide decks route to md-slides.
Does the output need an internet connection?
The output is one HTML file with CSS and JavaScript inline. Its only external resources are Google Fonts CSS and the Prism.js CDN.
Where is the HTML file saved?
The output is saved as doc-{slug}.html in the default output directory, with a numeric suffix if the name already exists.
How do I install md-document?
Run the command above to copy the skill into ~/.claude/skills/. Claude Code picks it up automatically.
Is md-document free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is md-document safe to use?
It scores 91 of 100. Grades: maintenance A, licence A, quality A. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to md-document?
Similar skills: obsidian-clipper-template-creator, harness-creator, xberg-extracting-with-ocr, file-edit-in-place.
