/explainer:explainer-bookfrom explainer
Designs, writes, and validates multi-chapter learning materials (books, tutorial series, courses) with persona-driven goals, concept ordering, exercises, and automated verification.
Ships in explainer. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
explainer の本版。
1 本の速習資料(20 分以内・例 1 つずつ)で足りないとき、章に分けて、手を動かして身につける資料にする。
ペルソナ・図・検証の仕組みは explainer をそのまま使う。先に ../explainer/SKILL.md を読むこと。
このスキルが足すのは、本全体の設計と検査。
スクリプトは、このスキルのディレクトリ(以下 <skill>)の scripts/ にあります。
verify-book.mjs は、隣の explainer スキルの scripts/verify-doc.mjs を呼びます。2 つのスキルは同じ場所に入れてください。
依存の入れ方は explainer の「準備」と同じです。
次のどれかに当てはまったら本にする。1 つも当てはまらなければ、explainer の 1 本で書く。
<topic>-book/
README.md 目次:想定読者、章ごとの「読み終えたらできること」、章の依存図、再現方法
book.json 章の順序・学習目標・導入する概念・演習(references/book-json.md)
01-quickstart.md 最初の章は必ず quickstart:理論の前に、動く結果に着く
02-….md concept:1 章 1 つの判定を身につける
03-….md practice:演習が中心
checks.json 本文の出力と演習の答えを再生成するコマンド(explainer と同じ形式)
examples/ 章で使うコード・モデル。演習の出発点と答えを別ファイルにする
figures/ book-map.*(生成)と各章の図
1. ペルソナ explainer と同じ。「怪しいところ」から、本全体の問いを 1 つ決める
2. 目標を並べる 問いに答えるために読み手ができるべき判定を 3〜6 個。1 章に 1〜2 個
3. 概念の順序 各判定に要る概念を書き出し、どの章で導入するかを決める(book.json introduces / requires)
4. 実物を先に 各章の例と演習を作り、走らせる。演習は「出発点で落ちる」「答えで通る」を両方確かめる
5. 章を書く explainer の writing.md の型。章の冒頭に所要時間とゴール、末尾に理解度チェック
6. 検証 node <skill>/scripts/verify-book.mjs <book-dir> [--write]
7. 読ませる first-reader で、少なくとも 01-quickstart と演習の章を、ペルソナ本人に読ませる(explainer の手順 8)
8. 渡す dist/index.html と、各章の 1 行要約。未検証の点を明記
目標は「読み終えたら、何を判定できるか」で書く。「〜を理解する」は検査できないので書かない。
各目標には、理解度チェックの問いを 1 つ以上付ける(<!-- quiz: <目標id> -->)。
assumed に書く。説明しない。introduces する。その章より前の章の本文に出てきたら、検証が落ちる。requires に書く。依存図の矢印になる。演習の答えも実行して確かめる。答えが間違った演習は、間違いを教える。
| kind | 例 | 検査 |
|---|---|---|
write | 条件・関数・設定を書かせる | starter:出発点のまま実行すると落ちることを確かめる check。answer:答えで通ることを確かめる check |
check | 道具を回して判定させる | answer:判定の根拠になる出力を再生成する check |
<details> に入れる。<!-- exercise: <id> --> を置く。explainer の文体に加えて、次を守る。
→ [02 …](02-….md))。HTML では前後の章と目次へのナビが付く。node <skill>/scripts/verify-book.mjs <book-dir> # 検査
node <skill>/scripts/verify-book.mjs <book-dir> --write # 依存図と SVG を作り直す
本全体の検査:
| 検査 | 落ちる条件 |
|---|---|
| chapters | 章ファイルがない。NN- の番号が book.json の順と違う。1 章が quickstart でない |
| objectives | quiz が付いていない目標がある。quiz が他の章の目標を名指ししている |
| concepts | 概念を導入より前の章で使っている。requires が導入されていない。introduces と宣言したのに本文に出てこない |
| budget | 本文の推定読了時間(500 字/分 + コード 15 行/分)が minutes を超える |
| exercises | 印がない。答えが <details> にない。check が checks.json にない。write 演習に落ちる starter がない |
| map | figures/book-map.* が book.json と一致しない。README に図がない |
そのあと、README と全章を verify-doc.mjs --pages に渡す。出力の引用、図、ページ間リンク、各ページの vlmkit ゲートを検査する。
book verdict: VERIFIED になるまで直す。
| パス | 内容 |
|---|---|
references/book-json.md | book.json の全フィールド |
scripts/verify-book.mjs | 本全体の検査 → verify-doc.mjs |
../explainer/scripts/build-html.mjs | 複数ページを HTML に(目次・前後の章へのナビつき) |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub mizchi/explainer --plugin explainer5 skills in this plugin
/d2-diagramDraw 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/d2-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` / `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`)./d2-slidesBuild 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`)./explainer特定の読み手に向けて、概念・PR・設計を「冗長にならない水準」の速習資料として説明し、図と主張を道具で検証する。読み手のペルソナ(既に知っていること・知らないこと・読み方)を質問と公開情報から作り、その差分だけを書く。図は Mermaid / D2 で描いて事実シートに照らし、本文に引用するコード・出力は再実行して照合し、HTML は vlmkit のゲートに通す。Use when the user says "explain this to me / to <person>", "速習資料", "解説ドキュメント", "この PR を理解したい", "わかるように説明して", "I can't keep up with what the agent wrote", "この PR を <人> が理解できるように説明して", 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. "このモデルを本番に出してよいか <人> が判断できるように". Also when the user wrote an explanation themselves and lost confidence in it./first-readerBeta 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.Other plugins' skills for the same job