xs-diagram-generator
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "xs-diagram-generator" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-a724f1318c83d243bf92f561e793e8018ecc9904866deab78348f0d7a801d725. Verify the upstream source and version against https://github.com/karaage0703/ai-assistant-workspace before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
A skill that automatically chooses the best chart type based on content and generates images or code. It supports local image generation (Pillow) or outputting Mermaid/PlantUML code, and can produce flowcharts, architecture diagrams, hierarchies, etc., for documentation and system design use cases.
Introduction source: third_party · karaage0703 · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Limits and differences
- Translation pending; see source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: xs-diagram-generator
description: 内容に応じて最適な図表形式を自動選択し、ローカルで画像生成(Pillow)またはコード出力(Mermaid/PlantUML)。フローチャート、アーキテクチャ図、階層図などを生成。資料作成、システム設計時に使用。スマート図表生成支援
内容に応じて最適な図表形式を自動選択し、画像を生成する。
判断フロー
Mermaidコードがすでにある?
├─ YES → Docker mermaid-cli で画像化(最優先)
└─ NO → 内容に応じて選択
├─ フロー/シーケンス → Mermaidコード作成 → Docker mermaid-cli
└─ アーキテクチャ/階層 → Pillow(uv run)で直接生成
1. Mermaid → 画像化(Docker mermaid-cli)
Mermaidコードがある場合はこれを最優先で使う。
# 1. Mermaidファイルを作成
cat > /tmp/diagram.mmd << 'EOF'
flowchart TB
A[開始] --> B[処理]
B --> C{判断}
C -->|Yes| D[完了]
C -->|No| B
EOF
# 2. Docker版 mermaid-cli で画像生成
docker run --rm -u $(id -u):$(id -g) \
-v /tmp:/data \
minlag/mermaid-cli \
-i /data/diagram.mmd -o /data/diagram.png -b white
ポイント:
-u $(id -u):$(id -g)でパーミッション問題を回避-b whiteで白背景(スライド向け)- 日本語・絵文字も表示可能
- SVG出力:
-o /data/diagram.svg
⚠️ Mermaid記法の注意(よく間違えるやつ)
改行は <br> を使う! \n は使わない!
# NG(\n がそのまま表示される)
A["Gateway\nRust / Axum"]
# OK(ちゃんと改行される)
A["Gateway<br>Rust / Axum"]
subgraphのタイトルが長いと途中で改行される:
- タイトルは短くする(15文字以内推奨)
- 補足は中のノードに書く
線の交差を減らすコツ:
direction LR/direction TBをsubgraph内で使い分ける- 関連するノードを近くに配置する
- 包含関係はsubgraphのネストで表現する(矢印より明確)
subgraphのネスト例(包含関係の表現):
subgraph outer["親システム"]
subgraph inner["子システム"]
A["コンポーネントA"]
end
B["コンポーネントB"] --> A
end
複数ファイルを一括変換
for f in /tmp/*.mmd; do
docker run --rm -u $(id -u):$(id -g) \
-v /tmp:/data \
minlag/mermaid-cli \
-i /data/$(basename "$f") -o /data/$(basename "$f" .mmd).png -b white
done
2. Pillow で直接画像生成(uv run)
Mermaidを経由せず、直接画像を生成したい場合に使用。
スクリプト実行
uv run --with pillow python [SKILL_DIR]/draw_diagram.py <type> -o <output.png> -d '<json>'
対応する図の種類
アーキテクチャ図 (architecture)
uv run --with pillow python [SKILL_DIR]/draw_diagram.py architecture \
-o /tmp/arch.png -d '{
"title": "システム構成",
"boxes": [
{"id": "api", "label": "API Server", "color": "blue", "row": 0, "col": 1},
{"id": "db", "label": "Database", "sublabel": "PostgreSQL", "color": "green", "row": 1, "col": 0},
{"id": "cache", "label": "Cache", "sublabel": "Redis", "color": "orange", "row": 1, "col": 2}
],
"arrows": [
{"from": "api", "to": "db", "label": "query"},
{"from": "api", "to": "cache", "label": "read/write"}
]
}'
パラメータ:
boxes[].id: 識別子(矢印の接続に使用)boxes[].label: メインラベルboxes[].sublabel: サブラベル(オプション)boxes[].color: blue/orange/purple/green/red/gray/tealboxes[].row,boxes[].col: グリッド位置arrows[].from,arrows[].to: 接続元・先の idarrows[].label: 矢印のラベル(オプション)
フローチャート (flowchart)
uv run --with pillow python [SKILL_DIR]/draw_diagram.py flowchart \
-o /tmp/flow.png -d '{
"title": "ユーザー登録フロー",
"steps": [
{"id": "s1", "label": "開始", "type": "start"},
{"id": "s2", "label": "フォーム入力", "type": "process"},
{"id": "s3", "label": "バリデーション", "type": "decision"},
{"id": "s4", "label": "DB保存", "type": "process"},
{"id": "s5", "label": "完了", "type": "end"}
],
"connections": [
{"from": "s1", "to": "s2"},
{"from": "s2", "to": "s3"},
{"from": "s3", "to": "s4", "label": "OK"},
{"from": "s4", "to": "s5"}
]
}'
ステップの type: start(緑)/ end(赤)/ process(青)/ decision(オレンジ)
階層図 (hierarchy)
uv run --with pillow python [SKILL_DIR]/draw_diagram.py hierarchy \
-o /tmp/org.png -d '{
"title": "組織図",
"root": {
"label": "CEO",
"color": "purple",
"children": [
{"label": "CTO", "color": "blue", "children": [
{"label": "Dev Team", "color": "green"},
{"label": "Infra Team", "color": "green"}
]},
{"label": "CFO", "color": "orange", "children": [
{"label": "Finance", "color": "gray"}
]}
]
}
}'
利用可能な色
| 色名 | 用途の目安 |
|---|---|
blue |
技術系、API、サーバー |
green |
正常系、開始、データベース |
orange |
条件分岐、警告、キャッシュ |
purple |
重要、トップレベル |
red |
終了、エラー、削除 |
gray |
補助、外部システム |
teal |
その他 |
使用例
Mermaidコードを画像化したい場合
「このMermaidを画像にして」
→ .mmdファイルに保存 → docker mermaid-cli → PNG送信
ゼロから図を作りたい場合
「APIサーバー、DB、キャッシュの構成図を作って」
→ Pillow architecture で JSON 生成 → uv run → PNG送信
「ユーザー登録の流れをフローチャートにして」
→ Mermaidコード作成 → docker mermaid-cli → PNG送信
⚠️ 注意事項
- ローカル mermaid-cli (npx): ARM64環境ではPuppeteerが動作しないため非推奨。Docker版を使うこと。
- Mermaid記法の落とし穴は上の「⚠️ Mermaid記法の注意」セクションを参照
Version history
-
v0.2.2
GitHub ↗
Original release notes
## 変更内容 AIアシスタントの行動指示と既存スキルを、特定のユーザー・マシン・チャットサービスに依存しない形で改善しました。 - 会話再開時は提供済みの文脈を優先し、不足分だけを取得。許可範囲と根拠確認のルールを整理 - 開発手順に初期状態からの検証、ローカルとCIの分担、マージ・配備・再起動の区別を追加 - 原因調査と修正を分離し、回復記録と証拠に基づく再発判定を追加 - リポジトリ分析でGitHubの現行HEADとDeepWikiの索引commitを比較 - 複数AI実行時のGrok設定を分離し、既存の読み取り制限と成果物検証を維持 - スキル改善時の全項目監査と関連ファイルの整合確認を追加 - メモ・日記はローカル保存と読み戻しで完了し、Git同期・Notion保存は任意に整理 - ニュースのRSS全量取得、記事本文・日時・重複の確認、注目記事の選定理由を追加 各手順に対応するREADMEとスキル一覧も更新しています。 ## 検証と留意点 複数AIの回帰テストとGrok設定分離の追加テスト、文書・リンク・構文検査、ニュース取得例の正常応答・空応答・HTTPエラー確認を実施しました。 実CLIの疎通はCursor・Antigravityが成功しました。Codexは確認失敗、Claudeは認証期限切れ、Grokは前置き付き回答により厳密なトークン一致の判定では不合格でした。Grokは別途通常のファイル読み取りで成功を確認しています。文書手順全体と実ニュース要約の通し確認は未実施です。 ## 含まれるPull Request - #24 改善: 行動指示と既存スキルの汎用的な運用手順を更新 ## 完全な変更履歴 <https://github.com/karaage0703/ai-assistant-workspace/compare/v0.2.1...v0.2.2>
-
v0.2.1
GitHub ↗
Original release notes
## 変更内容 - `trigger.yaml` と `handler.sh` で構成される簡易スキルTriggerを削除 - 同梱していた `technews` / `weather` のTriggerを削除 - READMEとAGENTS.mdから簡易スキルTriggerの案内を削除 ## 維持する機能 - 長時間処理の完了通知に使う `xangi tool trigger` - scheduler - Local LLMの各モード - `skills/` のスキル機構 ## 含まれるPull Request - #23 簡易スキルTriggerを削除 ## 完全な変更履歴 <https://github.com/karaage0703/ai-assistant-workspace/compare/v0.2.0...v0.2.1>
-
v0.2.0
GitHub ↗
Original release notes
## 主な変更 ### xangiの現行仕様へ対応 - xangiの導入・ワークスペース選択を`xangi setup`へ一本化 - secret設定をローカルの`xangi settings`から行う安全な導線へ更新 - AI向けコマンドを`xangi tool`形式へ移行 - Web UIの公式Extensionカタログからxangi-searchを追加する手順を推奨導線として追加 ### 検索基盤をxangi-searchへ移行 - 同梱していた`xs-workspace-rag`とRAGトリガーを削除 - ワークスペース検索は外部Extensionのxangi-searchを推奨 - xangi-search未導入時は通常のファイル読み取り・文字列検索で利用可能 - AI CLIから直接使う構成も補足導線として維持 ### ワークスペースを汎用化 - 初回設定、記憶、長時間処理、公開操作の安全ルールを整理 - runtime stateや検索indexを公開リポジトリへ混入させないignore設定を追加 - xangi本体とワークスペースの責務を分離し、重複していたオンボーディングを削除 ### multi-agent運用を改善 - Codex、Claude、Grok、Cursor、Antigravityなど、実際に利用できるAIだけを検出して使用 - 読み取り専用実行、空応答・途中終了の除外、provider familyの検証を追加 - 外部AIが利用できない場合も、現在のAIセッションだけで処理を継続 - GitHubへのレビュー投稿は自動実行せず、明示的な確認後に行う構成へ変更 ## 移行時の注意 - `skills/xs-workspace-rag/`と`triggers/rag/`は削除されました - RAGを利用していた場合は、xangi Web UIの「拡張」からxangi-searchを追加してください - 旧`.workspace_rag/`は誤公開防止のため引き続きignoreされます ## 含まれるPull Request - #17 borot運用知見をワークスペースに反映 - #18 ワークスペース初期設定を汎用化 - #19 workspace-RAGの過去文書ランキングを修正 - #20 xangiオンボーディングを本体setupへ統合 - #21 multi-agentとworkspace-RAGを任意機能として汎用化 - #22 xangi仕様への追従と検索基盤の移行 ## 完全な変更履歴 <https://github.com/karaage0703/ai-assistant-workspace/compare/v0.1.0...v0.2.0>
-
v0.1.0
GitHub ↗
Original release notes
## What's Changed * ワークスペースをアップデート by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/1 * fix: 未定義変数を相対パスに置換、README更新 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/3 * feat: 自発的おしゃべりスキル(spontaneous-talk)を追加 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/2 * feat: スキル群をアップデート(xs:統一・内容充実化・scripts整理) by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/4 * feat: arxiv・code-reviewer スキルを追加 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/5 * feat: MEMORY.md長期記憶の追加 & スキルドキュメント更新 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/6 * feat: workspace-ragバグ修正・改善 & google-workspace & triggers追加 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/7 * fix: !discord/!schedule統一 + skill-creator強化 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/8 * feat: 汎用スキル3つ追加 + トリガー(rag/technews/weather)README整備 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/9 * notion-manager個別ブロック編集 + skill-creatorプロンプト設計原則 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/10 * notion-manager: テキスト系MIME追加と20MB超のmulti-part upload対応 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/11 * feat: なぜなぜ分析(xangi-kaizen)スキルを追加 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/12 * skills: workspace-rag/notion-manager/arxiv を強化 + xangi-onboarding 新設 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/13 * feat(xangi-onboarding): 3モード対応 + 上級スタックチャン連動 + コンテキスト分割 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/14 * xangi-kaizen と開発ワークフローを公開向けに更新 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/15 * スキル名を xs- プレフィックスに統一 by @karaage0703 in https://github.com/karaage0703/ai-assistant-workspace/pull/16 ## New Contributors * @karaage0703 made their first contribution in https://github.com/karaage0703/ai-assistant-workspace/pull/1 **Full Changelog**: https://github.com/karaage0703/ai-assistant-workspace/commits/v0.1.0
Current listing version
0.0.1
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 支持多种图表类型(流程图、架构图、层级图)
- 提供本地生成和代码输出两种模式
- 适用于资料制作和系统设计等高频场景
Highlights
- 触发词覆盖全面(Mermaid、Pillow、架构图、流程图等)
- 边界清晰,区分了已有代码和从零生成的不同场景
Highlights
- Phase划分清晰(Mermaid→图片化、Pillow直接生成)
- 提供完整的端到端示例
- frontmatter完整,单文件结构合理
Highlights
- 工具来源明确(Docker mermaid-cli、uv run)
- 参数说明详细,覆盖主要异常处理
- 提供了权限处理和批处理方案
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 215
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.