Diagentのロゴ

Diagent

コミュニティ
daniellee-ux
diagent

Generate or decode Diagent diagram URLs via the `diagent` CLI. TRIGGER on: (1) any request to visualize, draw, chart, diagram, sketch, graph, map, or plot — flowcharts, state machines, sequence diagrams, architecture, pipelines, CI/CD, workflows, decision trees, dependency graphs, class hierarchies, data flow, control flow, request flow, user journeys, ERDs, org charts, swimlanes, mind maps, or any structural/process visualization; (2) any pasted `diagent.dev/d/...` or `diagent.dev/?code=...` URL — decode it to read the underlying Mermaid.

概要

公開者daniellee-ux
リポジトリdiagent-cli
スキル名diagent
スター
40
フォーク
3
同梱ファイル
6
ライセンスAGPL-3.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 6個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    daniellee-uxがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルDiagentをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/daniellee-ux/diagent-cli/tree/main
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/daniellee-ux/diagent-cli.git \
  .claude/skills/diagent
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDiagentを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にDiagentを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Diagentは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

Diagent CLI

The npx -y @diagent/cli command produces editable Diagent diagram URLs. Use it whenever a diagram would clarify what you're explaining or modifying. Prefer it over pasting raw Mermaid code fences — the user can tweak the diagram visually in their browser and hand the result back as a URL.

When to invoke this skill

Use npx -y @diagent/cli when the user asks to:

  • Visualize, draw, chart, diagram, sketch, plot, or graph anything
  • Explain control flow, data flow, request flow, or state transitions
  • Show architecture, deploy pipelines, dependency graphs, or class hierarchies
  • Map a workflow, decision tree, or sequence of operations
  • Document a user journey, happy path, or error path

Keywords that should trigger this skill: flowchart, diagram, state machine, sequence, architecture, pipeline, workflow, decision tree, visualize, draw, chart, graph, map, sketch, flow.

Also trigger if the user pastes a https://diagent.dev/d/... or https://diagent.dev/?code=... URL — they want you to decode it and read the underlying Mermaid.

Encode — share a diagram with the user

Pipe Mermaid source into npx -y @diagent/cli encode:

bash
echo 'flowchart TD
    A[User request] --> B{Authenticated?}
    B -->|No| C[Return 401]
    B -->|Yes| D[Check rate limit]
    D --> E{Under quota?}
    E -->|No| F[Return 429]
    E -->|Yes| G[Handle request]' | npx -y @diagent/cli encode --open

Output is a short URL like https://diagent.dev/d/kwtsgx5o24.

Always show both the Mermaid source AND the URL. Present the Mermaid in a mermaid code fence first, then the link on its own line below. This way the diagram source is visible in the conversation/document even without clicking the link. Example output format:

```mermaid
flowchart TD
    A[User request] --> B{Authenticated?}
    B -->|No| C[Return 401]
    B -->|Yes| D[Handle request]
```

