lark-base
SkillCommunityTranslated from ChineseThis skill enables AI agents to interact with Lark Bitable (Base) for comprehensive data management. It supports operations including table creation, field management, record manipulation, view configuration, data analysis, form handling, dashboard management, workflow automation, and role-based access control.
Compatibility:
Install:
npx skills add open.feishu.cn/lark-basebase
When to use
Use this skill:
- The user explicitly mentions Base / Bitable, or provides a
/base/link. - The user wants to build tables, modify tables, manage fields, write records, query records, or configure views within a Base.
- The user wants to perform formula fields, lookup fields, cross-table calculations, derived metrics, filtering/aggregation, TopN, or statistical analysis within a Base.
- The user wants to manage Base forms, dashboards, workflows, advanced permissions, or roles.
- The user wants to migrate old Base aggregate commands or legacy syntax to the current
lark-cli base +...shortcut.
Do not use this skill:
- For authentication, initialization, identity switching, scope handling, or permission authorization recovery; redirect to
lark-shared. - To import local Excel / CSV /
.basefiles into Base; redirect tolark-drive +import --type bitable. - For generalized data analysis, field design, or formula discussions that lack Base/Bitable context.
Usage boundaries
- Base business operations must only use the
lark-cli base +...shortcut; do not use legacy aggregate commands like+table / +field / +record / +view / +history / +workspace. - This Base skill does not depend on
lark-cli schema. The SKILL only retains routing, risk management, and complex JSON/DSL; simple commands are handled by the command's own parameters, tips, and error recovery. - When a user wants to import Excel / CSV /
.baseinto Base, first redirect tolark-cli drive +import --type bitable, and return to Base commands after the import is complete. - When a user only provides a Base name or keyword, first use
lark-cli drive +search --query <keyword> --doc-types bitableto locate the resource. - Base commands must have a
base_tokenor a resolvable Base URL. If no token is available: if the user wants to create a new one, use+base-create; if the user provides a title/keyword, search usinglark-cli drive +search --query "<base title>" --doc-types bitable --only-title --as user; if it still cannot be located, ask the user to specify which Base they mean. - Authentication, initialization, scope, identity switching, and permission recovery belong to
lark-shared; the Base documentation only retains permission rules that affect Base path selection.
Quick routing
| User Goal | Priority Command | When to read reference |
|---|---|---|
| Query Base object | +base-get | Use the return to confirm Base name, owner, permissions, and token for further operations |
| Create/Copy Base | +base-create / +base-copy | Report the new Base identifier after writing; note the permission_grant in the return |
| View Base resource directory | +base-block-list | Use this first to understand which tables/docx/dashboards/workflows/folders are in a Base; see --help for ID relationships and fewshot |
| Manage Base resource directory | +base-block-create/move/rename/delete | Create or organize folders/tables/docx/dashboards/workflows directly managed by the Base; for resource content, continue using corresponding commands |
| Manage data tables | +table-list/get/create/update/delete | Handle listing, details, creation, renaming, and deletion of tables |
| List/Query/Delete fields | +field-list/get/delete/search-options | Use list/get to confirm field type, options, and ID before writing; confirm target field before deletion |
| Create/Update fields | +field-create / +field-update | Must read lark-base-field-json.md; for formulas read formula-field-guide.md; for lookups read lookup-field-guide.md; for command details read lark-base-field-create.md / lark-base-field-update.md |
| Read record details | +record-get / +record-list / +record-search | Read lark-base-data-analysis-sop.md when involving filtering, sorting, Top/Bottom N, aggregation, multi-table joins, or global conclusions |
| Write records | +record-upsert / +record-batch-create / +record-batch-update | Must read lark-base-record-upsert.md / lark-base-record-batch-create.md / lark-base-record-batch-update.md and lark-base-cell-value.md |
| Attachment fields | +record-upload-attachment / +record-download-attachment / +record-remove-attachment | Do not fake attachments as normal CellValue; upload via local file, download/delete by file token or field location |
| Delete records / Share record link / History | +record-delete / +record-share-link-create / +record-history-list | Confirm record before deletion; share links limited to 100; for history read lark-base-record-history-list.md, only query single records, do not perform full table audits |
| Manage views | +view-* | For +view-set-filter read lark-base-view-set-filter.md; for other configurations, get current status first, then update according to the returned structure |
| One-time aggregate statistics | +data-query | Must read lark-base-data-analysis-sop.md and the entry lark-base-data-query-guide.md; for full DSL read lark-base-data-query.md |
| Formula fields | +field-create/update --json '{"type":"formula",...}' | Must read formula-field-guide.md, then add hidden confirmation flag --i-have-read-guide |
| Lookup fields | +field-create/update --json '{"type":"lookup",...}' | Must read lookup-field-guide.md, then add hidden confirmation flag --i-have-read-guide |
| Form submission | +form-submit | First read lark-base-form-detail.md to get base_token required for questions, filters, and attachments; for submission JSON read lark-base-form-submit.md |
| Form question create/update | +form-questions-create / +form-questions-update | Read lark-base-form-questions-create.md / lark-base-form-questions-update.md |
| Other form management | +form-list/get/detail/create/update/delete / +form-questions-list/delete | For +form-detail read lark-base-form-detail.md; confirm target form before deletion |
| Dashboards and components | +dashboard-* / +dashboard-block-* | When charts/dashboards/blocks are mentioned, first read lark-base-dashboard.md; for component data_config read dashboard-block-data-config.md; use +dashboard-block-get-data to read chart calculation results |
| Workflow | +workflow-* | When creating/updating or understanding steps, read the entry lark-base-workflow-guide.md and steps JSON SSOT lark-base-workflow-schema.md; list/get/enable/disable only handle workflow ID and status |
| Advanced permissions and roles | +advperm-* / +role-* | For role operations, first read the entry lark-base-role-guide.md; for role create/update or interpreting full configuration, read permission JSON SSOT role-config.md; system roles cannot be deleted; disabling advanced permissions affects custom roles |
Base mental model
- Base was formerly known as Bitable;
bitablein returned fields, errors, or legacy documents is for historical compatibility and does not mean you should switch to raw APIs or a different set of commands. +base-block-listis the new entry point for viewing a resource directory within a Base: it listsfolder/table/docx/dashboard/workflowdirectly managed by the Base, suitable for determining what is in the Base before deciding to use table, dashboard, workflow, or docx commands.base-blockis only responsible for resource directory management, including creating resources, moving to folders, renaming, and deleting; specific resource content still uses table/dashboard/workflow commands.- Names and IDs of tables, fields, views, workflows, and dashboard blocks must come from real returns; do not guess based on user descriptions.
- Storage fields are writable; system fields,
formula, andlookupare read-only; attachment fields use dedicated attachment commands. - For one-time raw record queries, prioritize
+record-list/+record-searchfilter/sort; for aggregate analysis, prioritize+data-query; only addformula/lookupfields when long-term display in the table is required. formulais suitable for routine calculations, conditional logic, text/date processing, and long-term derived metrics;lookupis suitable for explicit cross-table lookups, filtered value retrieval, or aggregate references.- Before writing, analyzing, using formulas, lookups, workflows, or dashboards, read the real structure: table, field, view, linked table, and dashboard block names must be based on command returns.
- Cross-table scenarios must read the target table structure; the associated
record_idin link cells is just a connection key; the final answer must look up and display user-readable fields.
Identity and permission degradation
- By default, explicitly use
--as userto operate on user resources; only use--as botwhen the user explicitly requests application identity. - If user identity reports scope/authorization insufficiency, or errors contain
permission_violations/hint, first redirect tolark-sharedfor user authorization recovery; do not downgrade to bot directly. - Only retry once with
--as botif user identity reports resource-level access denial without authorization recovery hints; if bot still fails, stop retrying and handle as a permission error. - Do not loop identity switching for
91403or explicit access errors. - If
+base-create/+base-copyis executed with bot identity, pay attention topermission_grantin the return and inform the user whether they can open the new Base.
Query and statistical rules
When involving queries, statistics, or conclusions, first read lark-base-data-analysis-sop.md and comply with:
- The default page, fixed
--limit, and localjqof+record-listonly prove facts within the read range; they cannot support global extremes, total counts, Top/Bottom N, anomaly identification, or grouping conclusions. - Filtering, sorting, projection, aggregation, grouping, and limits that can be expressed by Base should be executed in Base cloud query capabilities; do not pull raw records to local context for manual filtering/sorting.
has_more=trueor equivalent pagination signals indicate the current result is not exhaustive; unless the user only wants samples/first N items, do not answer global questions based on that page.- Multi-table queries must first confirm relationship fields and connection keys; the
record_idin link cells is a relationship key, not a user-readable answer. - The final answer must be traceable to the real table, real field, query scope, filter/sort/aggregation conditions, and necessary connection keys.
- For one-time raw record queries, prioritize
+record-list/+record-searchfilter/sort; for aggregate analysis, prioritize+data-query; only consider addingformula/lookupfields if the result needs to be displayed in the table long-term. +data-querycan return aggregate results or dimension field rows, but dimension rows are deduplicated by field combinations and do not returnrecord_id; use+record-list/+record-search/+record-getto look up individual records, record locations, or full row-level fields.
Writing prerequisites
- Read field structure before writing records; only write to storage fields. System fields, attachment fields,
formula, andlookupare not written as normal records. - Attachment upload, download, and deletion use dedicated
+record-*-attachmentcommands. - Read lark-base-field-json.md before writing fields; for
formula/lookup, must read formula-field-guide.md / lookup-field-guide.md. - Table names, field names, view names, and names in workflow configurations must come from real returns; cross-table scenarios also require reading the target table structure.
- High-risk operations like deletion, role updates, and field updates follow the CLI confirmation gate; use get/list to disambiguate when targets are unclear.
- Batch writes are limited to 200 items per batch; execute serially when writing to the same table, and handle
1254291by waiting briefly between retries. +record-batch-updateis for "same-value batch updates": the same patch is applied to allrecord_id_list; do not use it for row-by-row different value mapping.- Writing unknown options to select/multiselect may trigger new options on the platform; if not intended, use
+field-listor+field-search-optionsto confirm available values.
Form and view details
- Before
+form-submit, must run+form-detailto readquestions[].type,required,filter, and thebase_tokenrequired for attachment scenarios; do not fill in questions hidden by filters. - Do not write form attachments into
fields; place them in--json.attachments; when submitting attachments, must also pass the--base-tokenof the Base to which the form belongs. +view-set-filteris the only retained view reference; for configurations like sort/group/card/timebar/visible-fields, first use the corresponding get command to read the current status, retain unmodified fields, and only replace configurations the user requested to change.- Views are suitable for persistence, sharing, and UI reuse; for one-time filtering/sorting, use
+record-list/+record-searchfilter/sort to verify results before settling into a persistent view.
Tokens and links
| Input Type | Meaning / Correct Handling |
|---|---|
/base/{token} | Normal Base link; extract token after /base/ as --base-token |
/wiki/{token} | Wiki node link; first wiki +node-get, when data.obj_type=bitable use data.obj_token as --base-token |
/base/{token}?table={id} | table parameter used to locate objects within Base: tbl prefix is data table --table-id; blk prefix is dashboard ID; wkf prefix is workflow ID |
/base/{token}?view={id} | view parameter used to locate table view, extract as --view-id; usually also need to confirm table parameter or check table structure first |
/share/base/form/{shareToken} | Form share link; this is a form share token, use +form-detail / +form-submit --share-token <shareToken> |
/share/base/view/{shareToken} | View share link; has share permission semantics, not currently supported for direct CLI access; guide user to open in browser or Lark client |
/share/base/dashboard/{shareToken} | Dashboard share link; has share permission semantics, not currently supported for direct CLI access; guide user to open in browser or Lark client |
/record/{shareToken} | Record share link; not currently supported for direct CLI access; guide user to open in browser or Lark client. If user wants to generate a share link for an existing record, use +record-share-link-create --base-token <base_token> --table-id <table_id> --record-ids <record_id> |
/base/workspace/{token} | BaseApp / workspace link; not currently supported for direct CLI access |
When wiki +node-get returns non-bitable, do not continue using Base commands: redirect docx to document commands, sheet to spreadsheet commands, and other cloud objects to corresponding skills or drive.
Dashboard / Workflow / Role
- The complexity of Dashboards lies in the
data_configof blocks, not in list/get/create/delete command parameters. Read dashboard-block-data-config.md before creating or updating blocks; components must be created serially;+dashboard-arrangeis server-side intelligent layout, only execute when the user explicitly requests rearrangement/beautification.+dashboard-block-get-datareads the final chart calculation results and does not return block name, type, layout, ordata_config; for metadata, use+dashboard-block-getfirst. - The complexity of Workflows lies in the
stepsstructure. Read the entry lark-base-workflow-guide.md and steps JSON SSOT lark-base-workflow-schema.md when creating, updating, or explaining a full workflow; enable/disable/list only require confirming workflow ID, current status, and user intent. - The complexity of Roles lies in the permission JSON. For role operations, first read the entry lark-base-role-guide.md;
+role-createonly supports custom roles;+role-updateis a delta merge; read permission JSON SSOT role-config.md when creating/updating roles or interpreting full configurations.+role-deleteonly applies to custom roles; system roles cannot be deleted; confirm target and impact before deleting roles or disabling advanced permissions.
Common recovery
| Error / Phenomenon | Recovery Action |
|---|---|
param baseToken is invalid / base_token invalid | Check if wiki token, workspace token, or full URL was used as --base-token; re-locate real Base token according to Tokens and links |
not found and input is from Wiki link | Prioritize checking if wiki token was used as base token; do not immediately switch to raw API |
1254045 field name does not exist | Re-run +field-list, use real field name or field ID; note spaces, case sensitivity, and cross-table fields |
1254015 field value type mismatch | First +field-list, then construct CellValue according to lark-base-cell-value.md |
| Date / User / Hyperlink field format error | Date uses YYYY-MM-DD HH:mm:ss; User uses [{ "id": "ou_xxx" }]; Hyperlink uses URL or markdown link string |
| formula / lookup creation failure | First read formula-field-guide.md / lookup-field-guide.md, then rebuild request according to guide |
ignored_fields / READONLY | Remove read-only fields, only write to storage fields |
1254104 | Batch exceeds 200, call in batches |
1254291 | Concurrent write conflict, write serially and wait briefly between batches |
91403 | No permission to access this Base, handle according to lark-shared permission flow; do not retry blindly |
Retained References
- lark-base-data-analysis-sop.md: SOP for query/statistics/global conclusions
- lark-base-data-query-guide.md / lark-base-data-query.md: Aggregate query entry fewshot and DSL SSOT
- lark-base-cell-value.md: Record CellValue construction
- lark-base-field-json.md: Field JSON construction
- formula-field-guide.md / lookup-field-guide.md: Formula and lookup fields
- lark-base-field-create.md / lark-base-field-update.md: Field creation/update command-level supplement
- lark-base-record-upsert.md / lark-base-record-batch-create.md / lark-base-record-batch-update.md / lark-base-record-history-list.md: Record write JSON and history return explanation
- lark-base-view-set-filter.md: View filter JSON
- lark-base-form-detail.md / lark-base-form-submit.md / lark-base-form-questions-create.md / lark-base-form-questions-update.md: Form details, submission, and complex JSON
- lark-base-dashboard.md / dashboard-block-data-config.md / lark-base-dashboard-block-get-data.md: Dashboard, component configuration, and chart result protocol
- lark-base-workflow-guide.md / lark-base-workflow-schema.md: Workflow entry and steps JSON SSOT
- lark-base-role-guide.md / role-config.md: Role entry and permission JSON SSOT
base
何时使用
使用本 skill:
- 用户明确提到 Base / 多维表格 / bitable,或给出
/base/链接。 - 用户要在 Base 内建表、改表、管理字段、写记录、查记录、配视图。
- 用户要在 Base 内做公式字段、lookup 字段、跨表计算、派生指标、筛选聚合、TopN、统计分析。
- 用户要管理 Base 表单、仪表盘、workflow、高级权限或角色。
- 用户要把旧 Base 聚合式命令或旧写法迁移到当前
lark-cli base +...shortcut。
不要使用本 skill:
- 只是认证、初始化配置、切换身份、处理 scope 或权限授权恢复,转
lark-shared。 - 把本地 Excel / CSV /
.base导入成 Base,转lark-drive +import --type bitable。 - 泛化数据分析、字段设计、公式讨论,但没有 Base/多维表格上下文。
使用边界
- Base 业务操作只使用
lark-cli base +...shortcut,不使用旧聚合式+table / +field / +record / +view / +history / +workspace。 - 本轮 Base 不依赖
lark-cli schema。SKILL 只保留路由、风险和复杂 JSON/DSL;简单命令由命令自身的参数、tips 和错误恢复承接。 - 用户要把 Excel / CSV /
.base导入成 Base 时,先转lark-cli drive +import --type bitable,导入完成后再回到 Base 命令。 - 用户只给 Base 名称或关键词时,先用
lark-cli drive +search --query <keyword> --doc-types bitable定位资源。 - Base 命令必须先有
base_token或可解析出的 Base URL。没有 token 时:用户要新建就用+base-create;用户给标题/关键词就搜lark-cli drive +search --query "<base title>" --doc-types bitable --only-title --as user;仍无法定位时,反问用户具体是哪一个 Base。 - 认证、初始化、scope、身份切换、权限不足恢复属于
lark-shared;Base 文档只保留会影响 Base 路径选择的权限规则。
快速路由
| 用户目标 | 优先命令 | 何时读 reference |
|---|---|---|
| 查 Base 本体 | +base-get | 用返回确认 Base 名称、owner、权限和可继续操作的 token |
| 创建/复制 Base | +base-create / +base-copy | 写入后报告新 Base 标识;注意返回中的 permission_grant |
| 查看 Base 内资源目录 | +base-block-list | 想先了解一个 Base 里有哪些 table/docx/dashboard/workflow/folder 时优先用它;返回 ID 关系和 fewshot 看 --help |
| 管理 Base 内资源目录 | +base-block-create/move/rename/delete | 创建或整理 Base 直接管理的 folder/table/docx/dashboard/workflow;资源内容继续用对应命令 |
| 管理数据表 | +table-list/get/create/update/delete | 处理 table 的列出、详情、创建、重命名和删除 |
| 列/查/删字段 | +field-list/get/delete/search-options | 写入前用 list/get 确认字段类型、选项、ID;删除前确认目标字段 |
| 创建/更新字段 | +field-create / +field-update | 必读 lark-base-field-json.md;公式读 formula-field-guide.md;lookup 读 lookup-field-guide.md;命令细节读 lark-base-field-create.md / lark-base-field-update.md |
| 读记录明细 | +record-get / +record-list / +record-search | 涉及筛选、排序、Top/Bottom N、聚合、多表关联、全局结论时读 lark-base-data-analysis-sop.md |
| 写记录 | +record-upsert / +record-batch-create / +record-batch-update | 必读 lark-base-record-upsert.md / lark-base-record-batch-create.md / lark-base-record-batch-update.md 和 lark-base-cell-value.md |
| 附件字段 | +record-upload-attachment / +record-download-attachment / +record-remove-attachment | 附件不要伪造成普通 CellValue;上传走本地文件,下载/删除按 file token 或字段定位 |
| 删除记录 / 分享记录链接 / 历史 | +record-delete / +record-share-link-create / +record-history-list | 删除前确认 record;分享链接最多 100 条;历史读 lark-base-record-history-list.md,只查单条记录,不做整表审计 |
| 管理视图 | +view-* | +view-set-filter 读 lark-base-view-set-filter.md;其余配置先 get 现状,再按返回结构更新 |
| 一次性聚合统计 | +data-query | 必读 lark-base-data-analysis-sop.md 和入口 lark-base-data-query-guide.md;完整 DSL 再读 lark-base-data-query.md |
| 公式字段 | +field-create/update --json '{"type":"formula",...}' | 必读 formula-field-guide.md,读后再加隐藏确认 flag --i-have-read-guide |
| Lookup 字段 | +field-create/update --json '{"type":"lookup",...}' | 必读 lookup-field-guide.md,读后再加隐藏确认 flag --i-have-read-guide |
| 表单提交 | +form-submit | 先读 lark-base-form-detail.md 获取题目、filter 和附件所需 base_token;提交 JSON 读 lark-base-form-submit.md |
| 表单题目创建/更新 | +form-questions-create / +form-questions-update | 读 lark-base-form-questions-create.md / lark-base-form-questions-update.md |
| 其他表单管理 | +form-list/get/detail/create/update/delete / +form-questions-list/delete | +form-detail 读 lark-base-form-detail.md;删除前确认目标表单 |
| 仪表盘与组件 | +dashboard-* / +dashboard-block-* | 提到图表/看板/block 时先读 lark-base-dashboard.md;组件 data_config 读 dashboard-block-data-config.md;读取图表计算结果用 +dashboard-block-get-data |
| Workflow | +workflow-* | 创建/更新或理解 steps 时读入口 lark-base-workflow-guide.md 和 steps JSON SSOT lark-base-workflow-schema.md;list/get/enable/disable 只处理 workflow ID 与启停状态 |
| 高级权限与角色 | +advperm-* / +role-* | 角色操作先读入口 lark-base-role-guide.md;角色 create/update 或解读完整配置再读权限 JSON SSOT role-config.md;系统角色不可删除;关闭高级权限会影响自定义角色 |
Base 心智模型
- Base 曾用名 Bitable;返回字段、错误或旧文档里的
bitable多为历史兼容,不代表应改走裸 API 或另一套命令。 +base-block-list是查看一个 Base 内资源目录的新入口:它列出这个 Base 直接管理的folder/table/docx/dashboard/workflow,适合先判断 Base 里有什么,再决定走 table、dashboard、workflow 或 docx 命令。base-block只负责资源目录管理,包括创建资源、移动到 folder、重命名和删除;具体资源内容仍走 table/dashboard/workflow 命令。- 表、字段、视图、workflow、dashboard block 的名称和 ID 必须来自真实返回,不要凭用户口述猜。
- 存储字段可写;系统字段、
formula、lookup只读;附件字段走专用 attachment 命令。 - 一次性原始记录查询优先用
+record-list/+record-search的 filter/sort;聚合分析优先用+data-query;需要长期显示在表中时,才新增formula/lookup字段。 formula适合常规计算、条件判断、文本/日期处理和长期派生指标;lookup适合明确的跨表查找、筛选后取值或聚合引用。- 写入、分析、公式、lookup、workflow、dashboard 前,先读取真实结构:表、字段、视图、关联表和 dashboard block 名称都以命令返回为准。
- 跨表场景必须读取目标表结构;link 单元格中的关联
record_id只是连接键,最终回答要回查并展示用户可读字段。
身份与权限降级
- 默认显式使用
--as user操作用户资源;只有用户明确要求应用身份时,才直接用--as bot。 - user 身份报 scope/授权不足,或错误中包含
permission_violations/hint,先转lark-shared做用户授权恢复,不要直接降级 bot。 - user 身份报资源级无访问且无授权恢复提示时,才可用
--as bot重试一次;bot 仍失败就停止重试并按权限错误处理。 91403或明确不可访问错误不要循环换身份重试。+base-create/+base-copy若用 bot 身份执行,关注返回中的permission_grant,并把用户是否可打开新 Base 告知用户。
查询与统计规则
涉及查询、统计或判断结论时,先阅读 lark-base-data-analysis-sop.md,并遵守:
+record-list的默认页、固定--limit和本地jq只能证明已读取范围内的事实,不能直接支撑全局最值、全量计数、Top/Bottom N、异常识别或分组结论。- 能由 Base 表达的筛选、排序、投影、聚合、分组和限制,应在 Base 云端查询能力中执行;不要先拉原始记录到本地上下文再手工筛选排序。
has_more=true或等价分页信号表示当前结果不是全量;除非用户只要样例/前 N 条,不能基于该页回答全局问题。- 多表查询必须先确认关系字段和连接键;link 单元格里的
record_id是关系键,不是用户可读答案。 - 最终答案必须能追溯到真实表、真实字段、查询范围、筛选/排序/聚合条件和必要的连接键。
- 一次性原始记录查询优先用
+record-list/+record-search的 filter/sort;聚合分析优先用+data-query;要把结果长期显示在表里,才考虑新增formula/lookup字段。 +data-query可返回聚合结果或维度字段行,但维度行按字段组合去重且不返回record_id;需要逐条记录、记录定位或完整行级字段时,再用+record-list/+record-search/+record-get回查。
写入前置规则
- 写记录前先读字段结构;只写存储字段。系统字段、附件字段、
formula、lookup不作为普通记录写入目标。 - 附件上传、下载、删除走专用
+record-*-attachment命令。 - 写字段前先读 lark-base-field-json.md;涉及
formula/lookup时必须读 formula-field-guide.md / lookup-field-guide.md。 - 表名、字段名、视图名、workflow 配置中的名称必须来自真实返回;跨表场景还要读取目标表结构。
- 删除、角色更新、字段更新等高风险操作遵循 CLI 的 confirmation gate;目标不明确时先用 get/list 消歧。
- 批量写入单批最多 200 条;连续写同一表时串行执行,遇到
1254291按短暂等待后重试处理。 +record-batch-update是“同值批量更新”:同一份 patch 应用到全部record_id_list,不要拿它做逐行不同值映射。- select/multiselect 写入未知选项可能触发平台新增选项;不是要新增时,先用
+field-list或+field-search-options确认可选值。
表单与视图细节
+form-submit前必须先跑+form-detail,读取questions[].type、required、filter和附件场景需要的base_token;不要填写被 filter 隐藏的问题。- 表单附件不要写进
fields,放在--json.attachments;提交附件时必须同时传表单所属 Base 的--base-token。 +view-set-filter是唯一保留的 view reference;sort/group/card/timebar/visible-fields 这类配置先用对应 get 命令读现状,保留未修改字段,只替换用户要求变更的配置。- 视图适合持久化、共享和 UI 复用;一次性筛选/排序可先用
+record-list/+record-search的 filter/sort 验证结果,再按需要沉淀为持久视图。
Token 与链接
| 输入类型 | 含义 / 正确处理方式 |
|---|---|
/base/{token} | 普通 Base 链接;提取 /base/ 后的 token 作为 --base-token |
/wiki/{token} | Wiki 节点链接;先 wiki +node-get,当 data.obj_type=bitable 时使用 data.obj_token 作为 --base-token |
/base/{token}?table={id} | table 参数用于定位 Base 内对象:tbl 开头是数据表 --table-id;blk 开头是 dashboard ID;wkf 开头是 workflow ID |
/base/{token}?view={id} | view 参数用于定位表视图,提取为 --view-id;通常还需要确认 table 参数或先查表结构 |
/share/base/form/{shareToken} | 表单分享链接;这是表单 share token,走 +form-detail / +form-submit --share-token <shareToken> |
/share/base/view/{shareToken} | 视图分享链接;具有分享权限语义,暂不支持用 CLI 直接访问,引导用户在浏览器或飞书客户端打开 |
/share/base/dashboard/{shareToken} | 仪表盘分享链接;具有分享权限语义,暂不支持用 CLI 直接访问,引导用户在浏览器或飞书客户端打开 |
/record/{shareToken} | 记录分享链接;暂不支持用 CLI 直接访问,引导用户在浏览器或飞书客户端打开。若用户想生成现有记录的分享链接,用 +record-share-link-create --base-token <base_token> --table-id <table_id> --record-ids <record_id> |
/base/workspace/{token} | BaseApp / workspace 链接;暂不支持用 CLI 直接访问 |
wiki +node-get 返回非 bitable 时,不继续使用 Base 命令:docx 转文档,sheet 转表格,其他云空间对象转对应 skill 或 drive。
Dashboard / Workflow / Role
- Dashboard 的复杂点是 block 的
data_config,不是 list/get/create/delete 命令参数。创建或更新 block 前先读 dashboard-block-data-config.md,组件必须串行创建;+dashboard-arrange是服务端智能布局,只在用户明确要求重排/美化时执行。+dashboard-block-get-data读取图表最终计算结果,不返回 block 名称、类型、布局或data_config;需要元数据先用+dashboard-block-get。 - Workflow 的复杂点是
steps结构。创建、更新或解释完整 workflow 时读入口 lark-base-workflow-guide.md 和 steps JSON SSOT lark-base-workflow-schema.md;enable/disable/list 只需确认 workflow ID、当前启停状态和用户意图。 - Role 的复杂点是权限 JSON。角色操作先读入口 lark-base-role-guide.md;
+role-create只支持自定义角色;+role-update是 delta merge;角色 create/update 或解读完整配置时读权限 JSON SSOT role-config.md。+role-delete只适用于自定义角色,系统角色不可删除;删除角色和关闭高级权限前必须确认目标和影响。
常见恢复
| 错误 / 现象 | 恢复动作 |
|---|---|
param baseToken is invalid / base_token invalid | 检查是否把 wiki token、workspace token 或完整 URL 当成了 --base-token;按 Token 与链接 重新定位真实 Base token |
not found 且输入来自 Wiki 链接 | 优先检查是否把 wiki token 当成 base token,不要立刻改走裸 API |
1254045 字段名不存在 | 重新 +field-list,使用真实字段名或字段 ID;注意空格、大小写和跨表字段 |
1254015 字段值类型不匹配 | 先 +field-list,再按 lark-base-cell-value.md 构造 CellValue |
| 日期 / 人员 / 超链接字段报格式错误 | 日期用 YYYY-MM-DD HH:mm:ss;人员用 [{ "id": "ou_xxx" }];超链接用 URL 或 markdown link 字符串 |
| formula / lookup 创建失败 | 先读 formula-field-guide.md / lookup-field-guide.md,再按 guide 重建请求 |
ignored_fields / READONLY | 移除只读字段,只写存储字段 |
1254104 | 批量超过 200,分批调用 |
1254291 | 并发写冲突,串行写入并在批次间短暂等待 |
91403 | 无权限访问该 Base,按 lark-shared 权限流程处理,不要盲目重试 |
保留 Reference
- lark-base-data-analysis-sop.md:查询/统计/全局结论的选路 SOP
- lark-base-data-query-guide.md / lark-base-data-query.md:聚合查询入口 fewshot 与 DSL SSOT
- lark-base-cell-value.md:记录 CellValue 构造
- lark-base-field-json.md:字段 JSON 构造
- formula-field-guide.md / lookup-field-guide.md:公式与 lookup 字段
- lark-base-field-create.md / lark-base-field-update.md:字段创建/更新命令级补充
- lark-base-record-upsert.md / lark-base-record-batch-create.md / lark-base-record-batch-update.md / lark-base-record-history-list.md:记录写入 JSON 与历史返回解释
- lark-base-view-set-filter.md:视图筛选 JSON
- lark-base-form-detail.md / lark-base-form-submit.md / lark-base-form-questions-create.md / lark-base-form-questions-update.md:表单详情、提交和复杂 JSON
- lark-base-dashboard.md / dashboard-block-data-config.md / lark-base-dashboard-block-get-data.md:仪表盘、组件配置与图表结果协议
- lark-base-workflow-guide.md / lark-base-workflow-schema.md:workflow 入口与 steps JSON SSOT
- lark-base-role-guide.md / role-config.md:角色入口与权限 JSON SSOT
Details:
Installs
201,828First seen
Jun 10, 2026
Auto-fetched from GitHub .
Stats via skills.sh.
Skills similar to lark-base:
Installs
Installs
Installs