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.
現在のワークフロー(業務の流れ)を分析し、複雑さを減らし、信頼性を高め、コストを低減するための具体的な改善案を提案します。
clay workflows graph get <workflowId> --mode full を使用してすべてのノード(処理ステップ)の詳細を取得clay workflows diagram <workflowId>)と一緒に表示。各提案がどのノードに影響するかを視覚的に確認できるようにしますclay workflows nodes update/create/delete でワークフローを修正。振る舞いが変わらない明らかな改善はそのまま進め、振る舞いや品質に大きな影響を与える変更は事前に確認を取りますclay workflows graph format <workflowId> を実行して更新されたグラフ図を表示。単なる説明ではなく、簡潔化の内容が図で確認できるようにします全プロセスで状況を説明し、グラフ図を優先して表示してください(生のノード情報ではなく)。workflows スキルの presenting.md を参照してください。
LLM(大規模言語モデル)ノードは実行するたびにLLM呼び出しが発生し、費用がかかります。多くの場合、決まった処理で対応できます:
確認項目: 「このノードは創造的な推論が必要か、それともPython関数で同じ結果が出せるか?」
隣同士のふたつのノードは、以下の場合に統合できます:
確認項目: 「このプロンプトをひとつに統合しても同じ結果が得られるか?」
下流のノードが上流のノードから特定の型のデータが必要な場合:
outputSchema(出力スキーマ)を追加inputSchema プロパティ上に sourceNodeId/sourcePath でピン留めして各入力を接続(workflows スキルの data-passing.md を参照)context.call_tool() を使用するコードノードに変更を検討rules(ルール)モードか code(コード)モードを選ぶcode モードを選ぶ提案は以下の構成で示してください:
提案リストは現在のグラフ図と一緒に示し、影響を受けるノードが簡単に見つかるようにしてください。分析や提案リクエストの場合は、編集を行わず提案のみを表示。ユーザーがワークフロー修正を求めた場合は、振る舞いが変わらない明らかな改善を特定しながら適用し、仮定を述べます。振る舞いや品質に大きな影響を与える編集については、事前に確認を取ります。その後 clay workflows graph format <workflowId> を実行し、修正前後の差が確認できるよう更新されたグラフ図を表示してください。
Analyze the current workflow and suggest concrete simplifications to reduce complexity, improve reliability, and lower costs.
clay workflows graph get <workflowId> --mode full to get all node detailsclay workflows diagram <workflowId>) so the user can see which nodes each suggestion affectsclay 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-offclay workflows graph format <workflowId> and render the updated graph so the simplification is visible, not just describedNarrate throughout and prefer the diagram over raw node JSON — see the workflows skill's presenting.md.
Regular (LLM) nodes cost an LLM call per execution. Many can be replaced with deterministic code:
Ask: "Does this node require creative reasoning, or could a Python function do the same thing?"
Two adjacent nodes can often be combined into one if:
Ask: "Would combining these prompts into one still produce the same result?"
When a downstream node needs specific typed data from an upstream node:
outputSchema to the upstream nodesourceNodeId/sourcePath inline on the inputSchema property (see the workflows skill's data-passing.md)context.call_tool()rules or code mode over agentic mode when the decision logic is expressible programmaticallycode mode over agent mode when processing is deterministicPresent suggestions as:
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 による自動翻訳です。