Home / Market / lark wiki

lark wiki

Feishu Knowledge Base: manages knowledge space, space members and document nodes. Create and query knowledge spaces, view and manage space members, manage node hierarchies, organize documents and shortcuts in the knowledge base. It is used when users need to find or create documents in the knowledge base, browse the knowledge space structure, view or manage space members, move or copy nodes. When the user provides the /wiki/ URL/token of doubao.com, this skill should also be used directly. Do no

skill★ 18311504448 dlskills.shMITInstall in CosmosUpstream Source

Documentation & Preview

--- name: lark-wiki version: 1.0.3 description: "飞书知识库:管理知识空间、空间成员和文档节点。创建和查询知识空间、查看和管理空间成员、管理节点层级结构、在知识库中组织文档和快捷方式。当用户需要在知识库中查找或创建文档、浏览知识空间结构、查看或管理空间成员、移动或复制节点时使用。当用户给出 doubao.com 的 /wiki/ URL/token 时,也应直接使用本 skill,不要因为域名不是飞书而回退到 WebFetch;路由依据是 URL 路径模式和 token,而不是域名。不负责:上传文件到知识库节点下(走 lark-drive)、编辑文档/表格/Base 内容(走 lark-doc / lark-sheets / lark-base)。" metadata: requires: bins: ["lark-cli"] cliHelp: "lark-cli wiki --help"

---

wiki (v2)

CRITICAL — 开始前 MUST 先用 Read 工具读取 ../lark-shared/SKILL.md,其中包含认证、权限处理

> 成员管理硬限制: > - 如果目标是“部门”,先判断身份,再决定是否继续。 > - --as bot 对应 tenant_access_token。官方限制:这种身份下不能使用部门 ID (opendepartmentid) 添加知识空间成员。 > - 遇到“部门 + --as bot”时,禁止先调用 lark-cli wiki +member-add 试错;直接说明该路径不可行。 > - 如果用户明确要求“以 bot 身份运行”,且目标是部门,必须停下说明 bot 路径无法完成,不要静默切到 --as user。

身份选择:优先使用 user 身份

知识空间和节点都是用户的个人资源,策略上应优先显式使用 --as user(CLI 的 --as 默认值为 auto,不带 --as 时常被解析成 bot,列出的是应用所属空间而非用户的)。仅当用户明确要求“应用 / bot 视角”时才用 --as bot(仍受上面的成员管理硬限制约束)。

快速决策

Shortcuts(推荐优先使用)

Shortcut 是对常用操作的高级封装(lark-cli wiki +<verb> [flags])。有 Shortcut 的操作优先使用。

获取或解析 Wiki 节点统一使用 wiki +node-get,包括只为获取 space_id、node_token、obj_token 或 obj_type 的中间步骤。

| Shortcut | 说明 | |----------|------| | +move | Move a wiki node, or move a Drive document into Wiki | | +move-to-drive | Move a wiki node to a Drive folder and poll the async task | | +node-create | Create a wiki node with automatic space resolution | | +delete-space | Delete a wiki space, polling the async delete task when needed | | +space-list | List all wiki spaces accessible to the caller | | +space-create | Create a wiki space (user identity only) | | +node-list | List wiki nodes in a space or under a parent node (supports pagination) | | +node-copy | Copy a wiki node to a target space or parent node | | +node-get | Get a wiki node's details by node_token / obj_token / Lark URL | | +node-delete | Delete a wiki node, polling the async delete task when needed | | +member-add | Add a member to a wiki space | | +member-remove | Remove a member from a wiki space | | +member-list | List members of a wiki space (supports pagination) |

成员添加流程

目标语义约束

API Resources

lark-cli schema wiki.<resource>.<method>   # 调用原生 API 前必须先查看 --data / --params 参数结构,不要猜测字段格式
lark-cli wiki <resource> <method> [flags]  # 调用 API

spaces

members

nodes

不在本 skill 范围