tables-cli

Clay tables CLI:通过 `clay tables` 命令检查、查询和导出现有表的数据,支持 list、columns、rows、query-live 和 structured query 操作。若需对某张表或某条记录做深入分析,请使用专注的 `/tables-*` 技能(如 analyze、trace、error-sweep、value-trace、capacity)。

仓库最近推送
GitHub Stars
158
Forks
27
Issues / PRs
10

安装方式

先用 Prompt 核对来源与依赖。也可下载安装包。

用 AI 助手安装

复制提示词,让助手先核对固定版本和依赖。

查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "tables-cli":https://skillpi.com/zh/skills/deepskill-0706196ba96a9bf138eb95037283ff0e47f2b53a05cc5fc961b24030373971a7。安装前核对上游来源和版本:https://github.com/clay-run/agent-plugins。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。

来源与配置

github.com

配置方式待核实

请查看原始来源中的适用工具、依赖和权限要求。

安装实测待补充

Clay tables CLI:通过 `clay tables` 命令检查、查询和导出现有表的数据,支持 list、columns、rows、query-live 和 structured query 操作。若需对某张表或某条记录做深入分析,请使用专注的 `/tables-*` 技能(如 analyze、trace、error-sweep、value-trace、capacity)。

0 下载

介绍来源: third_party · clay-run · 0.0.1 参考来源

SkillPi 解读

能完成的任务
翻译待完成,请参阅来源文档。
实测状态
未测试

文件浏览

在原站浏览文件 ↗

原始 SKILL.md

打开原文 ↗
Frontmatter
name: tables-cli
description: Clay tables — inspect, query, and export data from an existing table via the `clay tables` CLI (list, columns, rows, query-live, structured query). To investigate a table or record, use the focused `/tables-*` skills (analyze, trace, error-sweep, value-trace, capacity).

Clay tables are spreadsheet-like: columns (basic, formula, or enrichment), rows (usually people or companies), and sources that add rows. This skill only reads tables that already exist. If clay isn't on PATH or clay whoami fails on auth, run the setup skill.

Finding a table

Resolve it to a t_... id. Use clay tables list --filter workbook.id=<wb_...> when the workbook is known (clay workbooks list), otherwise clay tables list and pick by .name with jq. Do not use --filter queryEnabled=true unless you only want query-synced tables — it hides the rest. If the user named no table or workbook, ask rather than sweeping the workspace.

ID prefixes: t_ table, f_ column, r_ row, wb_ workbook.

Not supported

  • Creating tables (or adding fields/columns). Tell the user to create the table in the Clay app first; you can work with it once it exists.
  • Writing data. The CLI cannot insert rows, update cells, or trigger enrichments. clay tables update only toggles whether a table is queryable (--query-enabled); it does not write data. Rows enter through the Clay app. The Public API is query/list-only as well.

CLI: clay tables

Prefer columns list|get / get / rows list|get / query-live for everyday work; use clay tables query when you need synced Enterprise joins/pagination. (columns and rows are command groups — clay tables columns <tableId> is not a command.)

Availability: clay tables query requires API table sync (Enterprise). Without sync, clay tables query and clay tables update --query-enabled true fail with auth_forbidden ("API table sync is not enabled for this workspace") — that's an account limitation, not a bug: don't retry or re-login. Fall back to columns / rows / query-live (no sync required), and tell the user to contact Clay about Enterprise access for synced query.

clay tables --help (and clay tables <cmd> --help) is the authoritative spec — read it for exact flags, JSON shapes, and error codes.

Reading rows vs. querying

Pick by how much querying power you need:

  • Read rows directly — clay tables get, columns, rows list/get. Works on any table with no setup. Filtering is exact-match only (rows list --filter col=value, ANDed together). Best for quick lookups and pulling cell values as-is. rows list returns data[].cells keyed by column id — each cell is an object ({ "cells": { "<f_id>": { "status": ..., "value": ... } } }), not a flat { "<f_id>": <value> } map (synced query cells are {status, value} objects too — see below). Pages with --limit (1-100, default 20) and --cursor.
  • Query live (ClayQL) — clay tables query-live. Structured ClayQL against the table's live Postgres data — no Enterprise sync required. Use columns get / get to learn the schema before writing the query.
  • Query (synced) — clay tables query. Richer: range / contains / OR filters, joins across tables, sorting, grouping, and paging past 100 rows. The table must first be enabled for querying (below); requires API table sync (Enterprise).

