Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/bundle/lark-skills/lark-base
lark-base
Verified【何时用:仅当用户明确指向飞书/Lark(发到飞书、飞书文档等)时使用;泛指做个文档或PPT或表格或方案默认走本地工具,不要误用飞书】飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、BaseApp 应用模式(页面与组件)、Workspace 目录、workflow、角色权限、模板中心(模板分类/列表/搜索);遇到 Base/多维表格/bitable、BaseApp、/base/ 或 /app/ 链接时使用。BaseApp 不走 lark-apps;导入转 lark-drive,认证转 lark-shared。
references/lark-base-record-upsert.md
View on GitHub# base +record-upsert
> **前置条件:** 先阅读 [`../lark-shared/SKILL.md`](../../lark-shared/SKILL.md) 了解认证、全局参数和安全规则。
创建记录,或在带 `--record-id` 时更新记录。
## 推荐命令
```bash
# 创建记录
lark-cli base +record-upsert --base-token <base_token> --table-id <table_id> \
--json '{"项目名称":"Apollo","状态":["进行中"]}'
# 更新记录
lark-cli base +record-upsert --base-token <base_token> --table-id <table_id> --record-id <record_id> \
--json '{"项目名称":"Apollo","状态":["完成"],"完成时间":"2026-03-24 10:00"}'
```
## 参数
| 参数 | 必填 | 说明 |
|------|------|------|
| `--base-token <token>` | 是 | Base Token |
| `--table-id <id_or_name>` | 是 | 表 ID 或表名 |
| `--record-id <id>` | 否 | 传入时走更新,不传时走创建 |
| `--json <body>` | 是 | 字段写入对象,类型 `Map<FieldNameOrID, CellValue>` |
## API
- 创建:`POST /open-apis/base/v3/bases/:base_token/tables/:table_id/records`
- 更新:带 `--record-id` 时改走 `PATCH /records/:record_id`
## `--json` 结构
- `--json` 必须是 **JSON object map**,形状是 `Map<FieldNameOrID, CellValue>`。
- key 是字段名或字段 ID;value 是该字段的 `CellValue`。
- 一次请求里同一字段只用一种标识,避免重复写入冲突。
- 写入前先 `+field-list` 确认字段类型和字段名/ID。
- CellValue 统一看 [lark-base-cell-value.md](lark-base-cell-value.md)。
```json
{
"项目名称": "Apollo",
"状态": ["进行中"],
"完成时间": "2026-03-24 10:00"
}
```
## 返回重点
- 创建时返回 `record` 和 `created: true`。
- 更新时返回 `record` 和 `updated: true`。
- 如果写入了 `formula / lookup / created_at / updated_at / created_by / updated_by` 等只读字段,返回里可能出现 `ignored_fields`,这些字段不会被更新。
## 坑点
- 有 `--record-id` 就一定更新;不传就一定创建,不会自动查重或按业务键 upsert。
- `select` 字段只支持写入字段中已有的选项;构造 CellValue 前先用 `+field-list` 或 `+field-search-options` 确认目标选项存在。
- 这是写入操作,执行前必须确认目标表和字段。
## 参考
- [lark-base-cell-value.md](lark-base-cell-value.md) — CellValue 格式规范
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| planning-and-task-breakdownaddyosmani/agent-skillsBreaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| screenpipethedotmack/claude-memSearch screen and audio history recorded by Screenpipe and optionally save selected context into claude-mem. Use when the user asks to recall desktop activity, a meeting, or something seen in another app through Screenpipe. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| contact-widgetnexu-io/open-designSelf-contained floating chat widget with welcome screen, social links, meeting button, and message input. Single HTML file, zero dependencies. | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |
| meeting-notesnexu-io/open-designMeeting notes page — title bar with attendees, agenda checklist, decisions block, action items table with owners + dates, and a "next meeting" footer. Use when the brief mentions "meeting notes", "minutes", "1:1 notes", "all-hands recap", or "会议纪要". | Stars: 108k | Updated | Claude CodeCodex | Verified | Install |