• Projects
  • Service
  • About
  • branding.bz
  • Podcast
  • Tips
  • FAQ
  • Recruit
  • Download
  • Contact
  • branding.bz(ブランド構築SaaS)
  • DESIGN NOW(デザインメディア)
  • X
  • LinkedIn
  • Spotify
  • Facebook

213-0011 神奈川県川崎市高津区久本3-6-7-303

© 2026 ID INC. All rights reserved

claude-skills/スキル
SKILLOfficialproductivity

workflows-simplify

プラグイン
clay
ソース
GitHub で見る ↗
説明

Clay ワークフロー — CLI(`clay workflows` コマンド)を使ってワークフローをシンプル化します。重複したノード(処理単位)を統合したり、不要な複雑さを削除したり、AI が判断する処理を決まった結果を返す処理に置き換えたりして、ワークフローを効率化できます。

原文を表示

Clay workflows — simplify a workflow via the CLI (`clay workflows` commands): merge redundant nodes, cut unnecessary complexity, and replace LLM nodes with deterministic alternatives where possible.

ユースケース
  • ワークフローの重複ノードを統合する
  • ワークフローの不要な複雑さを削除する
  • AI判断処理を固定結果処理に置き換える
本文(日本語訳)

ワークフローの簡潔化

現在のワークフロー(業務の流れ)を分析し、複雑さを減らし、信頼性を高め、コストを低減するための具体的な改善案を提案します。

手順

  1. ワークフローを読み込む — clay workflows graph get <workflowId> --mode full を使用してすべてのノード(処理ステップ)の詳細を取得
  2. 各ノードを分析 — 下記の簡潔化チェックリストに照らし合わせて確認
  3. 結果を提示 — 優先度順の改善案を、現在のグラフ図(clay workflows diagram <workflowId>)と一緒に表示。各提案がどのノードに影響するかを視覚的に確認できるようにします
  4. 承認された変更を適用 — ユーザーの依頼によって編集が許可された場合のみ、clay workflows nodes update/create/delete でワークフローを修正。振る舞いが変わらない明らかな改善はそのまま進め、振る舞いや品質に大きな影響を与える変更は事前に確認を取ります
  5. 結果を表示 — 適用後、clay workflows graph format <workflowId> を実行して更新されたグラフ図を表示。単なる説明ではなく、簡潔化の内容が図で確認できるようにします

全プロセスで状況を説明し、グラフ図を優先して表示してください(生のノード情報ではなく)。workflows スキルの presenting.md を参照してください。

簡潔化チェックリスト

LLMノードをコードノードに置き換える

LLM(大規模言語モデル)ノードは実行するたびにLLM呼び出しが発生し、費用がかかります。多くの場合、決まった処理で対応できます:

  • データ変換 — フィールド抽出、JSON形式の変換、文字列操作 → コードノード
  • 単純なルーティング(振り分け) — 決定がデータの内容に基づくルールで表現できる → 条件付きノード(ルールモード)
  • 計算処理 — 数学演算、集計、カウント → コードノード
  • テンプレート充填(テンプレートへの値の埋め込み) — 既知のフィールドから文字列を組み立てる → コードノード

確認項目: 「このノードは創造的な推論が必要か、それともPython関数で同じ結果が出せるか?」

連続したノードをまとめる

隣同士のふたつのノードは、以下の場合に統合できます:

  • ノードAがすべての出力をノードBに渡し、ノードBが新しいツールを追加したり、分岐を作ったりしない
  • どちらのノードも同じモデルを使い、一つのプロンプト(指示)で説明できる
  • どちらかのノードが単に他方の出力を整形しているだけ

確認項目: 「このプロンプトをひとつに統合しても同じ結果が得られるか?」

不要なノードを削除する

  • データをそのまま通すだけで変換を行わないノード
  • 結果がひとつに決まっている条件付きノード

型付き入力を確定的にピン留めする

下流のノードが上流のノードから特定の型のデータが必要な場合:

  • 上流のノードに outputSchema(出力スキーマ)を追加
  • 下流のエージェントノードで、inputSchema プロパティ上に sourceNodeId/sourcePath でピン留めして各入力を接続(workflows スキルの data-passing.md を参照)
  • これによって、ノード間で正確な値が保持されます

