jpskill.com
🎨 デザイン コミュニティ

arch-diagrams

Diagrams: C4 model, PlantUML, Mermaid, sequence diagrams, ERDs, infrastructure diagrams

⚡ おすすめ: コマンド1行でインストール(60秒)

下記のコマンドをコピーしてターミナル(Mac/Linux)または PowerShell(Windows)に貼り付けてください。 ダウンロード → 解凍 → 配置まで全自動。

🍎 Mac / 🐧 Linux
mkdir -p ~/.claude/skills && cd ~/.claude/skills && curl -L -o arch-diagrams.zip https://jpskill.com/download/22269.zip && unzip -o arch-diagrams.zip && rm arch-diagrams.zip
🪟 Windows (PowerShell)
$d = "$env:USERPROFILE\.claude\skills"; ni -Force -ItemType Directory $d | Out-Null; iwr https://jpskill.com/download/22269.zip -OutFile "$d\arch-diagrams.zip"; Expand-Archive "$d\arch-diagrams.zip" -DestinationPath $d -Force; ri "$d\arch-diagrams.zip"

完了後、Claude Code を再起動 → 普通に「動画プロンプト作って」のように話しかけるだけで自動発動します。

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して arch-diagrams.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → arch-diagrams フォルダができる
  3. 3. そのフォルダを C:\Users\あなたの名前\.claude\skills\(Win)または ~/.claude/skills/(Mac)へ移動
  4. 4. Claude Code を再起動

⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。

🎯 このSkillでできること

下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。

📦 インストール方法 (3ステップ)

  1. 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
  2. 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
  3. 3. 展開してできたフォルダを、ホームフォルダの .claude/skills/ に置く
    • · macOS / Linux: ~/.claude/skills/
    • · Windows: %USERPROFILE%\.claude\skills\

Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。

詳しい使い方ガイドを見る →
最終更新
2026-05-18
取得日時
2026-05-18
同梱ファイル
1

📖 Skill本文(日本語訳)

※ 原文(英語/中国語)を Gemini で日本語化したものです。Claude 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

arch-diagrams

目的

このスキルは、OpenClawがC4 model、PlantUML、Mermaid、シーケンス図、ERD、インフラ図などのツールを使用して、アーキテクチャ図を生成、編集、レンダリングすることを可能にします。システム設計を視覚化するための図作成をコーディングワークフローに統合します。

使用する場面

このスキルは、ソフトウェアアーキテクチャの文書化、システムインタラクションの計画、またはERDやシーケンスフローの視覚補助の作成時に使用します。設計フェーズ、コードレビュー、またはインフラ設定での共同作業時に適用し、テキスト記述から図を迅速にプロトタイプ化します。

主な機能

  • 高レベルの記述からC4図を生成します。
  • PlantUMLコードをSVGまたはPNG出力にレンダリングします。
  • フローチャート、シーケンス、ERD用のMermaid図を作成します。
  • AWSや汎用クラウドアイコンなどのツールでインフラ図をサポートします。
  • ソースコード(例:PlantUML構文)を解析および変更して、既存の図を編集します。
  • ドキュメントに含めるために、図をコードスニペットまたは画像ファイルとしてエクスポートします。

使用パターン

タスクを達成するには、明確なテキスト記述または部分的な図コードをOpenClawに提供し、次に図の種類を指定します。例えば、JSON設定のような入力でCLIまたはAPIを介してスキルを呼び出します。常に「データベースを持つWebアプリのC4コンテナ図を生成してください」のようなコンテキストを含めてください。生成、レビュー、改良のようにコマンドを連鎖させることで反復処理を扱います。操作前に$OPENCLAW_API_KEYを設定するなど、認証には環境変数を使用します。

一般的なコマンド/API

