openclaw-skills/lark-wiki/SKILL.md
飞书知识库:管理知识空间、空间成员和文档节点。创建和查询知识空间、查看和管理空间成员、管理节点层级结构、在知识库中组织文档和快捷方式。当用户需要在知识库中查找或创建文档、浏览知识空间结构、查看或管理空间成员、移动或复制节点时使用。当用户给出 doubao.com 的 /wiki/ URL/token 时,也应直接使用本 skill,不要因为域名不是飞书而回退到 WebFetch;路由依据是 URL 路径模式和 token,而不是域名。不负责:上传文件到知识库节点下(走 lark-drive)、编辑文档/表格/Base 内容(走 lark-doc / lark-sheets / lark-base)。
npx skillsauth add seaworld008/commonly-used-high-value-skills lark-wikiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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。
知识空间和节点都是用户的个人资源,策略上应优先显式使用 --as user(CLI 的 --as 默认值为 auto,不带 --as 时常被解析成 bot,列出的是应用所属空间而非用户的)。仅当用户明确要求“应用 / bot 视角”时才用 --as bot(仍受上面的成员管理硬限制约束)。
../lark-drive/references/lark-drive-workflow.md,再按其中 Workflow Registry 进入 topic_move_collector workflow。该 workflow 使用 Drive 全量搜索召回,再按 Wiki 目标解析、确认和移动;不要只用 Wiki 节点列表做局部遍历。../lark-drive/references/lark-drive-workflow.md,再按其中 Workflow Registry 进入 knowledge_organize workflow;该 workflow 负责 Drive / Wiki / 个人文档库的统一入口解析、资源盘点、分类计划、写前确认和结果验证。wiki +move-to-drive,不要使用 wiki +move 或 drive +move。这是会改变节点归属和权限继承的写操作,执行前确认源节点与目标位置。.../wiki/<token>),且后续要查成员/加成员/删成员:先确定下游成员操作的身份(默认 user;用户明确要求应用 / bot 视角时用 bot),再调用 lark-cli wiki +node-get --node-token '<wiki_url>' --as user --format json,从 data.space_id 获取空间 ID;下游使用 bot 时将示例中的身份改为 --as bot。节点解析与后续成员操作必须使用相同身份。wiki +delete-space)但只给了名称或 URL:不能把名称 / URL 原样传给 --space-id,必须先解析出真实 space_id。解析方式:
.../wiki/<token>):先确定后续 wiki +delete-space 的身份(默认 user;明确要求 bot 视角时用 bot),再调用 lark-cli wiki +node-get --node-token '<wiki_url>' --as user --format json,读取 data.space_id;下游使用 bot 时将示例中的身份改为 --as bot。解析和删除必须使用相同身份。lark-cli wiki spaces list --format json,边翻页边收集 items 并按 name 精确匹配;一旦任一页累计到至少 1 条精确匹配就停止翻页。只有当翻完所有页(has_more=false)仍无精确匹配时,才对已收集的全量 items 做宽松匹配(name trim 空格、大小写不敏感、子串包含)。name + space_id + description + space_type)列给用户,由用户明确选定一个 space_id 再执行。不要因为"只命中一条"就自动执行删除。lark-cli wiki +delete-space --space-id <ID> --yes(高风险写操作,必须显式 --yes)。--space-id(如 --space-id "https://.../wiki/<wiki_token>");务必先用 wiki +node-get 解析出 data.space_id 再传。lark-cli wiki +node-create。lark-cli drive +update-title --url '<wiki_url>' --title '<new_title>'。该命令保留同一个 node_token,并会根据 API 返回给出准确的缺失 scope 和授权提示;不要探索 raw wiki.nodes 的 update_title 端点,也不要通过复制或新建第二个节点实现改名。wiki +space-list --as user 拿数字 space_id,再用 wiki +node-list --space-id <space_id>。不要把 wiki URL、node token、doc token、名称直接当 --space-id。钻子节点时 --parent-node-token 必须是 wiki node token;如果用户给的是 docx/sheet/base URL,先用 wiki +node-get --node-token <url> 解析出 node_token。wiki +node-list 命中 invalid_parameters、not_found、permission_denied 时,不要重复调用同一参数;按 hint 修 space_id / parent_node_token / 权限。只有 rate_limit 才做退避重试。--member-type,不要先调 wiki +member-add 再根据报错反推类型。wiki +member-add --as bot;直接提示必须改成 --as user,或明确告知当前要求无法完成。wiki +member-add。wiki +member-list;该 shortcut 默认只取一页,多成员场景显式加 --page-all。wiki +member-remove,必须传齐原始授予时的 --member-type 和 --member-role(不知道就先 wiki +member-list 查一下)。Shortcut 是对常用操作的高级封装(lark-cli wiki +<verb> [flags])。有 Shortcut 的操作优先使用。
获取或解析 Wiki 节点统一优先使用 wiki +node-get,包括只为获取 space_id、node_token、obj_token 或 obj_type 的中间步骤。只有当前 CLI 不提供该 shortcut,或任务明确需要 shortcut 未输出的原始响应字段时,才回退到 wiki spaces get_node;回退前先运行 lark-cli schema wiki.spaces.get_node。
| 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) |
lark-cli wiki +member-add 前,先把自然语言里的“人 / 群 / 部门 / 应用”解析成正确的 --member-id,不要猜格式。--member-type=openid:用 lark-cli contact +search-user --query "<姓名/邮箱/手机号>" --format json 获取 open_id。--member-type=openchat:用 lark-cli im +chat-search --query "<群名关键词>" --format json 获取 chat_id。--member-type=appid:--member-id 传应用 ID,格式通常为 cli_xxx。userid / unionid 只在下游明确要求时才使用;先拿到 open_id,再调用 lark-cli api GET /open-apis/contact/v3/users/<open_id> --params '{"user_id_type":"open_id"}' --format json 读取 user_id / union_id。--member-type=opendepartmentid:当前 CLI 没有 shortcut,需调用 lark-cli api POST /open-apis/contact/v3/departments/search --as user --params '{"department_id_type":"open_department_id"}' --data '{"query":"<部门名>"}' 获取 open_department_id。lark-cli wiki +member-add。对于部门场景,这意味着必须是 --as user。我的文档库 / My Document Library / 我的知识库 / 个人知识库 / my_library 都应视为 Wiki personal library,不是 Drive 根目录my_library 对应的真实 space_id,再执行 wiki +move、wiki +node-create 或其他 Wiki 写操作space_id 就退化成 drive +move我的空间,再按源对象分流:源对象是 Wiki 节点时用 wiki +move-to-drive,源对象已在 Drive 时用 drive +movelark-cli schema wiki.<resource>.<method> # 调用原生 API 前必须先查看 --data / --params 参数结构,不要猜测字段格式
lark-cli wiki <resource> <method> [flags] # 调用 API
create — 创建知识空间get — 获取知识空间信息get_node — 获取知识空间节点信息list — 获取知识空间列表create — 添加知识空间成员delete — 删除知识空间成员list — 获取知识空间成员列表copy — 创建知识空间节点副本create — 创建知识空间节点list — 获取知识空间子节点列表lark-drive(drive +upload --wiki-token)obj_type 为 file)→ lark-drive:drive +download --wiki-token <node_token> 或 drive +download --url <wiki_url>(CLI 会先把 Wiki 节点解析到底层文件再下载);底层是 docx/sheet/bitable/slides 等在线文档时改用 drive +exportlark-doclark-sheets / lark-baselark-driveThis supplement is maintained by the repository sync pipeline. It keeps the imported upstream skill usable inside this curated collection when the upstream source is intentionally concise.
1. Confirm that the user's task matches the skill trigger.
2. Read the relevant project files or user-provided context before acting.
3. Choose the smallest reversible action that advances the task.
4. Run the verification command or manual check that proves the result.
5. Report the outcome, evidence, and any remaining risk.
tools
飞书审批:查询和处理审批待办/已办/实例,搜索可发起审批定义、查看定义详情并发起原生审批实例。当用户要处理审批任务、查看审批实例、搜索或发起审批时使用。审批待办不是飞书任务;非审批类待办走 lark-task。不负责创建审批定义;三方审批定义不走原生提单。
development
Use when a user needs reproducible repository sizing, language composition, file counts, or code-versus-comment ratios with pygount; record exclusions and verify measurement scope before interpreting results.
development
Route a development task to the official Hermes Agent skill, Graphify Codex artifact set, Open GSD Core bundle, or optional GSD Pi bundle without duplicating their installers or state machines.
development
飞书 / Lark 通讯录:按姓名 / 邮箱解析成 open_id,或按 open_id 反查姓名 / 部门 / 邮箱 / 联系方式 / 个人状态 / 签名,以及按关键词搜索当前用户可见的机器人 / 智能体(agent)。当用户提到一个名字要下一步发消息 / 排日程,或拿到 open_id 想查具体信息时使用。不负责部门树遍历、按部门列员工、组织架构图,这类需求走原生 OpenAPI。