Langsung ke konten
Skillpedia
Menulis29k ยท #9627

md-document

Fungsinya

Skill ini mengubah dokumen markdown panjang seperti spesifikasi, RFC, dan laporan menjadi satu halaman HTML. Skill ini untuk penulis dan tim yang membagikan dokumen panjang dan ingin dokumen itu mudah dinavigasi.

Kapan dipakai

  • โœ“Saat Anda punya spesifikasi, RFC, laporan, atau rencana panjang dalam markdown yang ingin dijadikan halaman web.
  • โœ“Saat pembaca memerlukan daftar isi dan pencarian di dalam dokumen panjang.
  • โœ“Saat Anda ingin blok kode dengan tombol salin dalam dokumen bersama.

Link skill

https://github.com/alirezarezvani/claude-skills/blob/main/markdown-html/skills/md-document/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/alirezarezvani/claude-skills/blob/main/markdown-html/skills/md-document/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit โ†’

Contoh permintaan ke AI

โ€œUbah markdown persyaratan produk kami menjadi satu halaman HTML dengan daftar isi dan pencarian.โ€

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Skill mengurai markdown menjadi bagian terstruktur, merendernya sebagai HTML dengan pengaturan merek Anda, dan menambahkan fitur interaktif seperti pencarian dan penyorotan saat scroll.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 / images
  • 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 c
Pertanyaan umum

Fitur apa yang dimiliki halaman?

Daftar isi yang tetap terlihat, filter pencarian, penyorotan saat scroll, dan tombol salin pada kode.

Apakah bekerja untuk tinjauan kode?

Tidak, markdown dengan blok diff dikirim ke konverter tinjauan kode.

Apakah perlu koneksi internet?

Hanya memakai tautan Google Fonts dan pustaka penyorot kode Prism.js dari CDN.

Detail

Deskripsi asli dari pembuat

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.

repo: alirezarezvani/claude-skills

Popularitas

Bintang GitHub
29k
Peringkat
#9627
Lisensi
MIT
Diperbarui
2/11/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • โ€ฆ

Skill lain dari repositori ini

Skill serupa