技能圖譜SKILLSGROVE
技能圖譜/辦公文件/drtranquanghung91-vn/grand-rounds/html-deck-building

html-deck-building

安裝

$npx skills add https://github.com/drtranquanghung91-vn/grand-rounds --skill html-deck-building
$git clone --depth 1 https://github.com/drtranquanghung91-vn/grand-rounds.git /tmp/grand-rounds && mkdir -p ~/.claude/skills && cp -r /tmp/grand-rounds/skills/html-deck-building ~/.claude/skills/html-deck-building
請幫我安裝這個 Agent Skill:https://github.com/drtranquanghung91-vn/grand-rounds/tree/91df8f3c6cf86b4d593dc64266272343fdf60290/skills/html-deck-building ,先閱讀它的 SKILL.md 和指令碼,確認安全後再安裝到我的技能目錄。

簡介

原文描述 · MITUse when building or editing a medical presentation as an HTML deck (single offline file, motion graphics, presenter laser/pen tools), after the plan is approved and claims and figures exist, or when an HTML deck renders with overflow, stutters, or needs a template applied.
以下 SKILL.md 內容轉載自 drtranquanghung91-vn/grand-rounds(提交 91df8f3),依據 MIT 許可證轉載正文(文字未改動;僅省略檔案頭後設資料、將圖片顯示為連結,超長內容會截斷);版權歸 2026 Trần Quang Hưng 所有。許可證:LICENSE。僅展示說明檔案,附帶指令碼請在原倉庫檢視。

HTML deck building

Before you start

This skill is stage 6 of grand-rounds:medical-deck. Work only inside a talk folder whose STATUS.md marks the Plan as done, approved and which has evidence/claims.json. If either is missing, stop and call the Skill tool with grand-rounds:medical-deck instead: it runs the interview, the plan and the evidence first. This holds for a new deck from a one-line request too.

Overview

Start from assets/deck-engine.html: a 1920 × 1080 stage that scales to any screen. It has fragments, speaker notes, a cross-fade between slides, presenter tools (laser, circle, pen, undo, erase), keyboard and clicker control, and a window.deck API for the render checker. You write slides and theme. You do not rewrite the engine.

Procedure

  1. Write the slides in <talk>/build/slides.html, deck-specific CSS (theme variables first) in deck.css, and chart code in deck.js. Then assemble the source from the engine, so engine fixes reach every deck:

    python scripts/compose_deck.py --slides <talk>/build/slides.html --css <talk>/build/deck.css \
      --js <talk>/build/deck.js --title "<talk> · <presenter>" --lang vi --cite "<footer citation>" \
      -o <talk>/build/index.src.html
    
  2. Theme. Start deck.css with a :root{…} block holding the theme/theme.json values (it overrides the engine defaults). If there is a template, rebuild its chrome (header band, footer, logo, title layout) in CSS from the measured geometry. Keep the logo as a file and reference it; the build inlines it.

  3. Slides. One <section class="slide" data-name="…"> per row of plan.md, in order:

    • the plan's assertion as the title (h2.t, or the template's title element);
    • the visual from figures/ via <!--include: ../figures/s05-km.svg--> or <img>;
    • only numbers from claims.json, written as in the source and formatted for the deck's language (0,58 in Vietnamese, 0.58 in English);
    • <aside class="notes"> with what the presenter says, including cues such as "[click] 24-month landmark". Cues never go on the slide.
    • a per-slide data-cite="…" when the slide's source differs from the deck's.
  4. Motion. Use the engine's classes: .a-in with style="--d:.3s" for staged entry; .draw with pathLength="1" for connectors; .pop for arrowheads; data-frag="n" for click-revealed overlays; data-scene="n" for a mechanism stepped by clicks. A looping motion graphic (a mechanism that plays like a video) carries its own CSS loop and data-poster. For large figures, use the .km wipe structure. Follow medical-figures → motion.md: transforms and opacity only.

  5. Build one offline file:

    python scripts/build_deck.py <talk>/build/index.src.html <talk>/out/<name>.html
    
  6. Check with a real browser:

    python scripts/check_render.py <talk>/out/<name>.html --out <talk>/build/render --smooth <slide with the main animation>
    

    It needs Playwright for Python (pip install playwright). It uses an installed Edge or Chrome, so playwright install is needed only on a machine with neither. If you cannot install it, open the deck in a browser tool and screenshot every slide instead, and say in the delivery report that the automatic check did not run. Never skip the check silently.

    Fix every off-stage and clipped-or-overflowing finding by cutting words, splitting the slide, or re-laying out. Never fix overflow by shrinking text below 18 px (body 24 px). Then open contact.html and look at every slide yourself. The script cannot see collisions, bad wrapping (a number split from its unit) or a figure that is too small.

  7. Hand render/dom.html to the slop audit. It contains text that JavaScript adds at run time, which the source file does not show.

Type and layout floor (1920 × 1080)

Element Minimum
Title 48 px (template may set larger)
Body text 24 px
Figure labels, tables 18 px
Footer / source credit 16 px
Margins 80 px left/right

Common mistakes

Mistake Fix
A presenter hint in the footer ("▸ click for HR by period") Speaker notes only
Content vanishes before the slide fades out Engine handles it; don't remove .play yourself
Animating a big SVG with setAttribute in requestAnimationFrame Wipe reveal with transforms
Fonts from a CDN Inline them (@font-face with a local file, inlined at build) or use the template's system fonts
Same title + three-cards layout on every slide Pick visuals per deck-planning → visual-grammar.md
檢視許可證全文(MIT)
MIT License

Copyright (c) 2026 Trần Quang Hưng

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
檢視 NOTICE 宣告
# Third-party material

The MIT licence in `LICENSE` covers this repository's code and text. These files are under
their own licences:

| Files | Source | Licence |
|-------|--------|---------|
| `examples/fictional-trial/figures/icons/t-lymphocyte.svg`, `cancerous-cell-1.svg` and the copies inlined in `figures/s02-checkpoint.svg`, `out/nova1-journal-club.html`, `skills/medical-figures/examples/checkpoint-blockade.html` and `assets/screenshots/mechanism.*` | Servier Medical Art via Bioicons (https://bioicons.com) | [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/) |
| `examples/fictional-trial/figures/icons/immuneglobuline_igG_blue.svg` and its inlined copies (same files as above) | Helicase_11 via Bioicons | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |
| `examples/heart-anatomy/figures/servier/*`, the illustrations embedded in `examples/heart-anatomy/figures/four-chambers.labelled.svg` and `examples/heart-anatomy/out/heart-anatomy.html`, and the heart frames in `assets/screenshots/` | Servier Medical Art (https://smart.servier.com), exported from the "Heart physiology" kit; labels added | [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) |

`examples/heart-anatomy/figures/ai/heart-chatgpt.jpg` was generated with ChatGPT (OpenAI) by
the repository author and is released under MIT with the rest of the repository.