直接実行にはOpenClaw CLIを、プログラムによるアクセスにはAPIを使用します。環境内の$OPENCLAW_API_KEYで認証します。

  • CLIコマンド: openclaw arch-diagrams generate --type mermaid --input "sequenceDiagram: A->B: Request" --output diagram.md これは入力文字列からMermaidシーケンス図を生成し、ファイルに保存します。

  • APIエンドポイント: /api/v1/arch-diagrams/generateへのPOST(JSONボディ付き): {"type": "plantuml", "description": "@startuml\nAlice -> Bob: Hello\n@enduml", "format": "svg"} レスポンスにはレンダリングされたSVGが含まれます。認証にはHTTPヘッダーで処理します。

  • 設定形式: 入力にはYAMLを使用します。例:

    type: c4
    elements:
      - name: System
        type: container

    これをCLIフラグ--config path/to/config.yamlで渡します。

  • コードスニペット (Python):

    import requests
    response = requests.post('https://api.openclaw.ai/api/v1/arch-diagrams/generate', json={"type": "erd", "input": "User has many Posts"}, headers={'Authorization': f'Bearer {os.environ["OPENCLAW_API_KEY"]}'})
    print(response.json()['output'])

統合に関する注意

このスキルをIDE拡張機能(例:OpenClaw用VS Codeプラグイン)やCI/CDパイプラインに追加することで、ワークフローに統合します。例えば、GitHub Actionsでは次のように使用します: run: openclaw arch-diagrams generate --type sequence --input ./specs.md && echo '::set-output name=diagram::$(cat diagram.md)'$OPENCLAW_API_KEYを環境のシークレットとして設定します。他のスキルと組み合わせる場合は、出力をパイプします。例えば、コード分析結果から図を生成します。OpenClaw CLI v2.5+のようにバージョンを指定して互換性を確保します。

エラー処理

常にレスポンスコードまたはCLI終了ステータスを解析してエラーを確認してください。無効な入力の場合、OpenClawは「Invalid PlantUML syntax: missing @enduml」のような詳細を含むHTTP 400を返します。ネットワークの問題は、指数関数的バックオフで再試行することで処理します。例えば、コードではif response.status_code == 503: time.sleep(5); retry()のようにします。送信前に、図の種類が["c4", "mermaid", "plantuml", "sequence", "erd"]のいずれかであることを確認するなど、入力を検証します。API呼び出しにはtry-exceptブロックを使用します。例:

try:
    result = requests.post(url, json=data)
    result.raise_for_status()
except requests.exceptions.HTTPError as e:
    print(f"Error: {e.response.text} - Fix input and retry")

具体的な使用例

  1. C4システム図の生成: シンプルなWebアプリケーションを視覚化するには、次を実行します: openclaw arch-diagrams generate --type c4 --input "System: WebApp with Database and API" --output c4_diagram.puml。これはC4システムコンテキスト図のPlantUMLファイルを生成します。openclaw arch-diagrams edit --file c4_diagram.puml --add "Container: Frontend"を追加してレビューおよび改良します。

  2. データベーススキーマのERD作成: 関係をモデリングするには、次を使用します: openclaw arch-diagrams generate --type erd --input '{"entities": [{"name": "User", "attributes": ["id", "name"]}, {"name": "Post", "attributes": ["id", "content"]}]}' --output erd.mmd。これはMermaid ERDコードを出力し、Markdownファイルでレンダリングできます。

グラフの関係

  • C4図では: 「SystemはExternal Systemに依存する」、「ContainerはComponentを使用する」。
  • シーケンス図では: 「ActorはObjectにメッセージを送信する」、「ObjectはActorに応答を返す」。
  • ERDでは: 「Entityは別のEntityと一対多の関係を持つ」、「AttributeはEntityに属する」。
  • インフラ図では: 「ServerはDatabaseに接続する」、「Load BalancerはServiceにルーティングする」。
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

arch-diagrams

Purpose

This skill allows OpenClaw to generate, edit, and render architecture diagrams using tools like C4 model, PlantUML, Mermaid, sequence diagrams, ERDs, and infrastructure diagrams. It integrates diagram creation into coding workflows for visualizing system designs.

When to Use

Use this skill when documenting software architecture, planning system interactions, or creating visual aids for ERDs and sequence flows. Apply it during design phases, code reviews, or when collaborating on infrastructure setups to quickly prototype diagrams from text descriptions.

