From reviewable-html-workbench
Generates validated HTML artifacts with preview URLs from a document model. Use for final reports, reviewable documents, and diagrammed HTML output.
How this skill is triggered — by the user, by Claude, or both
Slash command
/reviewable-html-workbench:visual-html-renderer [document-model.json] [--output output/<date>_<slug>] [--preview auto|tailscale|local|off][document-model.json] [--output output/<date>_<slug>] [--preview auto|tailscale|local|off]The summary Claude sees in its skill listing — used to decide when to auto-load this skill
HTML出力系skillの共通レンダラーとして、個別HTML生成ロジックを置き換える。
HTML出力系skillの共通レンダラーとして、個別HTML生成ロジックを置き換える。
重い処理は scripts/html_review_workbench/ のPython実装に委譲し、このskillは入力確認、呼び出し順、ガード、検証を担当する。
Use this skill as the shared renderer for HTML-output workflows. It replaces one-off HTML generation logic with a fixed flow: understand the requested content, design the document model, run the shared CLI, validate the bundle, and return a preview URL. Heavy implementation stays in scripts/html_review_workbench/; this skill owns input handling, workflow order, gates, and verification.
Plan Mode 中の計画確認プレビューには、このskillを使わない。その場合は plan-preview を使い、一時HTML previewとして扱う。visual-html-renderer は通常の最終HTML成果物、レポート、レビュー可能な文書のbundle生成だけを担当する。
Do not use this skill for Plan Mode proposal previews. Route those requests to plan-preview; this skill is only for final HTML artifacts, reports, and reviewable document bundles.
check-model CLI、Completion receipt。Follow the language of the latest user request for progress updates, final responses, preview handoff text, and user-facing summaries. 日本語の依頼には日本語で、英語の依頼には英語で返す。入力本文や引用内容は、ユーザーが翻訳を求めない限り勝手に翻訳しない。HTML内の見出しや本文は、元資料の言語、ユーザーの指定、レビュー対象読者に合わせる。
<proposed_plan> の視覚確認、計画URLの追加が目的なら、このskillではなく plan-preview を使う。document-model.json を直接作る。build-model で source-capture draft を作ってよい。ただし draft は最終モデルではないため、そのまま render へ渡さない。document-model.json を読み返し、未再構成テキストの流し込みやrenderer非対応型の使用がないことを確認する。image.generation_status=requested のブロックがある場合は、imagegen skillで画像を生成し、attach-image CLIで文書モデルへ添付する。check-model CLIで最終render前の文書モデル品質を検査する。render CLIでHTML bundleを生成する。validate CLIでHTML、asset、comment schema、図・画像の非空を検証する。preview CLIを --mode auto で起動し、返却JSONの url と stop_command を最終応答に必ず書く。watch-comments を開始する。これによりブラウザからのコメントを自動検知できるようになる。Monitor 起動コマンド: python3 -m scripts.html_review_workbench.cli watch-comments --root <output-dir>。自前の polling スクリプトではなく、この CLI を使うこと。イベント受信後の処理は reviewable-design-doc skill の「コメント自動回答と解決待ちゲート」セクションに従う。<proposed_plan> visual check, or plan preview URL request, use plan-preview instead of this skill.document-model.json is provided, inspect the user's content or the latest artifact and design the HTML structure yourself.document-model.json directly using the renderer-supported block types.build-model only as a source-capture draft when temporary input storage is needed; never pass that draft straight to render.imagegen skill and attach images with attach-image.check-model, then render, then validate, then preview.preview --mode auto by default and include the returned url and stop_command in the final response.watch-comments immediately after preview startup so browser comments can be detected.HTML出力はテキスト変換ではなく、最終HTML bundleの情報設計として扱う。
.md は使わない。source.txt, input.txt, source-content.txt のようなプレーンテキスト名を使う。.md やMarkdownという語をHTML出力の前提として扱わない。現行rendererで最終HTMLに使う表現は、実装上の描画挙動に合わせて選ぶ。
| block type | rendererの扱い | contentに書くもの |
|---|---|---|
html | HTML片をそのまま挿入する | agentが設計した <p>, <table>, <ul>, <ol>, <pre><code> 等の構造化HTML |
callout | HTML escapeしてcallout表示する | 決定、注意、前提などの短いプレーンテキスト。HTMLタグは書かない |
diagram | Mermaid sourceを保存し、fallback previewまたは生成画像を表示する | diagram_source または diagram.source にMermaid source。sourceに無い関係を画像側で追加しない |
image | 添付済み生成画像を表示する | image.prompt, image.alt, image.caption, image.source_path |
section / text / table | 専用描画なし。通常段落へescapeされる | 最終HTMLモデルでは使わない。表は html block内の <table> で表現する |
html blockはraw insertされるため、外部入力をそのまま混ぜない。入力由来の文字列はagentが意味単位へ再構成し、必要な箇所だけescape済みHTMLとして入れる。
rendererは <h1> を文書タイトルに使う。本文ブロックの見出しは heading_level フィールドで制御する。
| heading_level | HTML タグ | 用途 |
|---|---|---|
2 | <h2> | 章見出し。文書を大きく区切る上位セクション。読者が目次で選ぶ単位 |
3 | <h3> | 節見出し。章の中を細分化するサブセクション |
heading_level は必須。2(章)または 3(直前の章の配下の節)を指定する。<h2> や <h3> を直接書かない。小見出しが必要な場合は <h4> を使う(renderer が content 内の見出しを自動シフトする)。html block の content に書く HTML は、セマンティックな構造を意識する。
<table> に <thead> と <tbody> を含め、ヘッダセルは <th scope="col"> または <th scope="row"> にする。<ol>、並列項目は <ul>、用語と説明の対は <dl> にする。<p> で段落分けし、<div> に流し込まない。<strong>(重要)と <em>(ニュアンス)を使い分ける。文書モデルを作る前に、agentは次を決める。
heading_level: 2)でどのブロックが節(heading_level: 3)かを先に決める。1つの章に節が偏りすぎないようバランスを取る。type, title, heading_level, content, review_required。heading_level: 2 ブロックの冒頭に、その章で扱う内容の文脈を示す導入段落を置く。html block内で使う表、番号付きリスト、箇条書き、コードブロック、通常本文の構成。入力がMarkdownや箇条書きで整理されていても、記号構造をそのまま変換しない。最終HTMLで読みやすい単位へ組み替えてから文書モデルにする。
Treat HTML output as information design for the final bundle, not as text conversion. Identify the audience, purpose, comparison axes, chronology, dependencies, steps, decisions, assumptions, and unresolved issues before writing the model. Use tables for comparisons, ordered lists for procedures, lists for parallel items, callouts for decisions or cautions, diagrams for flows and dependencies, images for useful visual explanations, and code blocks for commands or logs. Even when the input is Markdown or a list, restructure it into readable HTML blocks instead of mechanically converting the symbols.
ユーザーが「html出力して」「HTMLにして」「HTMLで出して」「render this as HTML」「turn this into HTML」「create an HTML preview」「generate a visual HTML report」「make this a reviewable HTML document」「diagrammed HTML report」のように自然文で依頼し、document-model.json を指定していない場合も、このskillを発火させる。
その場合は、次の順で入力を決める。
output/tmp/<purpose>/document-model.json または output/<YYYY-MM-DD>_<name>/document-model.json を直接作る。schema_version, document_id, title, generated_at, blocks を必ず持つ。image.generation_status=requested のブロックがある場合は画像生成と attach-image を完了してから、check-model → render → validate → preview まで進める。build-model は最終HTMLモデルを作るplannerではない。入力を安全に保持する source-capture draft を作るだけで、Markdown表・リスト・コード等の機械変換や、内容に応じた表現選択は行わない。最終HTML出力では、agentがHTML表現設計フェーズで文書モデルを直接設計する。画像生成が外部サービス送信・機密情報・ユーザー承認を要する条件に当たる場合は、該当する承認ゲートに従う。設計判断、要求整理、レビュー観点の作成が主目的の場合は reviewable-design-doc を使う。
Natural requests such as render this as HTML, turn this into HTML, create an HTML preview, generate a visual HTML report, make this a reviewable HTML document, and diagrammed HTML report should still trigger this skill. Use the explicitly named file, pasted content, or latest artifact as the HTML source. Ask only when the target cannot be identified. If the target is clear, proceed into HTML information design and create output/tmp/<purpose>/document-model.json or output/<YYYY-MM-DD>_<name>/document-model.json directly.
render CLIを呼ぶ前に、文書モデルを読み返して次を確認する。
heading_level: 2 のブロックが少なくとも1つある。heading_level: 3 のブロックが最初の heading_level: 2 ブロックより前に出現していない。heading_level: 2 ブロックの content が導入段落で始まっている。html block の <table> に <thead> と <th> がある。content 内に <h2> や <h3> を直接書いていない。html blockが未再構成テキストを <p> または <pre> だけで抱えていない。html block内の <table> 等で比較軸を明示している。html block内の <ol> 等で順序を明示している。callout または専用の html blockとして本文に埋もれないようにしている。callout blockの content にHTMLタグを書いていない。section, text, table block typeを最終モデルで使っていない。diagram blockは有効なMermaid sourceを持ち、画像生成promptはsourceに無い事実を追加していない。image blockは source_path が添付済みになるまで render しない。Before calling render, read the model back and confirm the heading hierarchy, introductory paragraphs, supported block types, table semantics, ordered steps, callouts, diagram sources, attached images, and absence of raw unstructured dumps. Do not render until requested images have been attached and unsupported block types have been removed.
assets/diagrams/*.mmd に保存し、HTML上は生成画像を主表示にする。生成画像が未添付の場合だけMermaid fallbackを表示する。このskillは、低レベル実装へ直接importせず、共通CLIだけを呼ぶ。
CLI実行前に、この SKILL.md の配置から renderer repo root を決める。
skills/visual-html-renderer/SKILL.md の2階層上が renderer repo root であり、
そこに scripts/html_review_workbench/cli.py が存在することを確認する。
すべての python3 -m scripts.html_review_workbench.cli ... は renderer repo root を
作業ディレクトリにして実行する。現在のチャットやworkspaceのcwdをrepo rootとして扱わない。
cwdに scripts/html_review_workbench/cli.py が無い場合は、代替HTMLを作らず、
renderer repo rootへ移動してCLIを実行する。
python3 -m scripts.html_review_workbench.cli build-model \
--text "<content>" \
--output <document-model.json>
python3 -m scripts.html_review_workbench.cli attach-image \
--model <document-model.json> \
--block-id <generated-image-block-id> \
--image <generated-image-path>
python3 -m scripts.html_review_workbench.cli check-model \
--model <document-model.json>
python3 -m scripts.html_review_workbench.cli render \
--model <document-model.json> \
--output <output-dir>
python3 -m scripts.html_review_workbench.cli validate \
--root <output-dir>
python3 -m scripts.html_review_workbench.cli preview \
--root <output-dir> \
--mode auto \
--owner-pid $PPID
注意: $PPID は preview コマンドを直接実行する Bash の親プロセス ID を指す。ラッパースクリプト (bash run-render.sh 等) 内で $PPID を使うと、一時的な Bash プロセスの親を監視してしまい、スクリプト完了後に preview server が自動停止する。preview コマンドは常に agent が直接 Bash tool call で実行し、ラッパースクリプトに含めない。
Codex sandbox内で tailscale ip -4 が設定ファイル読み取りに失敗する場合は、preview本体をsandbox内で起動したまま、IPだけを小さいresolverで先に取得して渡す。
python3 -m scripts.html_review_workbench.preview_host_resolve
HTML_REVIEW_WORKBENCH_TAILSCALE_IP=<tailscale-ip> \
python3 -m scripts.html_review_workbench.cli preview \
--root <output-dir> \
--mode auto \
--owner-pid $PPID
注意: $PPID は preview コマンドを直接実行する Bash の親プロセス ID を指す。ラッパースクリプト (bash run-render.sh 等) 内で $PPID を使うと、一時的な Bash プロセスの親を監視してしまい、スクリプト完了後に preview server が自動停止する。preview コマンドは常に agent が直接 Bash tool call で実行し、ラッパースクリプトに含めない。
ユーザーが明示的にプレビュー不要と言った場合、または自動テスト・fixture検証で副作用を抑える場合だけ --mode off を使う。ユーザー向け成果物では --mode off を既定にしない。
成果物はユーザーが直接読む最終HTMLなら output/<YYYY-MM-DD>_<name>/、再利用しない検証なら output/tmp/<purpose>/ に置く。
Call only the shared CLI. Resolve the renderer repo root from this SKILL.md: two levels above skills/visual-html-renderer/SKILL.md. Run every python3 -m scripts.html_review_workbench.cli ... command from that repo root. If the current workspace does not contain scripts/html_review_workbench/cli.py, move to the renderer repo root instead of creating fallback HTML. Use --mode off only for explicit no-preview requests or tests; user-facing artifacts should default to --mode auto.
preview が status: running を返した場合、最終応答に url を必ず含める。ファイルパスだけで完了しない。preview が status: off または status: failed の場合、URLが無い理由を明示し、可能なら --mode auto で再実行してURL提示まで進める。$PPID で agent セッションのプロセスを監視し、セッション終了時にサーバーも自動停止する。加えて idle timeout でも孤児を防止する。stop_command を使う。PIDなしで全previewを停止しない。When preview returns status: running, include the url in the final response; a file path alone is not completion. If preview is off or failed, state the reason and try --mode auto when appropriate. Use $PPID so the preview server follows the agent session lifecycle, with idle timeout as a fallback. Use the returned stop_command only when manual cleanup is needed.
index.html と renderer-manifest.json が生成されている。validate が status: ok を返している。0.0.0.0 にbindしていない。自動テスト pass と CLI の JSON 出力確認は、実シナリオ検証ではない。「動作確認」を求められた場合、以下を実行する。
document-model.json を作り、render → validate → preview を実行する。検証の完了条件: ユーザーがブラウザ上で最終 HTML の表示を確認した時点。validate が status: ok を返したことではない。
Passing unit tests and receiving valid CLI JSON are prerequisites, not real scenario verification. When the user asks for an operational check, create a real document-model.json, run render -> validate -> preview, provide the preview URL, and have the user confirm the rendered HTML in the browser. Verification is complete only after the browser-visible result is accepted.
最終応答には次を含める。
index.html と renderer-manifest.json の場所。validate の結果。stop_command。Final responses must include: HTML design choices, generated index.html and renderer-manifest.json paths, validation result, preview URL/bind/PID/stop_command, and any unperformed verification layers with reasons.
0.0.0.0 にbindしない。The renderer does not invent content decisions. Diagrams only support the provided structure. Do not open the browser automatically; return the URL. Never bind Preview Runtime to 0.0.0.0. Any external posting, upload, or service transmission requires the appropriate approval gate.
npx claudepluginhub u-ichi/reviewable-html-workbench --plugin reviewable-html-workbenchStructures requirements, design, architecture, decisions, and unresolved issues into a review-ready HTML design document. Processes review comments and replies within the HTML.
Create rich HTML documents for project specs, implementation plans, design exploration, RFCs, and brainstorming. Use whenever the user asks for a spec, plan, RFC, design doc, brainstorm, or wants to explore approaches/options/alternatives — even when they don't explicitly say "HTML". Strongly prefer HTML over markdown for any planning artifact longer than a screen, especially when the artifact will be shared with reviewers or fed back to the agent for implementation.
Generates or updates an HTML Preview from any Markdown document (PRD, Decision Brief, Tech Research, Design, or other) for visual review. Supports PRD mode (by feature name) and generic mode (by file path).