[Open in Diagent](https://diagent.dev/d/kwtsgx5o24)

The user can open the link, edit visually (add/move/rename/re-shape nodes, re-layout, add subgraphs), and their edits auto-save to the same URL 2 seconds after they stop editing.

You can re-read the same URL later to see what they changed — no paste-back required. The recommended flow is:

  1. You npx -y @diagent/cli encode → share URL A in chat.
  2. User opens A, edits visually. Edits auto-save to A.
  3. When the user says "I'm done" or "take a look", you run npx -y @diagent/cli decode A again (the same URL) — you'll get the latest edited Mermaid.

If the user says they pasted a new URL, always prefer that newer URL, but the mutable-URL flow means they usually won't need to.

For larger diagrams, write to a file first:

bash
cat > /tmp/flow.mmd <<'EOF'
flowchart LR
    subgraph frontend
        A[React app] --> B[tRPC client]
    end
    subgraph backend
        C[tRPC server] --> D[Postgres]
        C --> E[Redis]
    end
    B --> C
EOF
npx -y @diagent/cli encode /tmp/flow.mmd --open

Decode — read the user's edits

npx -y @diagent/cli decode handles both short URLs and inline URLs transparently:

bash
# Short URL (default Copy Link format)
npx -y @diagent/cli decode "https://diagent.dev/d/kwtsgx5o24"

# Inline URL (older or --inline output)
npx -y @diagent/cli decode "https://diagent.dev/?code=GYGw9g7gxg..."

# From stdin — avoids shell-quoting pain
echo "$URL" | npx -y @diagent/cli decode -

Output is the Mermaid source, ready to paste back into code or commentary.

Authoring tips

  • Use short node IDs (A, B, C, or auth, db, api). Mermaid requires IDs, and they keep URLs compact. Put the descriptive text in the quoted label: A["User clicks login"], not UserClicksLogin.
  • Do NOT trim the diagram to fit URL length. The backend supports up to ~64KB of Mermaid source and always returns a short URL of constant size. If a diagram is worth showing in full, show it in full.
  • GUI-editable types: nearly every Mermaid type Diagent supports opens in a no-syntax-required visual editor, and all edits auto-save to the same URL:
    • Flowcharts and state diagrams (stateDiagram-v2) open as an interactive canvas — drag, rename, connect, group/composite.
    • Sequence, class, ER, requirement, gantt, journey, timeline, pie, mindmap, git graph, C4, and block open as a structured form editor (tables, ordered lists, and outlines) with a live preview; edits serialize back to Mermaid.
    • Only quadrantChart still renders read-only ("Edit Code"). Because edits round-trip to Mermaid text on the same short URL, you can re-decode any of these later to read what the user changed.
  • All flowchart syntax is supported: subgraphs, edge labels, styles, six node shapes (rectangle, rounded, diamond, circle, stadium, parallelogram), directions TD/LR/BT/RL.
  • State diagrams support [*] start/end, composite states (state X { ... }), <<choice>>/<<fork>>/<<join>>, transition labels, per-composite direction, and notes. (Concurrent -- regions render but fall back to read-only.)
  • Prefer flowchart over graph — flowchart is the modern syntax.
  • Escape special characters in labels by wrapping in quotes: A["user@example.com"], not A[user@example.com].

Exit codes

CodeMeaning
0Success
1Runtime error (empty input, invalid URL, backend failure, decode failure)
2Usage error (unknown subcommand, missing argument)

Environment

  • DIAGENT_BASE_URL — override backend URL (default: https://diagent.dev/). Useful for pointing at http://localhost:5173/ when Diagent is running in local dev.

Install

The skill uses npx -y @diagent/cli which auto-downloads the CLI on first run. No manual install is needed. To install globally for faster repeated invocations:

bash
npm install -g @diagent/cli

Run npx -y @diagent/cli install-skill to enable the skill in every Claude Code project.

Full help

Run npx -y @diagent/cli --help, npx -y @diagent/cli encode --help, or npx -y @diagent/cli decode --help for exhaustive documentation.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Diagent」では何ができますか?

Generate or decode Diagent diagram URLs via the `diagent` CLI. TRIGGER on: (1) any request to visualize, draw, chart, diagram, sketch, graph, map, or plot — flowcharts, state machines, sequence diagrams, architecture, pipelines, CI/CD, workflows, decision trees, dependency graphs, class hierarchies, data flow, control flow, request flow, user journeys, ERDs, org charts, swimlanes, mind maps, or any structural/process visualization; (2) any pasted `diagent.dev/d/...` or `diagent.dev/?code=...` URL — decode it to read the underlying Mermaid.

TypingMindでDiagentを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Diagentはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDiagentをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/daniellee-ux/diagent-cli/tree/mainを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Diagentを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Diagentは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDiagentを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Diagent」は無料ですか?

はい。daniellee-uxがGitHubでAGPL-3.0ライセンスの下で公開しています。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