Key Capabilities

  • Generate C4 diagrams from high-level descriptions.
  • Render PlantUML code into SVG or PNG outputs.
  • Create Mermaid diagrams for flowcharts, sequences, and ERDs.
  • Support infrastructure diagrams with tools like AWS or generic cloud icons.
  • Edit existing diagrams by parsing and modifying source code (e.g., PlantUML syntax).
  • Export diagrams as code snippets or image files for inclusion in docs.

Usage Patterns

To accomplish tasks, provide a clear text description or partial diagram code to OpenClaw, then specify the diagram type. For example, invoke the skill via CLI or API with inputs like JSON configs. Always include context, such as "Generate a C4 container diagram for a web app with a database." Handle iterations by chaining commands, e.g., generate, review, and refine. Use environment variables for authentication, like setting $OPENCLAW_API_KEY before operations.

Common Commands/API

Use the OpenClaw CLI for direct execution or API for programmatic access. Authenticate with $OPENCLAW_API_KEY in your environment.

  • CLI Command: openclaw arch-diagrams generate --type mermaid --input "sequenceDiagram: A->B: Request" --output diagram.md This generates a Mermaid sequence diagram from the input string and saves it to a file.

  • API Endpoint: POST to /api/v1/arch-diagrams/generate with JSON body: {"type": "plantuml", "description": "@startuml\nAlice -> Bob: Hello\n@enduml", "format": "svg"} Response includes the rendered SVG; handle with HTTP headers for authentication.

  • Config Format: Use YAML for inputs, e.g.,

    type: c4
    elements:
      - name: System
        type: container

    Pass this via CLI flag: --config path/to/config.yaml.

  • Code Snippet (Python):

    import requests
    response = requests.post('https://api.openclaw.ai/api/v1/arch-diagrams/generate', json={"type": "erd", "input": "User has many Posts"}, headers={'Authorization': f'Bearer {os.environ["OPENCLAW_API_KEY"]}'})
    print(response.json()['output'])

Integration Notes

Integrate this skill into your workflow by adding it to IDE extensions (e.g., VS Code plugin for OpenClaw) or CI/CD pipelines. For example, in a GitHub Action, use: run: openclaw arch-diagrams generate --type sequence --input ./specs.md && echo '::set-output name=diagram::$(cat diagram.md)'. Set $OPENCLAW_API_KEY as a secret in your environment. When combining with other skills, pipe outputs; e.g., generate a diagram from code analysis results. Ensure compatibility by specifying versions, like OpenClaw CLI v2.5+.

Error Handling

Always check for errors by parsing response codes or CLI exit statuses. For invalid inputs, OpenClaw returns HTTP 400 with details like "Invalid PlantUML syntax: missing @enduml". Handle network issues by retrying with exponential backoff, e.g., in code: if response.status_code == 503: time.sleep(5); retry(). Validate inputs before sending, such as ensuring diagram types are from ["c4", "mermaid", "plantuml", "sequence", "erd"]. Use try-except blocks for API calls, e.g.,

try:
    result = requests.post(url, json=data)
    result.raise_for_status()
except requests.exceptions.HTTPError as e:
    print(f"Error: {e.response.text} - Fix input and retry")

Concrete Usage Examples

  1. Generate a C4 System Diagram: To visualize a simple web application, run: openclaw arch-diagrams generate --type c4 --input "System: WebApp with Database and API" --output c4_diagram.puml. This produces a PlantUML file for a C4 system context diagram. Review and refine by adding: openclaw arch-diagrams edit --file c4_diagram.puml --add "Container: Frontend".

  2. Create an ERD for a Database Schema: For modeling relationships, use: openclaw arch-diagrams generate --type erd --input '{"entities": [{"name": "User", "attributes": ["id", "name"]}, {"name": "Post", "attributes": ["id", "content"]}]}' --output erd.mmd. This outputs a Mermaid ERD code, which you can render in Markdown files.

Graph Relationships

  • In C4 diagrams: "System depends on External System", "Container uses Component".
  • In Sequence diagrams: "Actor sends message to Object", "Object returns response to Actor".
  • In ERDs: "Entity has one-to-many relationship with another Entity", "Attribute belongs to Entity".
  • In Infrastructure diagrams: "Server connects to Database", "Load Balancer routes to Service".