Md Document skill for Claude

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.

Md Document SKILL.md

The full skill file from alirezarezvani/claude-skills (MIT).

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

SymptomAction
markdown-html-orchestrator routes input as DOCUMENTInvoke this skill
User runs /cs-md-document <path>.md directlyInvoke 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 linesRefuse (Shihipar threshold — markdown still wins)
Design-system not onboardedRefuse, 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

  1. Refuses input < 100 lines. Markdown wins below the threshold (Shihipar).
  2. Refuses without onboarding. config_loader.setup_completed() must return True. Otherwise surface /cs-design-system.
  3. Single-file output. All CSS + JS inline. Only externals are fonts.googleapis.com and cdn.jsdelivr.net (Prism). Anything else is a regression.
  4. Customization must change behavior. design_style=editorial produces 720px-wide layout with 1.75 line-height; playful rounds the callouts and adds shadow; technical is dense with 0.875rem code. Smoke-tested.
  5. WCAG-compliant tokens. Inherits the design-system's WCAG AA palette — body text ≥ 4.5:1 contrast, links iteratively walked to 4.5:1.
  6. 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)

  1. What's the document for — skim, decide, or deep-read? Recommended: name it; density follows. Canon: Shihipar; Tufte Envisioning Information.
  2. 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).
  3. 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.
  4. Code theme — light, dark, or auto? Recommended: auto (follows OS prefers-color-scheme). Canon: WCAG 2.2 §1.4.3.
  5. 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 converter splits on --- boundaries into slides. This one renders one continuous document.
  • marketing/landing/ — that generates landing pages from scratch (no markdown input). This converts existing markdown.

Output artifact

{default_output_dir}/doc-{slug}.html (path resolved by orchestrator's output_path_resolver.py; collision suffix -2, -3, … by default).

References

  • Shihipar — Claude Code HTML output (Medium, 2026)
  • Tufte — Envisioning Information (1990), ch. 2 "Micro/Macro Readings"
  • NN/g — Table of Contents Best Practices (2023)
  • WCAG 2.2 — §1.4.3 contrast, §2.4.5 multiple ways
  • Wattenberger — Why React isn't great for actually building websites
  • See references/ for full citations

More in this skill

Load these only when the task needs them.

How to install Md Document

Claude Code

Copy the skill into your personal skills folder (or into .claude/skills/ inside a project):

npx degit alirezarezvani/claude-skills/markdown-html/skills/md-document#main ~/.claude/skills/md-document

Codex

npx degit alirezarezvani/claude-skills/markdown-html/skills/md-document#main ~/.codex/skills/md-document

Claude.ai and Claude Desktop

Download the skill folder from GitHub, zip it, and upload it under Settings → Capabilities → Skills.

Frequently asked questions

+What does the Md Document skill do?

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.

+How do I install Md Document in Claude Code?

Copy the skill folder into ~/.claude/skills/md-document, for example with "npx degit alirezarezvani/claude-skills/markdown-html/skills/md-document#main ~/.claude/skills/md-document". Claude Code loads it automatically and uses it when a task matches.

+Does Md Document work with ChatGPT or Codex?

Yes. Md Document uses the open SKILL.md format. In Codex, put the folder in ~/.codex/skills/md-document. In Claude.ai, zip the folder and upload it under Settings → Capabilities → Skills.

+Is Md Document free?

Md Document is published on GitHub by alirezarezvani under the MIT license, which allows free use.

Related design & frontend skills

  1. Design

    Comprehensive design skill: brand identity, design tokens, UI styling, logo generation (55 styles, Gemini, Atlas Cloud, MuAPI, or UberLLM…

    nextlevelbuilder/ui-ux-pro-max-skill★ 151k
  2. Frontend Design

    Official

    Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one.

    anthropics/skills★ 197k
  3. Ui Ux Pro Max

    UI/UX design intelligence for web, mobile, and desktop. This skill should be used when designing, building, reviewing, or fixing…

    nextlevelbuilder/ui-ux-pro-max-skill★ 151k
  4. Observability Designer

    Use when adding metrics, logs and traces to a service, fixing noisy alerts or designing dashboards.

    alirezarezvani/claude-skills★ 30k
  5. Readme Polish

    Use when an existing README must be upgraded, audited, or made scannable: polish/美化/升级/优化/打磨 README, add badges, mermaid, callouts, or…

    alirezarezvani/claude-skills★ 30k
  6. Saas Scaffolder

    Use when starting a new SaaS app with auth, database, Stripe billing and a dashboard (Next.js App Router, TypeScript, Tailwind, shadcn/ui,…

    alirezarezvani/claude-skills★ 30k
  7. Senior Frontend

    Build and review React, Next.js, TypeScript or Tailwind frontends: components, scaffolding, performance and bundle size.

    alirezarezvani/claude-skills★ 30k
  8. Ui Design System

    Use when building a design system: tokens, component docs, responsive scales or developer handoff.

    alirezarezvani/claude-skills★ 30k
  9. Ux Researcher Designer

    UX research: personas, journey maps, usability test plans, synthesis. Use whenever the user asks who their users are or why they struggle.

    alirezarezvani/claude-skills★ 30k

See all design & frontend skills →

More skills from alirezarezvani

  1. Md Review

    Use when converting a markdown code review with diff blocks and severity callouts into a two-column HTML review.

    alirezarezvani/claude-skills★ 30k
  2. Md Slides

    Turn a markdown file into a single-file HTML slide deck with keyboard navigation, presenter notes and print-to-PDF.

    alirezarezvani/claude-skills★ 30k
  3. Mdr 745 Specialist

    Use for EU MDR 2017/745 work: device classification under Annex VIII, technical file gaps (Annex II/III), clinical evaluation, PMS and PSUR…

    alirezarezvani/claude-skills★ 30k

All skills by alirezarezvani →

Give your whole team an AI agent with skills

Cody runs managed AI agents your team can message in Slack, Teams, WhatsApp and the web, with 50+ business integrations, scheduled tasks and memory. No terminal required.