ツール使用を簡潔にする

  • ノードが持っているツールの中で使われないものがあれば削除(プロンプトサイズとコストが低下)
  • ノードが一つのツールを呼び出し、その結果を渡すだけなら、context.call_tool() を使用するコードノードに変更を検討

条件付きノードとマップノードにコードモードを使用

  • 条件付きノード:判定ロジックがプログラムで表現できるなら、エージェントモードではなく rules(ルール)モードか code(コード)モードを選ぶ
  • マップノード(複数データの処理):処理が決まった動作なら、エージェントモードではなく code モードを選ぶ

出力形式

提案は以下の構成で示してください:

  1. 変更内容 — 対象となる具体的なノード
  2. 理由 — この変更で削減できる複雑さやコスト
  3. 方法 — 具体的な編集内容(新しいノード型、統合プロンプト、コード例)

提案リストは現在のグラフ図と一緒に示し、影響を受けるノードが簡単に見つかるようにしてください。分析や提案リクエストの場合は、編集を行わず提案のみを表示。ユーザーがワークフロー修正を求めた場合は、振る舞いが変わらない明らかな改善を特定しながら適用し、仮定を述べます。振る舞いや品質に大きな影響を与える編集については、事前に確認を取ります。その後 clay workflows graph format <workflowId> を実行し、修正前後の差が確認できるよう更新されたグラフ図を表示してください。

原文(English)を表示

Simplifying a workflow

Analyze the current workflow and suggest concrete simplifications to reduce complexity, improve reliability, and lower costs.

Process

  1. Read the workflow using clay workflows graph get <workflowId> --mode full to get all node details
  2. Analyze each node against the simplification checklist below
  3. Present findings as a prioritized list of suggestions with specific changes, alongside a render of the current graph (clay workflows diagram <workflowId>) so the user can see which nodes each suggestion affects
  4. Apply authorized changes — edit the workflow only when the user's request authorizes modifications, via clay workflows nodes update/create/delete. Once authorized, apply clearly behavior-preserving improvements as you go and ask before changes with a material behavior or quality trade-off
  5. Show the result — after applying, run clay workflows graph format <workflowId> and render the updated graph so the simplification is visible, not just described

Narrate throughout and prefer the diagram over raw node JSON — see the workflows skill's presenting.md.

Simplification Checklist

Replace LLM nodes with code nodes

Regular (LLM) nodes cost an LLM call per execution. Many can be replaced with deterministic code:

  • Data transformation — extracting fields, reformatting JSON, string manipulation → code node
  • Simple routing — if the decision can be expressed as rules on data fields → conditional node (rules mode)
  • Calculations — math, aggregation, counting → code node
  • Template filling — constructing strings from known fields → code node

Ask: "Does this node require creative reasoning, or could a Python function do the same thing?"

Merge sequential nodes

Two adjacent nodes can often be combined into one if:

  • Node A passes all its output to Node B, and Node B doesn't add new tools or branching
  • Both nodes use the same model and could be described in a single prompt
  • One node just reformats the other's output

Ask: "Would combining these prompts into one still produce the same result?"

Remove unnecessary nodes

  • Nodes that just pass data through without transformation
  • Conditional nodes with only one possible outcome

Pin typed inputs deterministically

When a downstream node needs specific typed data from an upstream node:

  • Add outputSchema to the upstream node
  • On the downstream agent node, pin each input via sourceNodeId/sourcePath inline on the inputSchema property (see the workflows skill's data-passing.md)
  • This preserves exact values across nodes

Simplify tool usage

  • If a node has tools it never uses, remove them (reduces prompt size and cost)
  • If a node calls one tool and passes the result, consider making it a code node with context.call_tool()

Use code mode for conditional and map nodes

  • Conditional nodes: prefer rules or code mode over agentic mode when the decision logic is expressible programmatically
  • Map nodes: prefer code mode over agent mode when processing is deterministic

Output Format

Present suggestions as:

  1. What to change — specific node(s) affected
  2. Why — what complexity or cost this removes
  3. How — the concrete edit (new node type, merged prompt, code snippet)

Pair the suggestion list with the current-graph render so each affected node is easy to locate. For analysis or recommendation requests, present the suggestions without editing. If the user asks you to modify the workflow, apply clearly behavior-preserving improvements as you identify them and state your assumptions. Ask only when an edit has a meaningful behavior or quality trade-off. Then run clay workflows graph format <workflowId> and show the updated graph so the user can see the before/after difference.

原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。