From notation-skills
notation(`repo-map v1` / `document-map v1` DSL)を、**DSL テキストだけ**を入力に、決定的に図へ変換する Skill。 Render a notation DSL (`repo-map v1` or `document-map v1`) into a deterministic diagram — input is the DSL text ONLY. 先頭行のバージョンで対応を分岐する(未知バージョンは描かず拒否)。 `parse → validate → layout → emit` の手順で、同じ DSL からは常に同じ図を出す。出力は HTML(既定・単一ファイルの インタラクティブ Viewer・クリック質問パネル付き・`data-*`+凡例)、任意で Mermaid。色・フォント・配置は固定テーマと固定アルゴリズムで決まり、 実行ごとにブレない。 次のような発話で起動する: 「この DSL を HTML にして」「repo-map を描画して」「document-map を描画して」「notation を可視化して」「地図を HTML で見せて」 「DSL を図にして」「repo-map v1 をレンダリングして」「document-map v1 をレンダリングして」「この記法を絵にして」「構造図を HTML で出力」 「出力された DSL を描いて」「同じ DSL なら同じ図にして」「凡例つきの HTML プレビューで」。 禁止(重要・本文でも再掲): 入力された DSL 以外(自然言語の要望・口頭のレイアウト・リポジトリの再走査)から 図を描かないこと。DSL が無ければ描かず、不足や矛盾は `repo-map-notation` に差し戻すこと。 同じ DSL から毎回異なるレイアウトを出さないこと。
How this skill is triggered — by the user, by Claude, or both
Slash command
/notation-skills:notation-renderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
入力された **notation の DSL テキストだけ**を読み、**決定的に**図へ変換する。受け付ける notation は **`repo-map v1` と `document-map v1`**。先頭のバージョン行で対応を分岐し、未知バージョンは描かず拒否する。設計の土台は [notation-core](../notation-core/SKILL.md)、文法・検証の正本は各 DSL の grammar.md([repo-map](../repo-map-notation/references/grammar.md) / [document-map](../document-map-notation/references/grammar.md))。この Skill はそれらを**再定義せず参照する**。両 DSL は 1 本のパイプラインを共有し、版差(列挙・色・s...
examples/document-map-a.dslexamples/document-map-a.htmlexamples/document-map-a.jsonexamples/document-map-b.dslexamples/document-map-c.dslexamples/example-a.dslexamples/example-a.htmlexamples/example-a.jsonexamples/example-b.dslexamples/invalid.diagnostics.txtexamples/invalid.dslexamples/layout-demo.dslexamples/layout-demo.jsonreferences/layout-algorithm.mdreferences/output-formats.mdreferences/render-contract.mdreferences/theme.mdscripts/README.mdscripts/attrs.mjsscripts/build-gallery.mjs入力された notation の DSL テキストだけを読み、決定的に図へ変換する。受け付ける notation は repo-map v1 と document-map v1。先頭のバージョン行で対応を分岐し、未知バージョンは描かず拒否する。設計の土台は notation-core、文法・検証の正本は各 DSL の grammar.md(repo-map / document-map)。この Skill はそれらを再定義せず参照する。両 DSL は 1 本のパイプラインを共有し、版差(列挙・色・scope メタキー・depth×kind)は scripts/profiles.mjs のプロファイルで切り替える。
主経路は、LLM が HTML 本文を書き起こすのではなく、同梱の実行可能レンダラー scripts/render_repo_map.mjs を実行すること。 これにより parse → validate → layout → emit がコードで機械的に走り、同じ DSL からは毎回同じ HTML/JSON が出る(下記「スクリプト」)。
# repo-map v1 または # document-map v1 のテキスト。バージョン行で対応を分岐し、未知バージョン(v2 等)は描かず拒否する(E-BADVERSION/E-NOVERSION)。parse → validate → layout → emit
RepoMap にする(grammar.md §4)。@layout の rank/group を尊重し、無い/部分のところは決定的アルゴリズムで配置する(references/layout-algorithm.md)。このパイプラインは 実行可能なレンダラーとして scripts/ に実装されている。可能な場合は、LLM が HTML 本文を考えて書くのではなく、このスクリプトを実行する。
node skills/notation-render/scripts/render_repo_map.mjs input.repo-map --format html > out.html
cat input.repo-map | node skills/notation-render/scripts/render_repo_map.mjs - --format json
--format html|json|mermaid(既定 html)。json は parse/validate/layout 後の内部モデル確認用。-(stdin)。出力は stdout、診断は stderr。終了コード: 0 正常 / 1 検証エラー(描画しない)/ 2 使用法エラー。node --test skills/notation-render/tests/。references/*.md と grammar.md の実装であり、正本を新設しない。挙動と仕様が食い違ったら .md を正とし、スクリプトを直す。入力例とスナップショットは examples/(example-a.dsl + 期待 HTML/JSON、layout-demo.dsl、invalid.dsl)。
data-* 属性+質問パネル+固定スクリプト)を載せる。決定的(同じ DSL → 同じ HTML)。data-* スキーマは repo-map-interactive-viewer/references/html-viewer-contract.md を参照。Claude Code CLI 呼び出し・Python ブリッジは repo-map-interactive-viewer の責務(ここでは出さない)。graph TD への機械的変換。Mermaid は正本にしない(レイアウトは Mermaid 任せになり決定性の対象外)。Figma API / Figma Skill は使わない。出力先として人が後から HTML を貼るのは自由だが、この Skill は Figma を描画経路にしない。詳細は references/output-formats.md。
@layout(rank / group)を尊重する。@layout が無い/部分的なときの既定: ランク順のレイヤー配置(上から下)。階層系の関係(contains/deploys/owns)からランクを決め、同じ group は横にクラスタする。入力契約の裏返しとして、次をしてはならない。
repo-map-notation へ)。repo-map-notation に差し戻す。描画側はリポジトリを読まない。| ファイル | 中身 | いつ読む |
|---|---|---|
| references/render-contract.md | 受付 notation・バージョン分岐・パイプライン・検証ゲート | 入力の扱いを決めるとき |
| references/layout-algorithm.md | 決定的レイアウト(rank / group / 座標) | 配置を出すとき |
| references/theme.md | テーマ定数(kind ごとの色・フォント・固定 hex) | 色・文字体裁を出すとき |
| references/output-formats.md | HTML / Mermaid の出し方、Figma 不使用 | 形式を選ぶとき |
| scripts/README.md + scripts/ | 実行可能レンダラー本体(parser/validator/layout/emitter/CLI)と使い方 | 図を実際に生成するとき(主経路) |
repo-map v1 DSL の供給元。不足は必ずここへ差し戻す。document-map v1 DSL の供給元。不足は必ずここへ差し戻す。data-* の契約はここが正本。Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub hirokita117/notation-skills --plugin notation-skills