jpskill.com
📦 その他 コミュニティ

graph-management

GraphOSのグラフをHTTP API経由で操作し、構成の確認やノードの検証、部分的な成功時にリトライを伴うグラフ変更を原子的に実行するSkill。

📜 元の英語説明(参考)

Inspect and mutate GraphOS graphs through HTTP APIs. Use when reading topology, validating node types/plugins, and applying atomic graph transactions with retries on partial success.

🇯🇵 日本人クリエイター向け解説

一言でいうと

GraphOSのグラフをHTTP API経由で操作し、構成の確認やノードの検証、部分的な成功時にリトライを伴うグラフ変更を原子的に実行するSkill。

※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。

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

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

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

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

💾 手動でダウンロードしたい(コマンドが難しい人向け)
  1. 1. 下の青いボタンを押して graph-management.zip をダウンロード
  2. 2. ZIPファイルをダブルクリックで解凍 → graph-management フォルダができる
  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 自身は原文を読みます。誤訳がある場合は原文をご確認ください。

GraphOS Skill: graph-management

HTTP-first API を介して GraphOS グラフを読み取り、変更するための、AI が操作可能なプロトコルです。

どのような時に使うか

  • グラフ構造、ノード間の関係、選択されたノードのコンテキストを検査します。
  • 書き込み操作の前に、利用可能なノードタイプを検証します。
  • 型スキーマが見つからない場合に、プラグインのランタイムステータスを確認します。
  • トランザクションのような動作で、一貫性のある変更バッチを適用します。

ランタイムのベース URL

デフォルトのローカルランタイム:

環境が異なるホストまたはポートを使用している場合は、それに応じてベース URL を置き換えてください。

API リファレンス

get_graph_description

計画と検証のために、グラフ全体のsnapshotを取得します。

  • メソッド: GET
  • パス: /api/graph/description
  • クエリ:
    • graphId?: string
  • 成功時のレスポンスに含まれるもの:
    • graph: id, name, nodeCount, edgeCount, rootNodeIds, leafNodeIds, selectedNodeId
    • nodes: AI に適したノードの説明
    • edges: エッジ ID を含むエッジリスト
    • adjacency: ノードごとの親/子 ID
    • aiSummary: 自然言語による要約
  • 代表的なエラー:
    • グラフが見つからない場合は 404

get_graph_node

1つのフォーカスノードとそのローカルコンテキスト(親と子)を取得します。

  • メソッド: GET
  • パス: /api/graph/node
  • クエリ:
    • graphId?: string
    • nodeId?: string
  • 動作:
    • nodeId が省略された場合、サーバーはグラフの同期された選択ノードにフォールバックします
  • 成功時のレスポンスに含まれるもの:
    • graph: id, name, selectedNodeId
    • selectedNode
    • parentNodes
    • childNodes
    • aiSummary: フォーカスメタデータ + naturalLanguage
  • 代表的なエラー:
    • nodeId が欠落しており、同期された選択ノードが存在しない場合は 400
    • グラフまたはノードが存在しない場合は 404

get_available_node_types

プラグインによって登録されたノードタイプスキーマをリストします。

  • メソッド: GET
  • パス: /api/node-types
  • クエリ: なし
  • 成功時のレスポンス:
    • ノードタイプ定義の配列 (type, description, properties, inTypes, outTypes)

get_plugins

プラグインのランタイムステータスをリストします。

  • メソッド: GET
  • パス: /api/plugins
  • クエリ: なし
  • 成功時のレスポンス:
    • プラグインステータスオブジェクトの配列:
      • name
      • status
      • error
      • nodeTypeCount

apply_graph_transaction

呼び出し元の視点から、グラフ操作のバッチをアトミックに適用します。

  • メソッド: POST
  • パス: /api/graph/apply
  • Body:
    • graphId?: string
    • ops: Operation[]

Operation スキーマ:

  • CREATE_NODE
    • metadata: { id, type, position: { x, y }, data? }
  • UPDATE_NODE
    • metadata: { id, data }
  • DELETE_NODE
    • metadata: { id }
  • CONNECT
    • metadata: { id, source, target, sourceHandle?, targetHandle? }
  • DISCONNECT
    • metadata: { id }

