[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M7DC7K3NAQ81ADAJZ0E6M3PR":3,"skill-same:01M7DC7K3NAQ81ADAJZ0E6M3PR":56},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":6,"ownerHtmlUrl":29,"ownerBlogUrl":30,"ownerDescription":6,"updatedAt":31,"install":32,"resources":45},"01M7DC7K3NAQ81ADAJZ0E6M3PR","d2-slides",null,"Build a slide deck whose source is text and whose figures are laid out by TALA — one Markdown file with a ```d2 fence per figure, compiled to a self-contained HTML deck (keyboard nav, overview grid, print-to-PDF), each figure as its own SVG, and a copy manifest. The deck is a page, so vlmkit's own gates read it: `check integrity` for a slide that breaks or clips, `check copy --manifest` for text the frame cut off, `check a11y contrast` for a projector. Loop: write `deck.md` → build → gates → fix. Use when asked for slides, a deck, a talk, a presentation, a review walkthrough, or a figure-heavy explainer that has to be presented rather than read. Not for one diagram (`d2-diagram`) or a moving figure (`explanatory-animation`).","mizchi\u002Fexplainer","mizchi","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F73962?v=4","01M7CYQ4DMPTZ1DABWCBFNR2Z5","Kotaro Chikuba","01M7DC53GVPR6YPB4K41EXZXQ0",466,"MIT","https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Fd2-slides\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: d2-slides\ndescription: >-\n  Build a slide deck whose source is text and whose figures are laid out by TALA — one Markdown file with a ```d2 fence per figure, compiled to a self-contained HTML deck (keyboard nav, overview grid, print-to-PDF), each figure as its own SVG, and a copy manifest. The deck is a page, so vlmkit's own gates read it: `check integrity` for a slide that breaks or clips, `check copy --manifest` for text the frame cut off, `check a11y contrast` for a projector. Loop: write `deck.md` → build → gates → fix. Use when asked for slides, a deck, a talk, a presentation, a review walkthrough, or a figure-heavy explainer that has to be presented rather than read. Not for one diagram (`d2-diagram`) or a moving figure (`explanatory-animation`).\n---\n\n# d2-slides\n\nPaths below: `\u003Cskill>` is this skill's directory and `\u003Cskills>` the directory the skills are\ninstalled in (`skills\u002F` in mizchi\u002Fexplainer, `.claude\u002Fskills\u002F` in a project that installed them).\n\nA deck is text: the prose is Markdown, every figure is a ```d2 fence, and the\nbuild is a pure function of the file. Nothing is dragged, so a slide can be\nreviewed in a diff, regenerated after a rename, and — because the output is an\nHTML page — **checked**. That last part is the point: a slide deck normally has\nno failing state, so nobody notices the bullet the frame cut in half.\n\n```bash\nnode \u003Cskill>\u002Fassets\u002Fbuild-deck.mjs deck.md --out built\n# ✓ built\u002Findex.html: 8 slides, 5 figure(s) laid out by tala, 26 copy lines → built\u002Fcopy.txt\n#   the deck:   built\u002Findex.html   → vlmkit check integrity\n#   all slides: built\u002Fprint.html   → vlmkit check copy --manifest, check a11y contrast, print to PDF\n```\n\nRequires `d2` with TALA (`d2 layout` must list `tala (bundled)` — see\n`d2-diagram` for installing it) and nothing else: the builder has no\ndependencies and the deck loads no network resource.\n\n## The deck format\n\n````markdown\n---\ntitle: Nothing tells you the picture is wrong\nsubtitle: two rounds, measured\ndate: 2026-09-14\n---\n\n# Nothing tells you the picture is wrong      ← a lone `#` heading is the title slide\n\n---\n\n## A D2 diagram is a drawing                  ← `##` is a slide heading\n\n- `d2 validate` reads **syntax**              ← bullets; `code`, **bold**, *italic* work\n- there is no `--expect`\n\n```d2                                          ← the figure, laid out by TALA\ndirection: right\nwrite -> check -> facts\n```\n\n\u003C!-- notes: what to say out loud -->          ← speaker notes: printed, never on screen\n````\n\n- Slides are separated by a line of exactly `---`; a `---` inside a fence is not\n  a separator.\n- **Bullets plus a figure** lays them side by side; **a figure alone** gets the\n  whole stage; a heading alone is a title slide. `> line` is a pull quote, and a\n  fence in any other language stays a code block.\n- Each slide is a fixed **1280×720 frame**, scaled to whatever screen it is\n  shown on. Nothing reflows between a laptop and a projector, which is also why\n  a screenshot of slide 4 is the same picture everywhere.\n\n## The loop\n\n```\n1. write deck.md                                     prose in Markdown, every figure a ```d2 fence\n2. node …\u002Fbuild-deck.mjs deck.md --out built         fails on the first figure that does not compile,\n                                                     naming the slide; warns when a slide's prose\n                                                     overflows its frame's character budget\n3. vlmkit check integrity built\u002Findex.html            a slide that breaks, clips, collides or paints nothing\n4. vlmkit check integrity built\u002Fprint.html --viewports 1280\n                                                     every slide at once — this is what catches the\n                                                     bullet the frame cut off\n5. vlmkit check copy built\u002Fprint.html --manifest built\u002Fcopy.txt --allow-invisible unknown\n                                                     every line of the deck's own text still on a slide\n                                                     (add --forbid stale.txt when you are editing a deck:\n                                                     the claim you removed must really be gone)\n6. vlmkit check a11y contrast built\u002Fprint.html        readable from the back of the room\n7. node …\u002Fd2-facts.mjs --from-svg built\u002Fslide-NN.svg --expect slide-NN.facts.json\n                                                     what each figure DRAWS, for every figure that has\n                                                     facts it must not get wrong — steps 3-6 are blind to it\n8. node …\u002Fdeck-review.mjs built --out review           shoot each slide, hand the PNGs to a reader\n   node …\u002Fdeck-review.mjs built --answers a.json      score what it read back: fidelity, order, SPLITs\n9. read built\u002Findex.html in a browser, or the PNG of a slide; fix the Markdown; go to 2\n```\n\n**Step 7 is not optional decoration, and the four page gates do not cover it.**\nThey read the page: a figure that compiles and draws the wrong thing passes all\nfour. The checker takes the slide SVGs the build already writes and needs no\n`d2` (it reads the render), so this costs one command per figure:\n\n```bash\nnode \u003Cskills>\u002Fd2-diagram\u002Fassets\u002Fd2-facts.mjs --from-svg built\u002Fslide-04.svg \\\n  --expect slide-04.facts.json     # exits 1 and names the box or edge that is wrong\n```\n\nThe same trick pins **two figures to each other**, which nothing else does: when\nslides 2 and 3 both claim `ledger` is the writer, hold *both* SVGs to one sheet\n(`{\"boxes\": [\"checkout\",\"ledger\"], \"deps\": [\"checkout->ledger\"], \"forbidden\": [\"checkout->orders\"]}`).\nUpdate one figure and forget the other and that sheet fails on the one you\nmissed. The fact-sheet schema is `d2-diagram`'s; `exhaustive: true` is what makes\nan extra box an error rather than a shrug.\n\n## Step 8: somebody has to read it\n\nSteps 3-7 are the page and the figures' geometry. None of them reads the slide\nthe way a viewer does, and that gap is not theoretical: in the v1\u002Fv2 rounds two\ndefects reached a **delivered** deck — a sentence rendered as two blocks, and a\nfragment sitting above its own bullet — with all four gates green, because\nevery fragment was visible text and nothing overflowed.\n\n```bash\nnode \u003Cskill>\u002Fassets\u002Fdeck-review.mjs built --out review\n#   → review\u002Fslide-NN.png, one per slide, plus review-brief.md\n#   hand that directory to a vision model or an agent; it answers JSON\nnode \u003Cskill>\u002Fassets\u002Fdeck-review.mjs built --answers review\u002Fanswers.json\n#   read 19\u002F21, invented 6, fidelity 0.70, order 1.00\n#   ⚠ SPLIT: \"…it calls ledger, which is now the only writer to orders.\"\n#     every word is on the slide, the sentence is not — read back as 2 blocks\n```\n\nThe scoring is deterministic, against the `slides.json` the build writes: each\nslide's text **in reading order** (which `copy.txt` is not — the manifest is a\nset, and it lists bullets before paragraphs while the page renders paragraphs\nfirst) plus the words its figures draw.\n\nTwo numbers and one line to read:\n\n- **fidelity** — sheet lines read \u002F (sheet lines + invented). 1.00 is \"the\n  slide, nothing more\". Measured in v3: 1.00 on a clean deck from both readers,\n  0.70 on the same deck built by a builder that split its bullets.\n- **order** — pairs of read lines whose order disagrees with the sheet. It is\n  for a genuinely reordered slide; be aware it did **not** catch v3's split,\n  because the fragments still appeared in the sheet's relative order. Fidelity\n  and the SPLIT line caught that.\n- **⚠ SPLIT** — a sheet line no single read line covers, whose words are all\n  present across two or more. That is one sentence rendered as two blocks, and\n  the tool names it whether or not the reader had the word for it: one v3\n  reader called the same defect \"clipped at the right edge\" — right slides,\n  wrong mechanism — and the diagnosis came out anyway.\n\n`--sheet \u003Cother-build>\u002Fslides.json` scores one render against another build's\nsheet, which is how a before\u002Fafter pair is compared against one ground truth.\n\nHonest limits. A reader that transcribes none of the figures' labels is not\nevidence they are illegible, only that it read prose — the `figures: k of n`\nline is a hint, not a verdict. A reading is a measurement and exits 0; what to\ndo about a 0.7 is the author's call. And a reader will occasionally report a\nmechanism that is not the real one, so read the slide it names before believing\nthe reason it gives.\n\n## Done condition\n\n- The build exits 0 with no overflow warning.\n- `check integrity` reports **no failures** on `index.html` (all three\n  viewports) and on `print.html` at 1280. A `warn` is not a failure and the\n  command still exits 0 — see the figure-internals note below before you spend\n  a round chasing one.\n- `check copy --manifest` reports nothing missing (and nothing forbidden, if\n  you are editing an existing deck).\n- `check a11y contrast` reports no failure, over a count that means **every**\n  slide was read. The count is content-dependent — a terse deck runs about 7\n  elements a slide, a dense one about 17 — so the number is not the test. Run\n  it against `index.html` too: that shows one slide at a time, so it comes back\n  in single digits. Print view ≫ deck view is the check.\n- Every figure with facts it must not get wrong passed `d2-facts --expect`.\n- **Somebody read it back.** You pressed through the deck yourself, or a reader\n  scored it with `deck-review` — fidelity near 1.00 and no `SPLIT`. This is the\n  only step that sees a sentence broken into two blocks.\n\n## The same loop, in CI\n\nThis repo runs its own worked example through that loop on every change to the skill,\nthe example or the three gates it uses, so the claim above is measured rather than\nasserted. Two halves, because they need different machines:\n\n- **`tests\u002Fd2\u002Fd2-slides.test.mjs`** (in the ordinary suite, no `d2`, no browser) — the\n  builder's decisions before a figure is drawn: where a slide ends (`---` inside a\n  fence is not a separator), which layout a slide gets, the manifest as the *rendered*\n  text, the overflow warning naming the slide, a figure that does not compile failing\n  the build, and `examples\u002Fd2-slides\u002Fbuilt\u002F` still matching its `deck.md`. `D2` points\n  at a stub that echoes a fixed SVG — the builder already reads that variable.\n- **`.github\u002Fworkflows\u002Fd2-slides.yml`** (real `d2` pinned at `v0.9.0`, real Chromium) —\n  the four gate runs above on a fresh build, plus a byte comparison against the\n  committed build, plus two negative controls: a manifest line the deck does not say\n  must be reported `copy-missing`, and a frame shortened to 260px must be reported\n  `clipped-content`. A suite that only ever sees passes cannot tell a working gate from\n  a gate that always passes.\n\nRegenerate the committed example with `npm run deck:example` after editing its `deck.md` —\nthe byte comparison is what keeps a committed build from drifting into a lie.\n\n## What the gates found in this skill's own deck\n\nEverything below was a real defect in the template or the example, caught by a\ngate, fixed, and re-measured. It is why the loop above is in that order.\n\n- **A phone showed nothing.** `check integrity` at 375px: *\"the DOM holds 4 text\n  blocks but almost nothing painted (ink ratio 0.05%)\"*. Centring a 1280px stage\n  as an over-sized grid item leaves the middle off-screen; the stage is centred\n  by transform now.\n- **Every slide clipped 114px.** A percentage height inside a padded fixed box\n  is not the box: the frame is a flex column and the body the flexible child.\n  The gate reported it as `clipped-content` on slides whose text was well inside\n  the frame.\n- **Long bullets were cut top and bottom.** With `align-items: center` on the\n  split layout, prose taller than the frame overflows both ways and the copy\n  gate reads those lines as copy a user cannot see. Overflow goes downward now,\n  where it is measurable, and the builder warns above ~430 characters of prose\n  beside a figure.\n- **The manifest did not match the render.** It is generated from the rendered\n  markup, not from the Markdown with its markers stripped: a line containing\n  ```` ```d2 ```` strips to something the page never says.\n\n## What the copy manifest covers\n\n`copy.txt` is generated from the **Markdown prose only** — each slide's\nheading, bullets, pull quotes and paragraphs, as the page renders them\n(markers gone, entities decoded). Three things are therefore *not* in it:\n\n- **A figure's labels.** Text inside a ```d2 fence is drawn as SVG, and the\n  manifest never contains it. So a string the deck must be seen to say belongs\n  in prose; if it only appears in a figure, the copy gate cannot vouch for it —\n  hold the figure to a fact sheet instead (step 7).\n- **Speaker notes.** `\u003C!-- notes: … -->` is printed and never on screen, and it\n  is not in the manifest either.\n- **The chrome.** The footer's deck title and page number are not manifest\n  lines.\n\nFor a reader, the build also writes **`slides.json`**: per slide, its heading,\nits text in reading order, its figures and the words those figures draw. That\nis the sheet `deck-review` scores against, and the reason it is a separate file\nfrom `copy.txt` is that a manifest cannot express order.\n\nA bullet, quote or paragraph wrapped over several lines is **rejoined** into one\nline, as Markdown does, so wrapping at 80 columns is safe and one sentence is\none manifest line. A blank line ends the block: an indented line after one is a\nparagraph of its own.\n\n## Failure modes\n\n- **`✗ slide 6-1: the d2 figure does not compile`** with\n  `reserved keywords are prohibited in edges` → an id collided with a D2\n  keyword. `width`, `height`, `label`, `style`, `shape`, `icon`, `near`, `top`,\n  `left`, `direction`, `class`, `link`, `constraint`, `layers`, `steps` and\n  `scenarios` are the ones that bite; rename the box (`cols`, `verdict`) and\n  keep the words in its label.\n- **`copy-invisible (reason: unknown)` on a line that is plainly on the slide**\n  → a vlmkit gate limitation, not your deck: a manifest line whose rendered text\n  is assembled from several inline children can read as invisible. Reproduced\n  minimally in `examples\u002Fd2-slides\u002FREADME.md`; three bullets carrying `\u003Ccode>`\n  and `\u003Cstrong>` fail, the same three lines without markup pass. Run with\n  `--allow-invisible unknown` (every accepted line is listed, so the suppression\n  stays auditable) and check the `missing` count, which is the part that matters.\n- **`check a11y contrast` inspected only four elements** → you pointed it at\n  `index.html`. One slide is on screen at a time; `print.html` is the stacked\n  view. Do not read the absolute count as a threshold: it tracks how many text\n  nodes the deck has, so a terse deck legitimately sits near 7 a slide. The\n  comparison between the two views is the signal.\n- **`near-misalignment` (a warn) on a base64-looking selector like\n  `g.KGdhdGV3YXkgLSZndDsgY2hlY2tvdXQpWzBd`** → that is *inside* a figure's SVG:\n  the gate has found two of TALA's own edge-label groups sitting 5.5px apart,\n  which is the layout engine's business and not the deck's. It is a `warn`, so\n  the verdict reads `NO DEFECTS, n WARN` and the command exits 0 — that is\n  done, leave it. There is no stable way to exempt it either: `--allow` matches\n  the finding's own selector by substring, and d2 derives that class from the\n  edge's text, so the string changes with the label. If a run has to be silent,\n  `--rule near-misalignment=off` is the only lever, and it gives up the rule for\n  the slide chrome too. Whether it fires at all depends on the layout, not on\n  having labelled edges: the same deck's figures can be CLEAN after an edit.\n- **`page-overflow-x` on `print.html` at 768 or 375** → expected: the print view\n  is a column of 1280px frames. Check it at `--viewports 1280`.\n- **A figure is enormous or unreadable** → it is a D2 diagram like any other:\n  take it to `d2-diagram`, where the width levers, the fact check and the\n  terminal render live. A slide figure has about 700×560 to live in.\n- **CJK labels** render correctly in SVG, so a Japanese deck is fine; the\n  terminal-render caveats in `d2-diagram` do not apply here.\n\n## Deliver\n\n- The deck: `built\u002Findex.html`, opened in a browser. Arrows and space move, `o`\n  is the overview grid, `p` prints, `f` is fullscreen, and the URL carries\n  `#\u002F4`, so one slide can be linked.\n- A PDF: open `print.html` and print it, or `index.html` and press `p`. Speaker\n  notes appear in print and never on screen.\n- In a repo: commit `deck.md` and the figures' `.svg`; the HTML is a build\n  output. `examples\u002Fd2-slides\u002F` is the worked example — its deck, its build, and\n  the gate runs above.\n- One slide as an image: the figure is already `built\u002Fslide-NN.svg`.\n","# d2-slides\n\nPaths below: `\u003Cskill>` is this skill's directory and `\u003Cskills>` the directory the skills are\ninstalled in (`skills\u002F` in mizchi\u002Fexplainer, `.claude\u002Fskills\u002F` in a project that installed them).\n\nA deck is text: the prose is Markdown, every figure is a ```d2 fence, and the\nbuild is a pure function of the file. Nothing is dragged, so a slide can be\nreviewed in a diff, regenerated after a rename, and — because the output is an\nHTML page — **checked**. That last part is the point: a slide deck normally has\nno failing state, so nobody notices the bullet the frame cut in half.\n\n```bash\nnode \u003Cskill>\u002Fassets\u002Fbuild-deck.mjs deck.md --out built\n# ✓ built\u002Findex.html: 8 slides, 5 figure(s) laid out by tala, 26 copy lines → built\u002Fcopy.txt\n#   the deck:   built\u002Findex.html   → vlmkit check integrity\n#   all slides: built\u002Fprint.html   → vlmkit check copy --manifest, check a11y contrast, print to PDF\n```\n\nRequires `d2` with TALA (`d2 layout` must list `tala (bundled)` — see\n`d2-diagram` for installing it) and nothing else: the builder has no\ndependencies and the deck loads no network resource.\n\n## The deck format\n\n````markdown\n---\ntitle: Nothing tells you the picture is wrong\nsubtitle: two rounds, measured\ndate: 2026-09-14\n---\n\n# Nothing tells you the picture is wrong      ← a lone `#` heading is the title slide\n\n---\n\n## A D2 diagram is a drawing                  ← `##` is a slide heading\n\n- `d2 validate` reads **syntax**              ← bullets; `code`, **bold**, *italic* work\n- there is no `--expect`\n\n```d2                                          ← the figure, laid out by TALA\ndirection: right\nwrite -> check -> facts\n```\n\n\u003C!-- notes: what to say out loud -->          ← speaker notes: printed, never on screen\n````\n\n- Slides are separated by a line of exactly `---`; a `---` inside a fence is not\n  a separator.\n- **Bullets plus a figure** lays them side by side; **a figure alone** gets the\n  whole stage; a heading alone is a title slide. `> line` is a pull quote, and a\n  fence in any other language stays a code block.\n- Each slide is a fixed **1280×720 frame**, scaled to whatever screen it is\n  shown on. Nothing reflows between a laptop and a projector, which is also why\n  a screenshot of slide 4 is the same picture everywhere.\n\n## The loop\n\n```\n1. write deck.md                                     prose in Markdown, every figure a ```d2 fence\n2. node …\u002Fbuild-deck.mjs deck.md --out built         fails on the first figure that does not compile,\n                                                     naming the slide; warns when a slide's prose\n                                                     overflows its frame's character budget\n3. vlmkit check integrity built\u002Findex.html            a slide that breaks, clips, collides or paints nothing\n4. vlmkit check integrity built\u002Fprint.html --viewports 1280\n                                                     every slide at once — this is what catches the\n                                                     bullet the frame cut off\n5. vlmkit check copy built\u002Fprint.html --manifest built\u002Fcopy.txt --allow-invisible unknown\n                                                     every line of the deck's own text still on a slide\n                                                     (add --forbid stale.txt when you are editing a deck:\n                                                     the claim you removed must really be gone)\n6. vlmkit check a11y contrast built\u002Fprint.html        readable from the back of the room\n7. node …\u002Fd2-facts.mjs --from-svg built\u002Fslide-NN.svg --expect slide-NN.facts.json\n                                                     what each figure DRAWS, for every figure that has\n                                                     facts it must not get wrong — steps 3-6 are blind to it\n8. node …\u002Fdeck-review.mjs built --out review           shoot each slide, hand the PNGs to a reader\n   node …\u002Fdeck-review.mjs built --answers a.json      score what it read back: fidelity, order, SPLITs\n9. read built\u002Findex.html in a browser, or the PNG of a slide; fix the Markdown; go to 2\n```\n\n**Step 7 is not optional decoration, and the four page gates do not cover it.**\nThey read the page: a figure that compiles and draws the wrong thing passes all\nfour. The checker takes the slide SVGs the build already writes and needs no\n`d2` (it reads the render), so this costs one command per figure:\n\n```bash\nnode \u003Cskills>\u002Fd2-diagram\u002Fassets\u002Fd2-facts.mjs --from-svg built\u002Fslide-04.svg \\\n  --expect slide-04.facts.json     # exits 1 and names the box or edge that is wrong\n```\n\nThe same trick pins **two figures to each other**, which nothing else does: when\nslides 2 and 3 both claim `ledger` is the writer, hold *both* SVGs to one sheet\n(`{\"boxes\": [\"checkout\",\"ledger\"], \"deps\": [\"checkout->ledger\"], \"forbidden\": [\"checkout->orders\"]}`).\nUpdate one figure and forget the other and that sheet fails on the one you\nmissed. The fact-sheet schema is `d2-diagram`'s; `exhaustive: true` is what makes\nan extra box an error rather than a shrug.\n\n## Step 8: somebody has to read it\n\nSteps 3-7 are the page and the figures' geometry. None of them reads the slide\nthe way a viewer does, and that gap is not theoretical: in the v1\u002Fv2 rounds two\ndefects reached a **delivered** deck — a sentence rendered as two blocks, and a\nfragment sitting above its own bullet — with all four gates green, because\nevery fragment was visible text and nothing overflowed.\n\n```bash\nnode \u003Cskill>\u002Fassets\u002Fdeck-review.mjs built --out review\n#   → review\u002Fslide-NN.png, one per slide, plus review-brief.md\n#   hand that directory to a vision model or an agent; it answers JSON\nnode \u003Cskill>\u002Fassets\u002Fdeck-review.mjs built --answers review\u002Fanswers.json\n#   read 19\u002F21, invented 6, fidelity 0.70, order 1.00\n#   ⚠ SPLIT: \"…it calls ledger, which is now the only writer to orders.\"\n#     every word is on the slide, the sentence is not — read back as 2 blocks\n```\n\nThe scoring is deterministic, against the `slides.json` the build writes: each\nslide's text **in reading order** (which `copy.txt` is not — the manifest is a\nset, and it lists bullets before paragraphs while the page renders paragraphs\nfirst) plus the words its figures draw.\n\nTwo numbers and one line to read:\n\n- **fidelity** — sheet lines read \u002F (sheet lines + invented). 1.00 is \"the\n  slide, nothing more\". Measured in v3: 1.00 on a clean deck from both readers,\n  0.70 on the same deck built by a builder that split its bullets.\n- **order** — pairs of read lines whose order disagrees with the sheet. It is\n  for a genuinely reordered slide; be aware it did **not** catch v3's split,\n  because the fragments still appeared in the sheet's relative order. Fidelity\n  and the SPLIT line caught that.\n- **⚠ SPLIT** — a sheet line no single read line covers, whose words are all\n  present across two or more. That is one sentence rendered as two blocks, and\n  the tool names it whether or not the reader had the word for it: one v3\n  reader called the same defect \"clipped at the right edge\" — right slides,\n  wrong mechanism — and the diagnosis came out anyway.\n\n`--sheet \u003Cother-build>\u002Fslides.json` scores one render against another build's\nsheet, which is how a before\u002Fafter pair is compared against one ground truth.\n\nHonest limits. A reader that transcribes none of the figures' labels is not\nevidence they are illegible, only that it read prose — the `figures: k of n`\nline is a hint, not a verdict. A reading is a measurement and exits 0; what to\ndo about a 0.7 is the author's call. And a reader will occasionally report a\nmechanism that is not the real one, so read the slide it names before believing\nthe reason it gives.\n\n## Done condition\n\n- The build exits 0 with no overflow warning.\n- `check integrity` reports **no failures** on `index.html` (all three\n  viewports) and on `print.html` at 1280. A `warn` is not a failure and the\n  command still exits 0 — see the figure-internals note below before you spend\n  a round chasing one.\n- `check copy --manifest` reports nothing missing (and nothing forbidden, if\n  you are editing an existing deck).\n- `check a11y contrast` reports no failure, over a count that means **every**\n  slide was read. The count is content-dependent — a terse deck runs about 7\n  elements a slide, a dense one about 17 — so the number is not the test. Run\n  it against `index.html` too: that shows one slide at a time, so it comes back\n  in single digits. Print view ≫ deck view is the check.\n- Every figure with facts it must not get wrong passed `d2-facts --expect`.\n- **Somebody read it back.** You pressed through the deck yourself, or a reader\n  scored it with `deck-review` — fidelity near 1.00 and no `SPLIT`. This is the\n  only step that sees a sentence broken into two blocks.\n\n## The same loop, in CI\n\nThis repo runs its own worked example through that loop on every change to the skill,\nthe example or the three gates it uses, so the claim above is measured rather than\nasserted. Two halves, because they need different machines:\n\n- **`tests\u002Fd2\u002Fd2-slides.test.mjs`** (in the ordinary suite, no `d2`, no browser) — the\n  builder's decisions before a figure is drawn: where a slide ends (`---` inside a\n  fence is not a separator), which layout a slide gets, the manifest as the *rendered*\n  text, the overflow warning naming the slide, a figure that does not compile failing\n  the build, and `examples\u002Fd2-slides\u002Fbuilt\u002F` still matching its `deck.md`. `D2` points\n  at a stub that echoes a fixed SVG — the builder already reads that variable.\n- **`.github\u002Fworkflows\u002Fd2-slides.yml`** (real `d2` pinned at `v0.9.0`, real Chromium) —\n  the four gate runs above on a fresh build, plus a byte comparison against the\n  committed build, plus two negative controls: a manifest line the deck does not say\n  must be reported `copy-missing`, and a frame shortened to 260px must be reported\n  `clipped-content`. A suite that only ever sees passes cannot tell a working gate from\n  a gate that always passes.\n\nRegenerate the committed example with `npm run deck:example` after editing its `deck.md` —\nthe byte comparison is what keeps a committed build from drifting into a lie.\n\n## What the gates found in this skill's own deck\n\nEverything below was a real defect in the template or the example, caught by a\ngate, fixed, and re-measured. It is why the loop above is in that order.\n\n- **A phone showed nothing.** `check integrity` at 375px: *\"the DOM holds 4 text\n  blocks but almost nothing painted (ink ratio 0.05%)\"*. Centring a 1280px stage\n  as an over-sized grid item leaves the middle off-screen; the stage is centred\n  by transform now.\n- **Every slide clipped 114px.** A percentage height inside a padded fixed box\n  is not the box: the frame is a flex column and the body the flexible child.\n  The gate reported it as `clipped-content` on slides whose text was well inside\n  the frame.\n- **Long bullets were cut top and bottom.** With `align-items: center` on the\n  split layout, prose taller than the frame overflows both ways and the copy\n  gate reads those lines as copy a user cannot see. Overflow goes downward now,\n  where it is measurable, and the builder warns above ~430 characters of prose\n  beside a figure.\n- **The manifest did not match the render.** It is generated from the rendered\n  markup, not from the Markdown with its markers stripped: a line containing\n  ```` ```d2 ```` strips to something the page never says.\n\n## What the copy manifest covers\n\n`copy.txt` is generated from the **Markdown prose only** — each slide's\nheading, bullets, pull quotes and paragraphs, as the page renders them\n(markers gone, entities decoded). Three things are therefore *not* in it:\n\n- **A figure's labels.** Text inside a ```d2 fence is drawn as SVG, and the\n  manifest never contains it. So a string the deck must be seen to say belongs\n  in prose; if it only appears in a figure, the copy gate cannot vouch for it —\n  hold the figure to a fact sheet instead (step 7).\n- **Speaker notes.** `\u003C!-- notes: … -->` is printed and never on screen, and it\n  is not in the manifest either.\n- **The chrome.** The footer's deck title and page number are not manifest\n  lines.\n\nFor a reader, the build also writes **`slides.json`**: per slide, its heading,\nits text in reading order, its figures and the words those figures draw. That\nis the sheet `deck-review` scores against, and the reason it is a separate file\nfrom `copy.txt` is that a manifest cannot express order.\n\nA bullet, quote or paragraph wrapped over several lines is **rejoined** into one\nline, as Markdown does, so wrapping at 80 columns is safe and one sentence is\none manifest line. A blank line ends the block: an indented line after one is a\nparagraph of its own.\n\n## Failure modes\n\n- **`✗ slide 6-1: the d2 figure does not compile`** with\n  `reserved keywords are prohibited in edges` → an id collided with a D2\n  keyword. `width`, `height`, `label`, `style`, `shape`, `icon`, `near`, `top`,\n  `left`, `direction`, `class`, `link`, `constraint`, `layers`, `steps` and\n  `scenarios` are the ones that bite; rename the box (`cols`, `verdict`) and\n  keep the words in its label.\n- **`copy-invisible (reason: unknown)` on a line that is plainly on the slide**\n  → a vlmkit gate limitation, not your deck: a manifest line whose rendered text\n  is assembled from several inline children can read as invisible. Reproduced\n  minimally in `examples\u002Fd2-slides\u002FREADME.md`; three bullets carrying `\u003Ccode>`\n  and `\u003Cstrong>` fail, the same three lines without markup pass. Run with\n  `--allow-invisible unknown` (every accepted line is listed, so the suppression\n  stays auditable) and check the `missing` count, which is the part that matters.\n- **`check a11y contrast` inspected only four elements** → you pointed it at\n  `index.html`. One slide is on screen at a time; `print.html` is the stacked\n  view. Do not read the absolute count as a threshold: it tracks how many text\n  nodes the deck has, so a terse deck legitimately sits near 7 a slide. The\n  comparison between the two views is the signal.\n- **`near-misalignment` (a warn) on a base64-looking selector like\n  `g.KGdhdGV3YXkgLSZndDsgY2hlY2tvdXQpWzBd`** → that is *inside* a figure's SVG:\n  the gate has found two of TALA's own edge-label groups sitting 5.5px apart,\n  which is the layout engine's business and not the deck's. It is a `warn`, so\n  the verdict reads `NO DEFECTS, n WARN` and the command exits 0 — that is\n  done, leave it. There is no stable way to exempt it either: `--allow` matches\n  the finding's own selector by substring, and d2 derives that class from the\n  edge's text, so the string changes with the label. If a run has to be silent,\n  `--rule near-misalignment=off` is the only lever, and it gives up the rule for\n  the slide chrome too. Whether it fires at all depends on the layout, not on\n  having labelled edges: the same deck's figures can be CLEAN after an edit.\n- **`page-overflow-x` on `print.html` at 768 or 375** → expected: the print view\n  is a column of 1280px frames. Check it at `--viewports 1280`.\n- **A figure is enormous or unreadable** → it is a D2 diagram like any other:\n  take it to `d2-diagram`, where the width levers, the fact check and the\n  terminal render live. A slide figure has about 700×560 to live in.\n- **CJK labels** render correctly in SVG, so a Japanese deck is fine; the\n  terminal-render caveats in `d2-diagram` do not apply here.\n\n## Deliver\n\n- The deck: `built\u002Findex.html`, opened in a browser. Arrows and space move, `o`\n  is the overview grid, `p` prints, `f` is fullscreen, and the URL carries\n  `#\u002F4`, so one slide can be linked.\n- A PDF: open `print.html` and print it, or `index.html` and press `p`. Speaker\n  notes appear in print and never on screen.\n- In a repo: commit `deck.md` and the figures' `.svg`; the HTML is a build\n  output. `examples\u002Fd2-slides\u002F` is the worked example — its deck, its build, and\n  the gate runs above.\n- One slide as an image: the figure is already `built\u002Fslide-NN.svg`.\n",{"name":5,"description":7},"main","ccdd7bacfb47451e38506d837af8a629504960b2","skills\u002Fd2-slides",9,"https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer","https:\u002F\u002Fgithub.com\u002Fmizchi","https:\u002F\u002Fmizchi.dev","2026-10-11 00:43:28",{"source":8,"skillName":5,"commands":33,"prompt":43,"zipAvailable":44},[34,37,40],{"tool":35,"command":36},"npx","npx skills add mizchi\u002Fexplainer --skill d2-slides",{"tool":38,"command":39},"bunx","bunx skills add mizchi\u002Fexplainer --skill d2-slides",{"tool":41,"command":42},"pnpm","pnpm dlx skills add mizchi\u002Fexplainer --skill d2-slides","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Fd2-slides\u002FSKILL.md",true,[46,52],{"path":47,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":50,"sourceHtmlUrl":51},"assets\u002Fbuild-deck.mjs","SCRIPT","脚本",24145,"https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Fd2-slides\u002Fassets\u002Fbuild-deck.mjs",{"path":53,"resourceType":48,"resourceTypeDesc":49,"sizeBytes":54,"sourceHtmlUrl":55},"assets\u002Fdeck-review.mjs",14496,"https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Fd2-slides\u002Fassets\u002Fdeck-review.mjs",[57,66,73,80],{"skillNo":58,"name":59,"nameZh":6,"description":60,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":61,"licenseFileUrl":62,"sourceHtmlUrl":63,"categories":64,"keywords":65,"publishedAt":19},"01M7DCAA7PVXV0AJ67NCG49NC9","first-reader","Beta readers for any draft, run by simulating how a real reader experiences it, moment by moment. A skim gate, a no-lookahead timed read producing an attention transcript with quit points, a recall test of what a reader remembers the next day, and a trust ledger of the implied author. Use when the user asks for a beta read, beta readers, test readers, human review, reader review, to read something like a human, to be a first reader, whether a piece holds attention or will actually get read, for a quick read of whether a busy skimmer would even open a post, what readers will remember or take away tomorrow, where readers stop reading or bounce, or why a draft still feels off or hollow after anti-slop or humanizer edits. Final gate before publishing; reports where the reading broke; never rewrites.","Apache-2.0","https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Ffirst-reader\u002FLICENSE","https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Ffirst-reader\u002FSKILL.md",[],[],{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":19},"01M7DC91J7122HP0984WZWM9TT","explainer","特定の読み手に向けて、概念・PR・設計を「冗長にならない水準」の速習資料として説明し、図と主張を道具で検証する。読み手のペルソナ（既に知っていること・知らないこと・読み方）を質問と公開情報から作り、その差分だけを書く。図は Mermaid \u002F D2 で描いて事実シートに照らし、本文に引用するコード・出力は再実行して照合し、HTML は vlmkit のゲートに通す。Use when the user says \"explain this to me \u002F to \u003Cperson>\", \"速習資料\", \"解説ドキュメント\", \"この PR を理解したい\", \"わかるように説明して\", \"I can't keep up with what the agent wrote\", \"この PR を \u003C人> が理解できるように説明して\", or when a reviewer asks what a change does. Use it even for a small diff or a chat-only answer whenever a named reader (a reviewer, an on-call engineer, a teammate, a PM) is given. Also when model or analysis results (diagnostics, metrics, charts) must be explained to someone who decides on them, e.g. \"このモデルを本番に出してよいか \u003C人> が判断できるように\". Also when the user wrote an explanation themselves and lost confidence in it.","https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Fexplainer\u002FSKILL.md",[],[],{"skillNo":74,"name":75,"nameZh":6,"description":76,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":77,"categories":78,"keywords":79,"publishedAt":19},"01M7DC88110G46GEJNJRHQ7Q9M","explainer-book","1 本の速習資料では収まらない、章立ての学習資料（\u003Ctopic>-book\u002F01-quickstart.md, 02-….md …）を、読み手のペルソナに合わせて設計・執筆・検証する。章ごとの学習目標と理解度チェックの対応、概念を導入より前に使わない順序、章の読了時間の予算、「未完成なら落ち、答えなら通る」演習、book.json から生成する章の依存図を、verify-book.mjs で検査し、各章の出力・図・HTML は explainer の verify-doc.mjs で検査する。Use when the user asks for a book, a tutorial series, a course, \"学習資料\", \"チュートリアル\", \"ハンズオン\", \"本にまとめて\", \"章立てで\", \"01-quickstart から\", or when an explainer crash course would exceed ~20 minutes or needs exercises.","https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Fexplainer-book\u002FSKILL.md",[],[],{"skillNo":81,"name":82,"nameZh":6,"description":83,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":84,"categories":85,"keywords":86,"publishedAt":19},"01M7DC6SFCE2V78R54EGHTWP9J","d2-diagram","Draw a software architecture, system, data-model or call-flow diagram as D2 text laid out by TALA (D2's whiteboard-style engine, open source since D2 0.9), look at it in the terminal before anyone opens an image, and check that the picture says what it claims — `d2 --layout=tala x.d2 x.txt` renders the layout as Unicode box drawing, `--ascii-mode standard` as plain ASCII for a README, and `assets\u002Fd2-facts.mjs` reads the drawn boxes and arrows back out of the render and holds them to a fact sheet. Loop: write `.d2` → `d2 fmt --check` \u002F `validate` → facts → terminal render → PNG → fix the text. Use when asked for a D2 diagram, an architecture diagram kept as editable text in the repo, a TALA layout, a diagram that shows in a terminal or a code block, or when the repo already has `.d2` files. Not for animations or figures with a moving walk (`explanatory-animation`, `explain-with-anim`).","https:\u002F\u002Fgithub.com\u002Fmizchi\u002Fexplainer\u002Fblob\u002Fmain\u002Fskills\u002Fd2-diagram\u002FSKILL.md",[],[]]