← 返回 Skills 市场
lingzuer

Feishu Bitable CRUD

作者 黄耀武 · GitHub ↗ · v1.1.0 · MIT-0
cross-platform ✓ 安全检测通过
494
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install feishu-bitable-crud
功能描述
Feishu/Lark Bitable CRUD skill. Teaches your agent to correctly use feishu_bitable_* tools for creating, reading, updating records in Feishu Bitable. Handles...
使用说明 (SKILL.md)

飞书多维表格 CRUD Skill / Feishu Bitable CRUD

教会 OpenClaw Agent 正确操作飞书(Lark)多维表格,避免常见的 token 混淆错误。

为什么需要这个 Skill?

OpenClaw 内置的 feishu_bitable_* 工具已经支持多维表格 CRUD,但 Agent 常常犯一个错误: 直接把飞书链接中的 token 当作 app_token 使用,导致 91402 NOTEXIST 错误。

这在飞书知识库(wiki)嵌入的多维表格中尤其常见 — wiki URL 中的 token 是 node_token,不是 bitable 的 app_token

这个 Skill 教会 Agent:

  1. 始终先调用 feishu_bitable_get_meta 解析 URL,获取真实的 app_token
  2. 再用解析得到的 app_token 执行后续 CRUD 操作

安装

clawhub install feishu-bitable-crud

或手动复制到 ~/.openclaw/workspace/skills/feishu-bitable/

前提条件

  1. 飞书插件已启用openclaw.json 中配置了飞书 channel(appId + appSecret)
  2. 应用权限 — 在飞书开放平台后台开通以下权限:
    • bitable:app — 管理多维表格
    • bitable:app:readonly — 读取多维表格
    • wiki:wiki:readonly — 读取知识库(wiki URL 解析需要)
  3. 资源权限 — 在飞书多维表格的「分享」设置中,将你的应用添加为协作者

核心规则

当用户给出包含 /wiki/ 的飞书链接时,必须先用 feishu_bitable_get_meta 解析出真实的 app_token,再进行后续操作。绝对不能直接把 wiki 的 node_token 当作 app_token 使用。

URL 格式说明

飞书多维表格有两种链接格式:

  1. Base 格式(直链):https://xxx.feishu.cn/base/AppToken123?table=tblXXX
    • AppToken123 就是 app_token,可直接使用
  2. Wiki 格式(知识库嵌入):https://xxx.feishu.cn/wiki/NodeToken456
    • NodeToken456 是 wiki 的 node_token不是 bitable 的 app_token
    • 必须先调用 feishu_bitable_get_meta 解析

标准操作流程

第一步:解析 URL,获取 app_token 和 table_id

无论用户给的是 wiki 还是 base 链接,都先调用 feishu_bitable_get_meta

feishu_bitable_get_meta({ url: "用户给的完整URL" })

返回值包含:

  • app_token:真实的多维表格 token(后续所有操作都用这个)
  • table_id:如果 URL 带 ?table= 参数则有
  • tables:表格列表(如果没指定 table_id)

重要:记住返回的 app_token,后续所有操作都使用它,不要再用 URL 里的 token。

第二步:获取表结构(字段列表)

feishu_bitable_list_fields({ app_token: "上一步获取的app_token", table_id: "table_id" })

返回每个字段的 field_nametypetype_name,写入数据时字段名必须与此一致。

第三步:执行操作

写入记录

feishu_bitable_create_record({
  app_token: "app_token",
  table_id: "table_id",
  fields: {
    "字段名1": "文本值",
    "字段名2": 123,
    "字段名3": { text: "显示文本", link: "https://example.com" }
  }
})

查询记录

feishu_bitable_list_records({
  app_token: "app_token",
  table_id: "table_id",
  page_size: 100
})

更新记录

feishu_bitable_update_record({
  app_token: "app_token",
  table_id: "table_id",
  record_id: "recXXX",
  fields: { "字段名": "新值" }
})

创建新表格

feishu_bitable_create_app({ name: "表格名称" })

创建字段

feishu_bitable_create_field({
  app_token: "app_token",
  table_id: "table_id",
  field_name: "新字段名",
  field_type: 1
})

字段类型对照

type type_name 写入格式
1 Text "字符串"
2 Number 12345.6
3 SingleSelect "选项名"
4 MultiSelect ["选项A", "选项B"]
5 DateTime 1700000000000(毫秒时间戳)
7 Checkbox truefalse
11 User [{ id: "ou_xxx" }]
13 Phone "13800138000"
15 URL { text: "显示文本", link: "https://..." }
17 Attachment 不支持直接写入

