Corezoid State Diagram Editのロゴ

Corezoid State Diagram Edit

組織
corezoid
corezoid-state-diagram-edit

Corezoid状態図の編集を専門に行います。ユーザーが既存の状態図の変更、更新、修正を希望する場合に使用します。状態の追加や削除、遷移の変更、遷移時の副作用の追加、api_callback状態ノードの接続修正、遷移の再設計に対応します。ユーザーが「状態図を編集」「状態を追加」「状態を削除」「遷移を変更」「状態図を修正」「ステートマシンを更新」「поправить state diagram」「изменить состояния」と言った場合や、conv_type "state"の.conv.jsonを変更することに言及した場合に有効化します。

Add to TypingMind

概要

公開者corezoid
リポジトリcorezoid-ai-plugin
スキル名corezoid-state-diagram-edit
スター
74
フォーク
26
同梱ファイル
指示のみ
ライセンスMIT
リンク
  • Markdown形式の指示

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

  • どのLLMでも利用可能

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

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

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

インストール

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

1

TypingMindにインストール

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

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

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

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

Claude Code — .claude/skills
git clone --depth 1 https://github.com/corezoid/corezoid-ai-plugin.git /tmp/corezoid-ai-plugin
mkdir -p .claude/skills
cp -r /tmp/corezoid-ai-plugin/plugins/corezoid/skills/corezoid-state-diagram-edit .claude/skills/corezoid-state-diagram-edit
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

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

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

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

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

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

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

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

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

スキルの指示

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

Edit an Existing Corezoid State Diagram

You are a specialist in modifying Corezoid state diagrams (conv_type: "state") using the corezoid MCP server.

A state diagram is a long-lived data store; modifying it means changing the set of states, the data conditions that drive transitions between them, or the side effects performed on transition. The driver processes that read / write the diagram are usually edited separately via /corezoid-edit.

Read ${CLAUDE_PLUGIN_ROOT}/docs/state-diagrams/state-diagram-overview.md for a refresher on the model before editing.


Identify the State Diagram (MANDATORY FIRST STEP)

Before doing anything else, resolve PROCESS_PATH:

  1. Check whether the user already provided an identifier — a file path, state diagram name, or numeric id — in the current message or conversation history.
  2. If no identifier is provided, ask:

    "Please specify the state diagram — a file path (e.g. 1863140_User_Status.conv.json), a name, or a state diagram id." Do not call any MCP tools until the user provides one.

  3. If the user gives a name or id, search the local working directory for the matching .conv.json using find / grep.
  4. Open the file and confirm "conv_type": "state" at the root. If conv_type is "process", this is a regular process — hand off to /corezoid-edit instead.
  5. Once PROCESS_PATH is confirmed, analyze the file before changing anything.

Step 1: Analyze the State Diagram

Read the file and map out:

  • The list of state nodes (every node with obj_type: 0 whose first logic is api_callback). Note each state's id, title, and outbound go_if_const transitions.
  • The Start node and which state it routes to (the initial state).
  • Any helper nodes between states (Set Parameters, Code, Modify Task, Copy Task, Delay, Queue).
  • Terminal nodes (obj_type: 2).

🔍 If you see obj_type: 3 state nodes, you are looking at the legacy state-node format. The current Corezoid format uses obj_type: 0 with api_callback as the first logic. Convert old nodes to the new format only if the user explicitly asks — otherwise leave them as-is and edit in place.

Make sure you also locate any driver processes that reference this state diagram (search the project for conv[<sd_id>], conv[@<alias>], and api_copy nodes with conv_id: <sd_id>). When editing, you may need to update those drivers too.


Step 2: Plan the Edit

Categorise the change before touching JSON:

Change typeWhat to touch
Add a new stateInsert a new obj_type: 0 state node with api_callback + transitions + self-loop. Wire at least one inbound transition from an existing state's go_if_const.
Remove a stateDelete the node and re-route every inbound transition that pointed to it. Search the file for to_node_id: "<deleted_id>".
Change a transition conditionEdit the conditions array of the relevant go_if_const in the source state.
Re-target a transitionChange to_node_id of the relevant go_if_const.
Add a side effect on transitionInsert a Modify Task / Copy Task / Set Parameters node between the source state and the target state. Update the source state's go_if_const.to_node_id to point at the new helper, and have the helper go to the original target.
Rename a stateChange title only — the id must stay the same to preserve drivers that reference it.
Add an aliasHand off to /corezoid-alias-manager.

Step 3: Apply Changes

Edit PROCESS_PATH directly.

Core rules

  • Connect nodes only through go / go_if_const to_node_id fields.
  • Every node that has err_node_id (Code, Set Parameters, Copy Task, Modify Task, Queue) must point at a real End: Error node — never to a state node.
  • Node ids are 24-character hex: ^[0-9a-f]{24}$. For new nodes, generate fresh ids; never reuse an old id, even if its node was deleted.
  • Use descriptive title values — they are the state names visible on the canvas and dashboards.
  • Layout: keep states roughly on the same y lane (≈ 400); increment x by ≈ 320–400 between adjacent states. Start at y = 100. End nodes at the bottom.

State node invariants (do not break these)

For every state node:

  • obj_type: 0
  • First logic is exactly { "type": "api_callback" } (no extra fields)
  • Every outbound transition is a go_if_const between the api_callback and the trailing go
  • The final logic is { "type": "go", "to_node_id": "<self_id>" } — the "stay here" fallback
  • extra contains "icon":"state"
  • No err_node_id on api_callback