Reach for query-live or query the moment a plain rows list --filter can't express what you need — a range or text match, an OR, a join, sorting, grouping, or a large ordered pull. Prefer query-live when sync isn't enabled; use synced query for multi-table joins and cursor paging (and for a complete large pull when sync is available — query-live is capped at 100 rows per call; page with LIMIT n OFFSET m in --query). Otherwise a direct rows list is faster and needs no setup.

Bulk enrichment exception: if rows list returns truncated: true, treat the result as one unfiltered, unordered sample of at most 20 currently retained passthrough rows. It accepts no cursor or filters, and completed rows may already have been deleted, so an empty sample is valid and the result is never a complete source listing. For migration, use clay tables columns get as the source of truth and inspect its sources to determine the origin. An Audiences-backed source includes audience.entityType, segments[].id, isGlobal, and entityIdOnly; a global Audience has isGlobal: true and no segment objects.

Row ordering

Both rows list and tables query return rows in a stable, consistent order that roughly tends to follow the order rows were created — but treat that as a loose tendency only, never a guarantee. It's approximate, the two commands don't necessarily order rows the same way as each other, and neither matches the order rows appear in the Clay app. So don't rely on position for anything: don't map a row's position in the output to what the user sees on screen, and don't read "the first / most recent N rows" from position. To find a specific record, filter by an identifier (rows list --filter, or a tables query / query-live filter) rather than relying on position. Caller-controlled order is available on both query paths: tables query via order_by (single page only — can't combine with cursor paging), and query-live via ClayQL ORDER BY (also subject to the 100-row cap / LIMIT/OFFSET paging).

List tables

Discover navigation-visible tables and their ids. Each row carries a queryEnabled flag for whether the table is enabled for querying.

clay tables list                                              # navigation-visible tables
clay tables list --filter queryEnabled=true                   # query-sync-enabled only
clay tables list --filter workbook.id=wb_123                 # tables in one workbook
clay tables list --filter owner.id=1417322 --limit 50         # by owner
clay tables list --limit 50 --cursor cursor_abc123            # pagination

Run a live ClayQL query

clay tables query-live runs ClayQL against the table's live Postgres data — no Enterprise sync required. Learn column names with columns get / get first; omit any FROM clause (the table comes from <tableId>):

clay tables columns get t_abc123
clay tables query-live t_abc123 --query 'SELECT {{Name}}, {{ARR}} ORDER BY {{ARR}} DESC LIMIT 10'

See clay tables query-live --help for output shape and errors. Output is { query, queryName?, rowCount, results } — rows live under results, not data. Each call returns at most 100 rows; page with LIMIT n OFFSET m in --query (bump OFFSET until a page returns fewer than n rows). Prefer this over synced query when API table sync isn't enabled, or for a quick single-table look. For a complete large export when sync is available, prefer synced query + cursor paging instead.

Enable a table for querying

clay tables query can only read a table that's been enabled for querying. Toggle it with update:

clay tables update t_abc123 --query-enabled true    # { id, queryEnabled: true }
clay tables update t_abc123 --query-enabled false
  • Not instant. Enabling prepares the table in the background. A query run too soon may return no/partial rows; retry after a short wait. Larger tables take longer.
  • Limited per workspace. Check clay tables query-usage ({ used, limit }); at the cap, disable a table before enabling another. A limit of 0 means API table sync isn't enabled for the workspace (see the availability note above).

Run a structured query

clay tables query takes a structured JSON query that supports joins across multiple tables and cursor pagination — so it's the right choice for complex queries or reading past 100 rows. The query is read from a file or stdin via --query.

clay tables query --query ./query.json | jq '.data | length'
echo '{"tables":[{"id":"t_abc123"}]}' | clay tables query --query - --limit 100
clay tables query --query ./query.json --limit 100 --cursor cursor_abc123
  • The --query payload is the query itself (what to fetch); pagination is separate. Minimal shape: { "tables": [{ "id": "t_..." }] }. Beyond tables, it may include filter, select, join, order_by, group_by, and field_mode. Field references can use ids or names. See clay tables query --help for the most up to date information.
  • Pagination is via flags: --limit <n> (1–100, default 50) and --cursor <token>. When more rows remain, the response includes a top-level cursor — pass it back via --cursor to fetch the next page.
  • Output is { data: [ { "<fieldId>": <cell> } ], cursor?, fields? }, where each <cell> carries a status (success / error / running / queued / retry / rate_limited / awaiting_callback / empty) plus its value.

Typical flow: clay tables list --filter queryEnabled=true to find the id → (if needed) clay tables update <id> --query-enabled true → wait, then clay tables query. To export, convert the JSON data array to CSV with the Write tool.

Saving query results to CSV

After a query-live or query run, save the results locally as a CSV so the user can access them. Convert the row array to CSV and write it with the Write tool — use .results for query-live and .data for synced query. For query-live, page with LIMIT/OFFSET and append each page so the CSV isn't truncated at 100 rows.

  1. Run clay tables query-live or clay tables query
  2. Take rows from .results (query-live) or .data (query); for live queries, keep paging until a page is short
  3. Extract column headers from the first result row
  4. Convert each row to comma-separated values (quote fields containing commas)
  5. Write to a local file like ./query-results.csv

Example: join across tables

"Join our Accounts and Contacts tables and pull the contacts at software companies":

1. List tables to get their ids.

clay tables list --filter queryEnabled=true | jq -r '.data[] | [.id, .name] | @tsv'
# t_accounts123   Accounts
# t_contacts456   Contacts

2. Get each table's schema so you know field ids, types, and the join key.

clay tables columns get t_accounts123
clay tables columns get t_contacts456

Say Accounts has f_industry (text) and f_account_id, and Contacts has f_company that references the account.

3. Enable querying if needed (see above — not instant), then run the structured query. Use the field ids from step 2.

clay tables update t_accounts123 --query-enabled true
clay tables update t_contacts456 --query-enabled true
echo '{"tables": [{ "id": "t_contacts456" }, { "id": "t_accounts123" }], "join": [{ "table": "t_accounts123", "on": { "left": "f_company", "right": "f_account_id" } }], "filter": { "field": "f_industry", "op": "contains", "value": "software" }}' | clay tables query --query - --limit 100 | jq '.data | length'

4. Page past 100 rows by passing the previous response's cursor back via --cursor until the response no longer returns one:

echo '{"tables": [{ "id": "t_contacts456" }, { "id": "t_accounts123" }], "join": [{ "table": "t_accounts123", "on": { "left": "f_company", "right": "f_account_id" } }], "filter": { "field": "f_industry", "op": "contains", "value": "software" }}' | clay tables query --query - --limit 100 --cursor CURSOR_FROM_PREVIOUS_RESPONSE | jq -c '.data[]'

clay tables query --help lists the top-level query keys and pagination flags. Inner shapes (filter ops, join on, select / group_by) are in the developer docs: https://developers.clay.com/llms.txt

Investigating tables

Beyond querying data, the CLI's read commands (clay tables get, columns list|get, rows list|get) support diagnostic work. These need no query sync. Each investigation is a focused skill:

The user wants… Skill
"what does this table do?" / "explain the {table} workflow" /tables-analyze
"trace {id}" / "where is {id} and what state is it in?" /tables-trace
"what's erroring in {table}?" / "show failed rows" (no identifier) /tables-error-sweep
"why is {id} stuck/failing?" / "where did {value} come from?" /tables-value-trace
"why aren't new rows being added / why is the import stuck?" /tables-capacity

/tables-analyze and /tables-value-trace share the column-DAG extraction recipe in tables-cli/dependency-catalog.md.

Rebuilding a Table as a Workflow

If a user wants to convert their table logic into a Clay workflow (reusable, branching, or scheduled), use the workflows skill to rebuild the enrichment pipeline as connected nodes.

版本历史

  1. clay-cli-v1.22.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.22.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay ad-syncs trigger <adSyncId>` starts an export of an ad sync’s audience to its destinations: a draft’s first trigger starts the sync, later triggers run it again, and a paused sync resumes. - When a command fails because of a plan limit, the agent shows the upgrade link from the error and offers a way to continue without the gated feature. - Various bug fixes and stability improvements.

  2. clay-cli-v1.21.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.21.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay knowledge-hub skills create` saves agent skills to the workspace and resolves duplicate names without overwriting existing skills. - Various bug fixes and stability improvements.

  3. clay-cli-v1.20.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.20.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay workflows runs bulk pause`, `resume`, and `stop` control many runs; `clay workflows triggers list` lists assignments and schedules, and `update --resume-paused-runs` resumes paused runs with a trigger. - `clay workflows groups publish-as-function` creates reusable functions; the Workflows and Enhanced Match skills guide Classify routing and hashed-email enrichment, and `clay workflows runs get` shows waterfall provider names. - `clay audiences activities` reads and summarizes record activities, retrieves Gong transcripts, and searches call content; `clay audiences records get` includes related-record references. - `clay searches query-mode reference --sections` retrieves selected reference sections. - Various bug fixes and stability improvements.

  4. clay-cli-v1.19.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.19.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay workflows nodes insert --help` describes the Classify step: a Use AI step that sorts each record into one of a fixed set of categories with GPT 6 Luna or Jev, ready to branch on the chosen category. - `clay ad-syncs destinations delete` removes a destination from a paused or failed ad sync, not only a draft. - `clay searches preview` output includes `preview.isCurrent`, which says whether the stored preview still matches the search's current configuration. - Various bug fixes and stability improvements.

  5. clay-cli-v1.18.0 GitHub ↗
    原版更新说明

    Standalone Clay CLI 1.18.0 binaries, consumed by the Clay agent plugin. ## What's new - `clay workflows runs steps` accepts `--omit-payloads` to list steps without their input and output data, and `--step-ids s1,s2` to fetch selected steps using comma-separated IDs, up to 50 per request. - Various bug fixes and stability improvements.

此处仅展示最近 5 个版本。 在原站查看完整版本历史 ↗

当前收录版本

0.0.1

核对来源版本 ↗

安全与评测信息

质量评测

满分100 · 来自 SkillPi LAB 实验室的评测报告。

场景价值95/100

亮点

  • 提供详细的 Clay tables CLI 使用指南,覆盖 list、columns、rows、query-live、structured query 等核心操作
  • 包含端到端示例和最佳实践,帮助用户高效查询和导出现有表中的数据
  • 明确区分了不同查询方式的适用场景和限制条件
触发精准90/100

亮点

  • description 明确指出了 Skill 的功能和使用场景
  • 触发词覆盖完整,包括具体的 CLI 命令和操作类型
  • 边界清晰,与其他 tables-* 技能有明确分工
结构规范90/100

亮点

  • 文档结构清晰,分步骤说明了各种操作
  • 包含详细的示例和代码片段
  • frontmatter 完整,符合规范要求
执行可靠90/100

亮点

  • 工具来源明确,参数说明详细
  • 覆盖了主要异常情况和错误处理
  • 提供了分页机制和权限问题的解决方案
证据可验 (前四项均值)91/100

取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。

正文静态检测

100 / 100 · skillpi-20261123-no-r3-v1

正文未命中当前规则。

分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。

权限与使用前检查

根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。

未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。

文档引用的域名或地址

这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。

  • developers.clay.com

本站展示提示不会授予权限。涉及文件改动、密钥、外部发送或费用时,仍由你使用的工具按需确认。

安全评级与访问范围

safe · 静态证据核验,不代表运行安全保证。

使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。