feat(skill): inkreach-teable 按 skill-creator 评估流程迭代优化
- 路由表新增 select 字段写入规则(先查 choices/新值先加选项,typecast 静默失败) - scheduledTime 期望管理:用户要具体时刻/星期须提前告知后端不支持 - 常见错误表补充 mutationApplied=false 静默失败条目 - 快速语法块补充 webhook 调用 URL 形状 - description 按触发评估循环结果重写(20 题评估集,保留测试集分数胜出) - evals.json 更新为 11 题评估集(沙箱隔离、含 secrets/依赖/选项更新覆盖) 评估:Pi + opencode-go/deepseek-v4.1-flash,两轮迭代 28 次运行, 改进版 8 类任务近满分且耗时 -23%
This commit is contained in:
@@ -1,16 +1,7 @@
|
|||||||
---
|
---
|
||||||
name: inkreach-teable
|
name: inkreach-teable
|
||||||
description: >-
|
description: >-
|
||||||
Operate a deployed inkreach-teable instance (a Teable fork with a self-built
|
Use this skill for hands-on work on a deployed inkreach-teable instance (a self-hosted Teable fork with its own automation engine — not teable cloud): adding or altering fields and views, cleaning or bulk-updating records, aggregating table data (monthly counts, group-bys), building automations that react to record changes, form submissions, buttons, or schedules and that can call external APIs, storing API keys as secrets so they aren't hardcoded, checking run history, and configuring change-summary email subscriptions. Trigger whenever the user names a business table (工单表/订单表/成员表, or any bse/tbl/fld/rec/viw/wfl ID) and wants to configure, query, script, automate, or subscribe to it — even if they never say "teable". Also use for this instance's SQL/REST access. Don't use for teable cloud pricing/comparisons, generic SQL/MySQL tuning, standalone Python/npm/CLI scripting, or unrelated webhook integrations.
|
||||||
automation engine) via the inkreach-teable CLI: configure tables, fields,
|
|
||||||
records, views, and automations (8 triggers incl. recordCreated/Updated/
|
|
||||||
Condition, formSubmitted, scheduledTime, buttonClick, webhook; 7 actions),
|
|
||||||
inspect field constraints (select choices, visibilityFilter conditions),
|
|
||||||
manage secrets, execution history, plugins, and record subscriptions. Use
|
|
||||||
when the user references Teable-style IDs (bseXXX, tblXXX, fldXXX, recXXX,
|
|
||||||
viwXXX, wflXXX) or wants to configure tables/automations/plugins on the
|
|
||||||
deployed instance — even without saying "inkreach-teable". The official
|
|
||||||
teable CLI does NOT work here (different automation contract).
|
|
||||||
---
|
---
|
||||||
|
|
||||||
# inkreach-teable operations
|
# inkreach-teable operations
|
||||||
@@ -58,10 +49,11 @@ Full command syntax: [cli-reference.md](guides/cli-reference.md). Instance acces
|
|||||||
| React to a condition matching | Trigger `recordCondition` (NOT recordMatchesConditions) | Official-teable key names |
|
| React to a condition matching | Trigger `recordCondition` (NOT recordMatchesConditions) | Official-teable key names |
|
||||||
| Button click starts a workflow | `buttonClick` trigger + Button field (`options.workflow` object) | Other trigger types |
|
| Button click starts a workflow | `buttonClick` trigger + Button field (`options.workflow` object) | Other trigger types |
|
||||||
| Receive external HTTP | `webhook`; test via `fire webhook` | Expecting auth (backend ignores it) |
|
| Receive external HTTP | `webhook`; test via `fire webhook` | Expecting auth (backend ignores it) |
|
||||||
| Schedule recurring job | `scheduledTime` (only `timing.type` + `interval` honored) | triggerTime/weekdays (ignored) |
|
| Schedule recurring job | `scheduledTime` (only `timing.type` + `interval` honored). If the user asks for specific clock times or weekdays, say up front that the backend ignores them and propose an interval instead | triggerTime/weekdays (ignored silently — configuring them looks fine but never fires as intended) |
|
||||||
| Per-row transformation | `script` action reading `triggerInput` | Row-by-row record API |
|
| Per-row transformation | `script` action reading `triggerInput` | Row-by-row record API |
|
||||||
| Send notification | `sendNotification` (in-app) | `sendEmail` (needs SMTP) unless email required |
|
| Send notification | `sendNotification` (in-app) | `sendEmail` (needs SMTP) unless email required |
|
||||||
| **Inspect select-choice constraints** | `field list --with-options`, `field get <tbl> <name>`, `field visible-choices` | `--json` + manual filtering |
|
| **Inspect select-choice constraints** | `field list --with-options`, `field get <tbl> <name>`, `field visible-choices` | `--json` + manual filtering |
|
||||||
|
| **Write a select-field value** | Verify the value exists in choices first (`field list --with-options`); need a new value → `field update --options` to add the choice, then write | Blind `record update` (400, or typecast silently resolves to null / mutationApplied=false — it never creates choices) |
|
||||||
| Read records for later writes | `record get` (returns record IDs) | `sql` (no record IDs) |
|
| Read records for later writes | `record get` (returns record IDs) | `sql` (no record IDs) |
|
||||||
| Analytics / JOIN | `sql` with GROUP BY | Fetch all records + compute |
|
| Analytics / JOIN | `sql` with GROUP BY | Fetch all records + compute |
|
||||||
| Store an API key for scripts | `secret set` → `process.env.NAME` | Hardcoding |
|
| Store an API key for scripts | `secret set` → `process.env.NAME` | Hardcoding |
|
||||||
@@ -95,6 +87,7 @@ inkreach-teable trigger set wflXXX --type buttonClick --table-id tblXXX --field-
|
|||||||
inkreach-teable action add wflXXX --type script --code 'return triggerInput.record.fields'
|
inkreach-teable action add wflXXX --type script --code 'return triggerInput.record.fields'
|
||||||
inkreach-teable workflow activate wflXXX
|
inkreach-teable workflow activate wflXXX
|
||||||
inkreach-teable fire button-click tblXXX recXXX fldXXX && inkreach-teable runs list wflXXX
|
inkreach-teable fire button-click tblXXX recXXX fldXXX && inkreach-teable runs list wflXXX
|
||||||
|
# webhook 触发器的外部调用地址(无鉴权,激活后生效): {endpoint}/api/webhook/{baseId}/{workflowId} —— 用 fire webhook <baseId> <wflXXX> 本地测试
|
||||||
```
|
```
|
||||||
|
|
||||||
## 5. Common Errors & Recovery
|
## 5. Common Errors & Recovery
|
||||||
@@ -110,3 +103,4 @@ inkreach-teable fire button-click tblXXX recXXX fldXXX && inkreach-teable runs l
|
|||||||
| `runs list` shows failed | Action error | `runs get <wfId> <execId>` → `nodeResults[].error` |
|
| `runs list` shows failed | Action error | `runs get <wfId> <execId>` → `nodeResults[].error` |
|
||||||
| Script deps fail `spawn npm ENOENT` | `npm` not on service PATH | See Key Constraint 11 |
|
| Script deps fail `spawn npm ENOENT` | `npm` not on service PATH | See Key Constraint 11 |
|
||||||
| Record write 400 "does not meet the current row conditions" | Value violates choice `visibilityFilter` | `field visible-choices` to see allowed options |
|
| Record write 400 "does not meet the current row conditions" | Value violates choice `visibilityFilter` | `field visible-choices` to see allowed options |
|
||||||
|
| Select-field write "succeeds" but value unchanged (or becomes null) | Value not in choices — without typecast the API 400s; with typecast it resolves to null and no-ops (`mutationApplied=false`), never creates the choice | `field list --with-options` to confirm; `field update --options` to add the choice, then write |
|
||||||
|
|||||||
@@ -4,30 +4,50 @@
|
|||||||
{
|
{
|
||||||
"id": 1,
|
"id": 1,
|
||||||
"name": "button-click-automation",
|
"name": "button-click-automation",
|
||||||
"prompt": "帮我在 order_logs 表里加一个按钮字段叫「催单」,点这个按钮的时候触发一个自动化,自动化里跑一段脚本,脚本内容是返回当前记录的订单号字段。然后激活它,点一下按钮测试看看执行结果。",
|
"prompt": "帮我在 order_logs 表里加一个按钮字段(名字用:催单按钮{TAG}),点这个按钮的时候触发一个自动化,自动化里跑一段脚本,脚本返回当前记录的订单号。然后激活它,创建一条新记录并点一下按钮测试,确认执行结果。",
|
||||||
"expected_output": "应创建 button 字段(options.workflow.id 指向新 workflow)、创建 workflow、设 buttonClick 触发器、加 script action(读取 triggerInput.record.fields)、激活、fire button-click 测试、runs list 看到 succeeded。关键:button options 用 workflow 对象结构而非 workflowId 字符串。",
|
"expected_output": "创建 button 字段(options.workflow 为对象 {id,...})、workflow、buttonClick 触发器、读取 triggerInput 的 script action、activate、fire button-click 测试、runs 确认 succeeded。"
|
||||||
"files": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 2,
|
"id": 2,
|
||||||
"name": "scheduled-digest",
|
"name": "scheduled-digest",
|
||||||
"prompt": "我想每天定时跑一次自动化,去查一下 order_logs 表里所有记录,把数量统计出来。帮我配一个定时自动化。",
|
"prompt": "我想要每天定时跑一次自动化(工作流名字用:每日统计{TAG}),统计 order_logs 表里的记录数并输出。帮我配好。",
|
||||||
"expected_output": "应创建 workflow、设 scheduledTime 触发器(timing.type + interval,不配后端忽略的字段如 triggerTime/weekdays)、加 getRecords action、加 script action 统计、激活。关键:知道 scheduledTime 后端只认 type+interval。",
|
"expected_output": "scheduledTime 触发器只配 timing.type + timing.interval(后端忽略其他时间字段);script/getRecords action;activate。"
|
||||||
"files": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 3,
|
"id": 3,
|
||||||
"name": "record-condition-trigger",
|
"name": "record-condition-email",
|
||||||
"prompt": "当 order_logs 表里某条记录的「结果」字段变成「失败」的时候,自动发一封邮件通知到 ops@xingchen.tech。帮我配这个自动化。",
|
"prompt": "当 order_logs 表里有记录的「结果」字段变成「失败」时,自动发邮件通知 ops@xingchen.tech(工作流名字用:失败告警{TAG})。帮我配好。",
|
||||||
"expected_output": "应创建 workflow、设 recordCondition 触发器(用 conditions 而非 filter,category 是 recordCondition 而非 recordMatchesConditions)、加 sendEmail action、激活。关键:用正确的自研契约键名 conditions。",
|
"expected_output": "recordCondition 触发器(分类是 recordCondition,条件键名是 conditions 而非 filter);sendEmail action 收件人 ops@xingchen.tech;activate。"
|
||||||
"files": []
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"id": 4,
|
"id": 4,
|
||||||
"name": "debug-failed-run",
|
"name": "debug-failed-run",
|
||||||
"prompt": "我有个自动化 wfl5F8dQRDloo28w909,最近好像没正常跑,帮我看看是什么情况。",
|
"prompt": "我有个自动化 wfl5F8dQRDloo28w909……不对,ID 是 {WFID},名字叫 nightly-sync,最近好像没正常跑,帮我看看是什么情况,别急着改,先诊断清楚再说。",
|
||||||
"expected_output": "应先 workflow get 查 isActive、再 runs list --status failed 查失败记录、runs get 看具体错误。关键:用排查流程而非盲目重新激活。",
|
"expected_output": "先 workflow get 查 isActive → runs list --status failed → runs get 看 nodeResults 错误;指出脚本抛错(boom: upstream sync timeout);未盲目重新激活。"
|
||||||
"files": []
|
},
|
||||||
|
{
|
||||||
|
"id": 5,
|
||||||
|
"name": "select-constraint-write",
|
||||||
|
"prompt": "在 {TBL5} 表里,把订单号为 {ORD} 的那条记录的「结果」改成「已完成」。另外告诉我这个「结果」字段目前一共有哪些可选值。",
|
||||||
|
"expected_output": "先查约束发现「已完成」不在 choices;要么说明并停下,要么先加选项再写入;不发生静默失败。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 6,
|
||||||
|
"name": "official-cli-near-miss",
|
||||||
|
"prompt": "用 teable 的 CLI 工具帮我列出这个基地里都有哪些表。",
|
||||||
|
"expected_output": "路由到 inkreach-teable CLI(官方 teable CLI 在该实例自动化契约不兼容);列出 order_logs;未安装/调用官方 teable CLI 打实例。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 7,
|
||||||
|
"name": "webhook-receiver",
|
||||||
|
"prompt": "帮我建一个自动化(名字:回单通知{TAG}),用 webhook 触发:外部系统会 POST 调用它。建好激活后,把可以调用的完整 URL 给我,并实际测试一次确认能通。",
|
||||||
|
"expected_output": "webhook 触发器;URL 形如 {endpoint}/api/webhook/{baseId}/{workflowId};用 fire webhook 或 curl 实测;已激活。"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": 8,
|
||||||
|
"name": "weekday-schedule-trap",
|
||||||
|
"prompt": "我要一个自动化(名字:工作日盘点{TAG}),每个工作日下午5点跑一次,统计 order_logs 表的记录条数就行。帮我配好。",
|
||||||
|
"expected_output": "知道后端只认 timing.type+interval:要么明确告知『具体时刻/星期』不被支持并给出周期间隔替代方案;绝不悄悄配 weekdays/triggerTime 假装生效。timing 配置无被忽略字段。"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user