注:

  • ノードの検証は、登録されたノードタイプスキーマに対して実行されます
  • CONNECT には、ソースノードとターゲットノードが存在する必要があります
  • 重複するノード ID と重複するエッジは拒否されます
  • DISCONNECT はエッジ ID を使用します。通常は edge<idx><source>_<target> です

成功時のレスポンスに含まれるもの:

  • success, appliedCount, errorCount
  • applied: string[]
  • errors: { op, index, reason }[]
  • updated graph, nodes, edges
  • aiSummary

手順

ステップ 1: 制約と現在の状態の読み取り

  1. get_available_node_types を呼び出して、スキーマの制約を学習します。
  2. get_graph_description を呼び出して、トポロジ全体をキャプチャします。
  3. 1 つのノード領域で操作する場合は、get_graph_node を呼び出してローカルコンテキストを取得します。

完了チェック:

  • 必要なノードタイプが存在すること。
  • 正確なソース/ターゲット ID と予想されるデルタがわかっていること。

ステップ 2: トランザクションの計画

  1. 関連するすべての ops を含む、一貫性のある apply_graph_transaction リクエストを構築します。
  2. 依存関係が有効になるように ops を順序付けます (connect の前に create、delete の前に disconnect)。
  3. 繰り返し再試行できるように、ID を安定させ、決定論的に保ちます。

判断ポイント:

  • ノードタイプが見つからない場合は、書き込みを再試行する前に get_plugins を調べてください。
  • 編集によってデータが失われるリスクがある場合は、ops を意図した範囲のみに絞り込みます。

完了チェック:

  • トランザクションに必要な ops がすべて含まれており、冗長な変更がないこと。

ステップ 3: 適用と検証

  1. apply_graph_transaction を送信します。
  2. レスポンスから appliederrors を調べます。
  3. get_graph_description を再実行して、ポストステートを検証します。

判断ポイント:

  • 部分的に成功した場合は、バッチ全体を再生するのではなく、失敗した意図のみを再試行します。
  • 検証エラーが発生した場合は、再試行する前にノードスキーマに合わせてペイロードを修正します。

完了チェック:

  • グラフのトポロジが予想される変更後の状態と一致すること。
  • 未解決の重大なエラーが残っていないこと。

安全ルール

  • 多数のマイクロコールよりも、一貫性のある 1 つのトランザクションを優先します。
  • 送信する前に、ノードプロパティのペイロードをノードタイプの要件に対して検証します。
  • 破壊的な更新の場合は、最初に現在のグラフを調べて、意図した操作のみを含めます。
  • 部分的な成功を通常のこととして扱います。errors を確認し、失敗した意図のみを再試行します。

リクエストの例

例: グラフの読み取り

GET /api/graph/description?graphId=main

例: トランザクションの適用

POST /api/graph/apply Content-Type: application/json

{
  "graphId": "main",
  "ops": [
    {
      "op": "CREATE_NODE",
      "metadata": {
        "id": "n_fetch",
        "type": "http.request",
        "position": { "x": 120, "y": 80 },
        "data": {
          "properties": {
            "url": "https://example.com"
          }
        }
      }
    },
    {
      "op": "CONNECT",
      "metadata": {
        "id": "edge_manual_n_fetch_n2",
        "source": "n_fetch",
        "target": "n2"
      }
    }
  ]
}
📜 原文 SKILL.md(Claudeが読む英語/中国語)を展開

GraphOS Skill: graph-management

AI-operable protocol for reading and mutating GraphOS graphs through HTTP-first APIs.

When to Use

  • Inspect graph structure, node relations, and selected-node context.
  • Validate available node types before write operations.
  • Check plugin runtime status when type schemas appear missing.
  • Apply coherent mutation batches with transaction-like behavior.

Runtime Base URL

Default local runtime:

If your environment uses a different host or port, replace the base URL accordingly.

API Reference

get_graph_description

