Clay テーブル(データを表形式で整理・管理する仕組み)— あるセルの値がどこから来たのかを、依存関係を遡って根本原因まで説明します。実行の制御条件(ゲート)を確認しながら、その値の成り立ちを明らかにします。 **次のような場合に使用:** - 「この値はどこから来たのか?」 - 「なぜ{アクション}がエラーになったのか?」 - 「なぜ{アクション}が実行されなかったのか?」 - 「なぜこの値が空っぽなのか?」
Clay tables — explain one cell by walking a column backward through its dependencies and run-gate to the origin or root cause. Use when the user asks "where did this value come from?", "why did {action} error?", "why didn't {action} run?", or "why is this value empty?".
次のような場合に使用: あるレコードの 1つのセル について説明したいとき。「このメールはどこから来た?」「Enrich Personでエラーが起きたのはなぜ?」「Push to HubSpotが実行されなかったのはなぜ?」「この値が空なのはなぜ?」などです。このスキルは、1つの列をその依存関係を遡ってたどり、発生元や根本原因を見つけます。データの状態ではなく因果関係を調べるので、/tables-trace のようにまず状態のスナップショット(一瞬の状況)を示すのとは異なります。
このスキルは 2 つの要素を組み合わせています:
formulaText / inputsBinding / formulaMap の {{f_xxx}} トークン)、および実行条件(conditionalRunFormulaText)を把握します。clay tables rows get で、この特定の行の各セルに実際に格納されているものと、その状態を確認します。構造は接続関係を、データはそこを流れる値を示します。両方が必要です。
{{f_xxx}} 参照は テーブルをまたがることはない ため、すべてのたどりは該当行が属するテーブル内だけで完結します。
対象となる行と列が必要です。まだ行が確定していない場合は最初に検索します(/tables-trace を使うか、単一の値で検索 — テーブルが検索対応ならば tables query、そうでなければ rows list --filter で)。説明する対象となる列と、その f_id を確認します。説明には行のすべてのセル情報が必要です — 各セルの status(状態)、value(値)、fields(フィールド)、error(エラー)。tables query の結果はこれらすべてを既に含んでいますし、r_... IDを持っていれば rows get で取得できます(ステップ 3)。
clay tables columns get該当行が属するテーブルに対して実行します。tables の入口スキルの dependency-catalog.md の トークン抽出レシピを使って依存関係カタログを構築します — 各列について { id, name, type, role, integration, gate, dependsOn } が得られます。対象列とその依存先を遡るだけで済みますが、全体をいっぺんに計算しておくと安く済み、あとで名前から接続を確認するときに役立ちます。
この行の全セルについて status、value、fields、error が必要です。tables query で行を検索した場合、その結果は既にすべてを含んでいるので直接使えます。そうでない場合(rows list 経由、または既に r_... IDを持っている場合)、clay tables rows get で取得します:
clay tables rows get <tableId> <rowId> | jq .
訪問する任意の列について、各セルの status、value、fields、error(メッセージ文字列)を読みます — rows get の結果なら .cells["f_xxx"] の下、tables query の行なら ["f_xxx"] 直下にあります。
対象セルから出発し、dependsOn をたどって上流へ進み、到達した各セルの実際の状態を行から読みます。原因に達するまで(または basic/source といったルートに達するまで)遡ります。対象セルが示す内容に応じて分岐します:
basic フォーミュラ(計算式)列 → 値は formulaText から計算されます。dependsOn はその入力です。上流のセルの値(.value)を読み、それ自体が導出されたものなら再帰的に進み、ルート(source / 入力用 basic)に到達するまで続けます。その値を生み出した連鎖を報告します。action 列 → 値はアクションの出力です。fields(rows get で取得した構造化されたペイロード)を読んで実際に返されたものを確認し、inputsBinding で入力源を確認します。各入力の {{f_xxx}} を上流セルに解決して、実際に入った値を示します。error(エラー)を診断するerror(メッセージ文字列)を読みます。原因を分類します(/tables-error-sweep ステップ 5 と同じパターン:プロバイダーの制限、integration/authAccountId による認証、不正または欠落入力、プロバイダー側での拒否)。dependsOn する各セルを見ます。入力セルが空、エラー、未実行なら、障害がそこから連鎖している可能性があります — 遡り続けます。「このアクション自体が失敗した」と「このアクションが悪い/無い入力を得た理由が上流列にある」を区別します。empty(未実行 / 値なし)を診断するgate(conditionalRunFormulaText)がある場合、この行の実際のセル値に対して評価します。ゲートが偽(条件を満たさない)なら、アクションが empty のまま停止し、エラーは出ない — これが通常の理由です。条件と、それを偽にした入力を報告します(例:「{{Domain}} がゲート、この行の Domain は空」)。(ゲート スキップは run 条件を名前に含むエラー メッセージとして表れることもあります — 同じように扱います。)queued/running/empty のため、この列はまだ実行されていません。値をまだ出していない最初の列を見つけて、それをボトルネック(処理の瓶首)として報告します。queued / running / retry / rate_limited / awaiting_callback答え(発生元、または根本原因)を最初に述べ、その後に遡りの連鎖を、この行の実際のセル値と状態で示します。
値の発生元:
「Enrich Person」→ 会社「Acme Inc」は Clearbit から来た、メール経由でキー付け。
Push HubSpot ← Enrich Person.company = "Acme Inc"
Enrich Person (Clearbit) ← Find Email = "jane@acme.com"
Find Email (Prospeo) ← Domain = "acme.com"
Domain (フォーミュラ) ← Company = "Acme"(CSV インポート)
失敗 / 非実行の根本原因:
「Push to HubSpot」は実行されませんでした。メールが必須で存在しないため。
Push to HubSpot empty ゲート: {{Find Email}} がある場合のみ
Find Email 成功だが空の値(「メールが見つかりませんでした」) ← Domain
Domain 成功 = "acme.com"
根本原因: Find Email はこのドメインのメールを返しませんでした。HubSpot プッシュは正しく
スキップされました。修正は上流(メール発見)で必要であり、プッシュ処理ではありません。
チェーンは正確に:トークンが実際に確立する接続だけを示し、ゲートはその conditionalRunFormulaText がまさに読む通りに引用し、各ステップをそのセルがこの行で実際に保有する値で基づきます。
/tables-trace/tables-error-sweep/tables-analyzeUse when: you have a record and want to explain one cell — "where did this email come from?", "why did Enrich Person error?", "why didn't Push to HubSpot run?", "why is this value empty?". This walks a single column backward through its dependencies to find the origin or the root cause. Causation, not state — /tables-trace gives you the state snapshot first.
The method combines two things:
{{f_xxx}} tokens in formulaText / inputsBinding / formulaMap), and the run gate (conditionalRunFormulaText).clay tables rows get tells you what each cell on this specific row actually holds and its status.Structure gives the edges; the row gives the values along them. You need both.
{{f_xxx}} references never cross tables, so the entire walk stays within the row's own table.
You need this row and the target column. If you don't have the row yet, locate it first (/tables-trace, or a single value search — tables query when the table is query-enabled, else rows list --filter). Identify the target column — the one whose value, error, or non-run you're explaining — and its f_id. The explanation needs the row's full cell data — every cell's status, value, fields, and error; a tables query result already carries all of that, and rows get provides it when you hold a r_... id (step 3).
clay tables columns getOn the table the row lives in. Build the dependency catalog with the token-extraction recipe in the tables entry-point skill's dependency-catalog.md — it yields { id, name, type, role, integration, gate, dependsOn } per column. You only need to walk the target column and its transitive dependsOn, but computing the whole catalog once is cheap and lets you resolve every edge by name.
You need every cell's status, value, fields, and error on this row. If you located the row via tables query, its result already carries all of that — use it directly. Otherwise (the rows list path, or you already hold a r_... id), fetch it with clay tables rows get:
clay tables rows get <tableId> <rowId> | jq .
For any column you visit, read status, value, fields, and error (a message string) per cell — under .cells["f_xxx"] in a rows get result, or ["f_xxx"] directly in a tables query row.
Start at the target cell and follow dependsOn upstream, reading each upstream cell's actual state from the row, until you reach the cause (or a basic/source root). Branch on what the target cell shows:
basic formula column → the value is computed from formulaText; its dependsOn are the inputs. Read those upstream cells' values (.value), and recurse into any that are themselves derived, until you reach roots (source / input basic). Report the chain that produced the value.action column → the value is the action's output. Read its fields (the structured payload, populated on rows get) for what it actually returned, and its inputsBinding for what fed it; resolve each input's {{f_xxx}} to the upstream cell and show the value that went in.errorerror (the message string) on the target cell. Classify the cause (same patterns as /tables-error-sweep step 5: provider throttling, auth via integration/authAccountId, bad/missing input, provider rejection).dependsOn. If an input cell is empty, error, or hasn't run, the failure likely cascades from there — keep walking back. Distinguish "this action genuinely failed" from "this action got bad/no input because an upstream column did."empty (hasn't run / no value)gate (conditionalRunFormulaText), evaluate it against this row's actual cell values. A falsy gate is the usual reason an action sits at empty with no error — report the condition and which input made it falsy (e.g. "gated on {{Domain}}, and Domain is empty on this row"). (A gated skip can also surface as an error whose message names the run condition — treat that the same way.)queued/running/empty, so this column hasn't been reached yet. Walk back to find the first column that hasn't produced, and report that as the bottleneck.queued / running / retry / rate_limited / awaiting_callbackState the answer first (the origin, or the root cause), then show the backward chain that supports it with the actual per-cell values/statuses on this row.
Value origin:
"Enrich Person" → company "Acme Inc" came from Clearbit, keyed off the email.
Push HubSpot ← Enrich Person.company = "Acme Inc"
Enrich Person (Clearbit) ← Find Email = "jane@acme.com"
Find Email (Prospeo) ← Domain = "acme.com"
Domain (formula) ← Company = "Acme" (CSV import)
Root cause of a failure / non-run:
"Push to HubSpot" didn't run because it's gated on an email, and there isn't one.
Push to HubSpot empty gate: only if {{Find Email}} present
Find Email success but empty value ("no email found") ← Domain
Domain success = "acme.com"
Root cause: Find Email returned no email for this domain, so the HubSpot push
was correctly skipped. The fix is upstream (email discovery), not the push.
Keep the chain honest: only show edges the tokens actually establish, quote a gate exactly as its conditionalRunFormulaText reads, and ground each step in the value that cell really holds on this row.
/tables-trace./tables-error-sweep./tables-analyze.原文・著作権は Anthropic および各プラグイン作者に帰属します。日本語訳は Claude API による自動翻訳です。