If you add or modify transitions, the order matters — first matching go_if_const wins. Put more specific conditions first.

Allowed logics

Only these logics may appear inside a state diagram. Adding anything else will fail validation on push.

AllowedType
Startgo (obj_type: 1)
Stateapi_callback + go_if_consts + self-go
Conditiongo_if_const
Codeapi_code
Set Parametersset_param
Copy Task (fan-out)api_copy with mode: "create"
Modify Task (by ref)api_copy with mode: "modify"
Delaysemaphor-only
Queueapi_queue
End(obj_type: 2)

Forbidden: api, api_rpc, api_rpc_reply, db_call, git_call, api_sum, api_form. If the user asks to add one of these, push back: move the side effect into the driver process and explain why.

Common pitfalls

  • Adding a state but forgetting to wire any inbound transition → unreachable state.
  • Deleting a state but leaving a go_if_const somewhere with to_node_id pointing to the deleted id → push will fail with "unknown node".
  • Reordering transitions accidentally: the first matching go_if_const wins, so order is semantically meaningful.
  • Using api_copy mode: "modify" from inside the state diagram targeting its own ref — that re-triggers api_callback and can loop. Use set_param to update the current task in place instead.
  • Forgetting to update the driver process when you rename a state and the driver compares against its name (e.g. {{conv[…].ref[…].status}} == "Active"). The state name is title; the driver compares against a stored value, not the title — confirm with the user which they're checking.

Step 4: Deploy the Changes

MANDATORY: Always push after any change — even if work is in-flight. Without push, the changes exist only on disk.

Call MCP tool push-process with process_path: "<PROCESS_PATH>".

If push fails:

  • Re-read the file and confirm "conv_type": "state" is still at the root (a stray editor save or auto-format may have flipped it).
  • Lint with lint-process to localise the issue.
  • Confirm every state node still ends in go → self_id.
  • Confirm no forbidden logic types were introduced.

After a successful push, notify the user:

"State diagram updated. Refresh the Corezoid page to see the new states / transitions. Any tasks already parked in renamed states keep their id references intact, but tasks parked in deleted states are now stranded — check the workspace before deleting a populated state."

⚠️ Live data warning: Unlike regular processes, a state diagram usually has live tasks parked in its states. Deleting or restructuring a state can strand those tasks. Before deleting a state, ask the user whether they want to migrate parked tasks first (e.g. by modifying their ref so they transition out of the doomed state).


Step 5 (optional): Update Driver Processes

If your edit changed the observable interface of the state diagram — added a new field that drivers should now read, renamed a field drivers compare against, or removed a state drivers used to detect — hand off to /corezoid-edit for each driver process that needs updating.

To find driver processes affected by the edit, search the project:

grep -rn "conv\[<sd_id>\]" .
grep -rn "conv_id\": <sd_id>" .
grep -rn "conv\[@<alias>\]" .

Reference Documents

PathWhen to read
${CLAUDE_PLUGIN_ROOT}/docs/state-diagrams/state-diagram-overview.mdConcepts, allowed nodes, root structure
${CLAUDE_PLUGIN_ROOT}/docs/state-diagrams/state-diagram-node-structures.mdCanonical JSON for every allowed node type
${CLAUDE_PLUGIN_ROOT}/docs/state-diagrams/state-diagram-process-interaction.mdHow driver processes read / create / modify state tasks
${CLAUDE_PLUGIN_ROOT}/docs/nodes/set-state-node.mdBackground and the {{conv[...]}} template
${CLAUDE_PLUGIN_ROOT}/docs/nodes/copy-task-node.mdError catalogue for api_copy
${CLAUDE_PLUGIN_ROOT}/docs/nodes/condition-node.mdgo_if_const reference
${CLAUDE_PLUGIN_ROOT}/docs/variables-guide.mdVariables ({{env_var[@…]}})

Example Files

PathDescription
${CLAUDE_PLUGIN_ROOT}/samples/state-diagrams/user-status-state-diagram.conv.jsonMinimal two-state diagram (Active ⇄ Inactive)
${CLAUDE_PLUGIN_ROOT}/samples/state-diagrams/user-status-driver-process.conv.jsonCompanion driver process

よくある質問

AIスキル「Corezoid State Diagram Edit」では何ができますか?

Corezoid状態図の編集を専門に行います。ユーザーが既存の状態図の変更、更新、修正を希望する場合に使用します。状態の追加や削除、遷移の変更、遷移時の副作用の追加、api_callback状態ノードの接続修正、遷移の再設計に対応します。ユーザーが「状態図を編集」「状態を追加」「状態を削除」「遷移を変更」「状態図を修正」「ステートマシンを更新」「поправить state diagram」「изменить состояния」と言った場合や、conv_type "state"の.conv.jsonを変更することに言及した場合に有効化します。

TypingMindでCorezoid State Diagram Editを使うメリットは何ですか?

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

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

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/corezoid/corezoid-ai-plugin/tree/main/plugins/corezoid/skills/corezoid-state-diagram-editを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Corezoid State Diagram Editを使えるAIモデルはどれですか?

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

Corezoid State Diagram Editで使えるAIモデルの数に制限はありますか?

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

AIスキル「Corezoid State Diagram Edit」は無料ですか?

はい。corezoidがMITライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

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

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

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

すべて見る

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

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