Get a full graph snapshot for planning and verification.

  • Method: GET
  • Path: /api/graph/description
  • Query:
    • graphId?: string
  • Success response includes:
    • graph: id, name, nodeCount, edgeCount, rootNodeIds, leafNodeIds, selectedNodeId
    • nodes: AI-friendly node descriptions
    • edges: edge list with edge ids
    • adjacency: parent/child ids per node
    • aiSummary: natural language summary
  • Typical errors:
    • 404 if graph is not found

get_graph_node

Get one focus node and its local context (parents and children).

  • Method: GET
  • Path: /api/graph/node
  • Query:
    • graphId?: string
    • nodeId?: string
  • Behavior:
    • if nodeId is omitted, server falls back to the graph synced selected node
  • Success response includes:
    • graph: id, name, selectedNodeId
    • selectedNode
    • parentNodes
    • childNodes
    • aiSummary: focus metadata + naturalLanguage
  • Typical errors:
    • 400 if nodeId missing and no synced selected node exists
    • 404 if graph or node does not exist

get_available_node_types

List node type schemas registered by plugins.

  • Method: GET
  • Path: /api/node-types
  • Query: none
  • Success response:
    • array of node type definitions (type, description, properties, inTypes, outTypes)

get_plugins

List plugin runtime status.

  • Method: GET
  • Path: /api/plugins
  • Query: none
  • Success response:
    • array of plugin status objects:
      • name
      • status
      • error
      • nodeTypeCount

apply_graph_transaction

Apply a batch of graph operations atomically from the caller perspective.

  • Method: POST
  • Path: /api/graph/apply
  • Body:
    • graphId?: string
    • ops: Operation[]

Operation schema:

  • CREATE_NODE
    • metadata: { id, type, position: { x, y }, data? }
  • UPDATE_NODE
    • metadata: { id, data }
  • DELETE_NODE
    • metadata: { id }
  • CONNECT
    • metadata: { id, source, target, sourceHandle?, targetHandle? }
  • DISCONNECT
    • metadata: { id }

Notes:

  • node validation runs against registered node type schema
  • CONNECT requires source and target nodes to exist
  • duplicate node ids and duplicate edges are rejected
  • DISCONNECT uses edge id, typically edge<idx><source>_<target>

Success response includes:

  • success, appliedCount, errorCount
  • applied: string[]
  • errors: { op, index, reason }[]
  • updated graph, nodes, edges
  • aiSummary

Procedure

Step 1: Read Constraints and Current State

  1. Call get_available_node_types to learn schema constraints.
  2. Call get_graph_description to capture full topology.
  3. If operating on one node area, call get_graph_node for local context.

Completion check:

  • Required node types are present.
  • You know exact source/target ids and expected deltas.

Step 2: Plan the Transaction

  1. Build one coherent apply_graph_transaction request with all related ops.
  2. Order ops so dependencies are valid (create before connect, disconnect before delete).
  3. Keep ids stable and deterministic for repeatable retries.

Decision points:

  • If a node type is missing, inspect get_plugins before retrying writes.
  • If editing risks data loss, narrow ops to intended scope only.

Completion check:

  • Transaction has all required ops and no redundant mutations.

Step 3: Apply and Verify

  1. Submit apply_graph_transaction.
  2. Inspect applied and errors from response.
  3. Re-run get_graph_description to verify post-state.

Decision points:

  • If partial success occurs, retry only failed intent instead of replaying the full batch.
  • If validation errors occur, patch payloads to match node schema before retry.

Completion check:

  • Graph topology matches expected post-change state.
  • No unresolved critical errors remain.

Safety Rules

  • Prefer one coherent transaction over many micro calls.
  • Validate node property payloads against node type requirements before submit.
  • For destructive updates, inspect current graph first and include only intended operations.
  • Treat partial success as normal: check errors and retry only failed intent.

Request Examples

Example: Read graph

GET /api/graph/description?graphId=main

Example: Apply transaction

POST /api/graph/apply Content-Type: application/json

{ "graphId": "main", "ops": [ { "op": "CREATE_NODE", "metadata": { "id": "n_fetch", "type": "http.request", "position": { "x": 120, "y": 80 }, "data": { "properties": { "url": "https://example.com" } } } }, { "op": "CONNECT", "metadata": { "id": "edge_manual_n_fetch_n2", "source": "n_fetch", "target": "n2" } } ] }