常见错误及解决

错误码 含义 解决方法
91402 NOTEXIST app_token 无效 检查是否把 wiki node_token 当成了 app_token,必须先用 feishu_bitable_get_meta 解析
131005 not found 表格不存在 检查 table_id 是否正确
99991672 Access denied 权限不足 需要在飞书开放平台后台开通 bitable:bitable 等权限

完整示例:用户给 wiki 链接,写入数据

用户:把数据写入 https://xxx.feishu.cn/wiki/Abc123Def

Step 1: feishu_bitable_get_meta({ url: "https://xxx.feishu.cn/wiki/Abc123Def" })
        → { app_token: "RealToken789", tables: [{ table_id: "tbl001", name: "Sheet1" }] }

Step 2: feishu_bitable_list_fields({ app_token: "RealToken789", table_id: "tbl001" })
        → { fields: [{ field_name: "标题", type: 1 }, { field_name: "链接", type: 15 }] }

Step 3: feishu_bitable_create_record({
          app_token: "RealToken789",
          table_id: "tbl001",
          fields: {
            "标题": "示例数据",
            "链接": { text: "点击查看", link: "https://example.com" }
          }
        })
安全使用建议
This skill is internally consistent and simply documents how to use the platform's feishu_bitable_* tools correctly (notably to call feishu_bitable_get_meta first). Before enabling it: ensure your Feishu plugin/app credentials (appId/appSecret) are stored only in the trusted platform config, grant the app only the minimal Feishu scopes it needs, and test CRUD actions on non-production tables first. If you are concerned about autonomous agent actions, keep agent invocation manual or review logs/approvals for write operations. If you want extra assurance, confirm the feishu plugin implementation/provider is trusted since credentials and API calls rely on that plugin.
功能分析
Type: OpenClaw Skill Name: feishu-bitable-crud Version: 1.1.0 The skill bundle provides legitimate instructions for an AI agent to interact with Feishu (Lark) Bitable APIs. It focuses on resolving common token errors when handling Wiki-embedded tables by teaching the agent to use the 'feishu_bitable_get_meta' tool before performing CRUD operations. No malicious code, data exfiltration, or prompt injection attacks were detected in SKILL.md or _meta.json.
能力评估
Purpose & Capability
Name/description say it helps use feishu_bitable_* tools and the SKILL.md only references those tools and the feishu plugin; requiring the feishu plugin and Feishu app permissions is appropriate for the stated purpose.
Instruction Scope
Runtime instructions are narrowly scoped to parsing Feishu URLs (via feishu_bitable_get_meta) and then calling the feishu_bitable_* CRUD operations. The doc does not instruct reading unrelated files, exfiltrating data to other endpoints, or accessing unrelated environment variables.
Install Mechanism
Instruction-only skill with no install spec and no code files; nothing is downloaded or written to disk by the skill itself.
Credentials
No environment variables or credentials are declared by the skill. The SKILL.md rightly expects the platform's feishu plugin to be configured with the Feishu appId/appSecret and appropriate Feishu app scopes — this is proportional to the task.
Persistence & Privilege
always is false and there is no request to modify other skills or system-wide settings. The skill does not ask for permanent elevated presence.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install feishu-bitable-crud
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /feishu-bitable-crud 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.1.0
Improved documentation: added English description, installation guide, prerequisites, permission setup instructions, and security notes for public users
v1.0.0
Initial release: Feishu/Lark Bitable CRUD skill with wiki/base URL auto-resolution
元数据
Slug feishu-bitable-crud
版本 1.1.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Feishu Bitable CRUD 是什么?

Feishu/Lark Bitable CRUD skill. Teaches your agent to correctly use feishu_bitable_* tools for creating, reading, updating records in Feishu Bitable. Handles... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 494 次。

如何安装 Feishu Bitable CRUD?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install feishu-bitable-crud」即可一键安装,无需额外配置。

Feishu Bitable CRUD 是免费的吗?

是的,Feishu Bitable CRUD 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Feishu Bitable CRUD 支持哪些平台?

Feishu Bitable CRUD 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Feishu Bitable CRUD?

由 黄耀武(@lingzuer)开发并维护,当前版本 v1.1.0。

💬 留言讨论