routines
安装方式
先用 Prompt 核对来源与依赖。也可下载安装包。
用 AI 助手安装
复制提示词,让助手先核对固定版本和依赖。
查看 Prompt收起 Prompt
先检查当前 Agent 是否已安装 SkillPI Skill Finder。如果尚未安装,请按官方仓库的说明安装并启用:https://github.com/Findskills/skillpi。然后使用 Skill Finder 打开此 SkillPI 详情页并定位 "routines":https://skillpi.com/zh/skills/deepskill-f4e3fa1fed3c93db33e5c023142b74016119d88e0a3bea14a002eb75efe25401。安装前核对上游来源和版本:https://github.com/clay-run/agent-plugins。来源不一致时停止并说明差异。核对通过后,用 Skill Finder 安装目标 Skill,并报告安装路径和来源版本。
来源与配置
github.com
配置方式待核实
请查看原始来源中的适用工具、依赖和权限要求。
安装实测待补充
Clay 例程 — 从现有函数或工作流创建并保存例程,然后在当前工作区运行该例程。用于在用户请求创建或注册例程,或通过名称/ID 运行、执行、触发某个函数、工作流或例程、传递输入参数,或检查运行结果与状态时调用。如需构建新工作流,请使用工作流入口技能。
介绍来源: third_party · clay-run · 0.0.1 参考来源
SkillPi 解读
- 能完成的任务
- 翻译待完成,请参阅来源文档。
- 适合谁
- 来源文档未说明。
- 输入和输出
- 来源文档未说明。
- 软件、账号及付费要求
- 来源文档未说明。
- 限制与区别
- 来源文档未说明。
- 实测状态
- 未测试
文件浏览
Frontmatter
name: routines
description: Clay routines — create a routine from an existing function/workflow, then run a saved routine that exists in this workspace. Use when the user asks to create/register a routine, or to run, execute, or trigger a function, workflow, or routine (by name or id), pass it inputs, or check the results/status of a run. For building a new workflow, use the workflows entry-point skill instead.Running Clay routines
A routine is the runnable unit in Clay: a saved function or workflow that already exists in this workspace. This skill is about running an existing routine and getting its results — not building one.
- To build or edit a workflow, use the workflows entry-point skill.
- To query data out of a Clay table, use the tables entry-point skill.
- To find the records to run a routine over, use the
searchesskill for net-new people or companies, or theaudiencesskill for members of a saved audience, then feed the results in here. - To write people or companies into Audiences, run a routine whose underlying
workflow contains
upsert-audiences-record(for example, to persist Search results). Items pipe in the same as other runs, usingworkflow:<id>instead offunction:<id>. If no such workflow exists, build it via theworkflowsskill'saudiences.md, thenclay routines create workflow. - To run a routine over HTTP from a service or app (not a one-off shell task), use
the
public-apiskill.
Routines run asynchronously: you start a run, then poll for results.
1. Find the routine
Don't assume a routine id. List what exists and match the user's request to one:
clay routines list # routines in this workspace
clay routines get <id> # full config and input schema
clay routines list is paginated — a workspace can have far more routines than one
page. Page through with --cursor until the response has no cursor before concluding a
routine doesn't exist. Each routine carries a source field in the response — list has no
filter flag, so filter client-side (e.g. | jq '.data | map(select(.source == "managed"))').
managed routines are Clay's built-in enrichers
(emails, domains, firmographics) and should be your first choice for standard enrichment;
custom are workspace-built. Decide by input schema, not name — e.g. the managed
Work Email routine needs Full Name + Company Name + Company Domain, so resolve the
domain first with the managed Company Domain routine when you only have a company name.
clay routines get <id> is important before running: it shows the routine's input
schema so you know exactly which fields each item needs.
Link the user to the underlying function or workflow
Whenever you show the user a routine — from clay routines list or clay routines get —
give them a link to open its underlying object in the Clay app so they can inspect or edit
it. This matters most in a headless environment (Claude Code, Cursor, a shell) where the
user has no Clay tab open.
A routine id encodes the object it wraps: function:<tableId> wraps a table,
workflow:<workflowId> wraps a workflow. Split off the id after the : and combine it
with the workspace id (clay whoami | jq -r '.workspace.id') to build the link:
- Function (
function:<tableId>) →https://app.clay.com/workspaces/<workspaceId>/tables/<tableId> - Workflow (
workflow:<workflowId>) →https://app.clay.com/workspaces/<workspaceId>/terracotta/tc-workflows/<workflowId>
For function routines, both list and get return a source (managed for a
Clay-managed default function, custom for one built in this workspace) and, for custom
functions, a createdBy ({ id, name, email }; null for managed ones). Use these to tell
the user which functions are Clay-managed vs. their team's own, and who authored a custom
one — e.g. group them by source, or note the author when disambiguating similar functions.
Create a routine from an existing function or workflow
If no routine exists yet for a function (a table) or a workflow, expose it as a runnable
routine with create. This registers the underlying object as a routine.
clay routines create function <tableId> --name "My contact routine" --entity-type contact
clay routines create workflow <workflowId> --name "My workflow routine"
typeisfunctionorworkflow;objectIdis the table id (function) or workflow id.--nameis required for both types.--entity-type(contactorcompany) is required for function routines and rejected for workflow routines.- The routine id is built from the type and object id, e.g.
function:t_abc.
Use clay routines update <id> to change a routine's name, description, or entity-type
later. See clay routines create --help / clay routines update --help for the full flags
and JSON shape.
2. Check the cost and your balance before running
Before starting a run, inspect its estimate and the workspace balance internally. Follow
the shared cost policy in workflows-discover-actions/cost-and-budget.md for disclosure and confirmation; ordinary authorized
runs do not need a cost-only check-in. clay routines get <id> includes a per-item estimate;
clay credits balance returns the remaining balance.
clay routines get function:t_abc123 | jq '.estimatedCreditCost'
clay credits balance | jq '{ balance, actionExecutionBalance }'
There are two independent budgets, and a run needs enough of each:
estimatedCreditCost.perRunis charged against the data-creditbalance.estimatedCreditCost.actionExecution(when supplied) is charged against the separateactionExecutionBalanceon action-execution pricing plans. A workspace can have plenty ofbalancebut no action executions left — enough of one budget does not cover the other. When not supplied the workspace is still on legacy billing and this balance can be ignored
For how to read the balance and how the cost fields work, see the help text:
clay credits balance --help
Only multiply per-item costs when they apply to the configured execution and all relevant
execution counts are known. Workflow estimates count nodes once and can omit branching
and fan-out; containsVariablePricing: false does not establish completeness. Do not turn
an incomplete base estimate into a total, even by labeling it approximate.
If a supported estimated total for either
budget exceeds its matching balance — perRun × items > balance, or
actionExecution × items > actionExecutionBalance — stop and tell the user instead of
starting a run that will only partially complete.
Undefined, null, incomplete, or inapplicable costs are unknown, not free. If asked, explain that the total cannot be reliably estimated; otherwise continue within the authorized scope.
Running low? Share a top-up link
When supported pricing shows insufficient balance, or a real billing failure occurs, read the
credits-quotas-plans skill and follow it for CLI top-up, auto top-up, and
billing UI options.
3. Run it
Start an async run, passing inputs per item:
clay routines runs start <id> # see --help for how to pass items/inputs
- A single inline run takes 1-100 items; each item is a set of
inputsmatching the routine's input schema. - For larger sets, routines support a batch run over an uploaded JSONL file.
Run clay routines runs start --help for the exact flags, the input/JSON shape, and how
to supply items.
4. Get the results
Runs are asynchronous. Prefer a single blocking call with --wait instead of hand-rolling a
poll loop:
clay routines runs get <run-id> --wait 60 # poll until complete / validation_failed / processing_failed, or 60s
clay routines runs get <run-id> --bulk --wait 60 # same for a bulk run (skip the inline probe)
clay routines runs get <run-id> --wait # poll until complete / validation_failed / processing_failed (no budget)
clay routines runs get <run-id> # single request (may still be in_progress)
clay routines runs get <run-id> --bulk # look up as a bulk run (bare flag, no value)
clay routines runs list # recent runs and their statuses
Check .status on the JSON before treating the run as done. With bare --wait, the command
blocks until complete, validation_failed, or processing_failed. With --wait <seconds>, if the budget expires
while still in_progress, the command exits 0 with that latest status — do not assume success.
Prefer a bounded --wait <seconds> for bulk runs: a bulk run that was stopped keeps reporting
in_progress, so bare --wait can wait forever.
Every response carries a mode of inline or bulk, and so does the output of
runs start. When it is bulk, pass --bulk on runs get so the run is looked up directly.
If you don't know the mode — a run id you were handed, or one from runs list, which does not
report it — omit --bulk; the response tells you the mode.
A completed bulk run reports a resultUrl rather than inline data. That URL is short-lived
(minutes) — download it promptly, and re-run runs get --bulk to mint a fresh one rather
than reusing a stale link. Results stay retrievable for about a day after the run finishes,
after which the id stops resolving.
Per-item results come back with a status (complete / failed) and either a result
or an error.
clay routines runs get returns a single page of inline results. Since an inline run
has at most 100 items, --limit 100 returns every result in one page. If you use a
smaller page size, the response includes a top-level cursor when more results remain —
pass it back via --cursor to fetch the next page.
Authoritative details
clay routines --help
clay routines <cmd> --help版本历史
-
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.
-
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.
-
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.
-
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.
-
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 实验室的评测报告。
亮点
- 提供 Clay 平台 routines 的完整生命周期管理(查找、创建、运行、结果获取)
- 明确区分与其他技能边界(workflows/tables/searches),避免功能重叠
- 覆盖成本检查、余额监控等生产环境关键需求
亮点
- 触发词覆盖全面:create/register/run/execute/trigger + name/id + inputs + results/status
- 边界清晰,通过 description 明确排除 workflows 构建等无关场景
- 提供多技能协同指引(如 audiences/public-api)提升触发准确性
待提升项
-
文档长度优化 原报告严重程度:轻微
主文档约450行,内容密集,建议拆分为多个子章节或补充目录导航
改进建议:考虑将成本检查、批量运行等复杂主题拆分为独立子文档,或在顶部添加快速导航目录
亮点
- 四阶段流程清晰(Find → Check cost → Run → Get results),符合用户心智模型
- 每步含完整命令示例和参数说明,降低使用门槛
- frontmatter 完整,技能定位明确
待提升项
-
错误处理完整性 原报告严重程度:轻微
部分命令示例缺少网络错误、权限错误等常见异常的处理建议
改进建议:在关键命令后补充常见错误码说明和重试策略,如 'clay routines runs get' 的网络超时处理
亮点
- 前置成本检查机制避免无效运行,保护用户预算
- 异步结果获取设计合理(--wait/--bulk),覆盖内联和批量场景
- 分页和游标处理说明完整,支持大数据集场景
取前四项原始分值的算术平均,四舍五入取整。可通过收录报告核对各项评分与说明,运行记录需单独查证。
正文静态检测
100 / 100 · skillpi-20261123-no-r3-v1
正文未命中当前规则。
分数仅反映正文中的规则命中,供使用前参考。附件与运行行为不在此评分范围内。
权限与使用前检查
根据当前主文档自动整理,命中内容可能是示例或防护说明;不是实际权限声明,也未覆盖附件、外部依赖或运行行为。
未从主文档识别到上述常见操作,不能据此判断无需权限或没有风险。
文档引用的域名或地址
这些地址可能用于文档链接或示例,不是已批准的联网清单。使用前核对实际目的地及发送的数据。
- app.clay.com
安全评级与访问范围
safe · 静态证据核验,不代表运行安全保证。
来源文档未说明。
使用前请由宿主核对并授权实际文件读写、外部服务和联网目的地;本站的核验不会授予任何运行权限。
用户讨论
还没有已核实的点评。