Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
larksuite avatar

Lark Wiki

  • 387k installs
  • 15.9k repo stars
  • Updated July 28, 2026
  • larksuite/cli

lark-wiki is a CLI skill for managing Feishu knowledge base spaces, members, and document hierarchy.

About

lark-wiki provides CLI access to Feishu knowledge bases (wikis), enabling agents to create and query wiki spaces, manage members, organize document nodes in the hierarchy, and browse space structure.

  • Manage Feishu knowledge base spaces, members, and document hierarchy
  • Create, query, and organize wiki documents and nodes
  • Browse knowledge space structure and manage space members

Lark Wiki by the numbers

  • 387,236 all-time installs (skills.sh)
  • Security screen: HIGH risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
At a glance

lark-wiki capabilities & compatibility

Use cases
documentation
Runs
Remote server
Pricing
Bring your own API key
From the docs

What lark-wiki says it does

飞书知识库:管理知识空间、空间成员和文档节点。创建和查询知识空间、查看和管理空间成员
SKILL.md
npx skills add https://github.com/larksuite/cli --skill lark-wiki

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs387k
repo stars15.9k
Security audit2 / 3 scanners passed
Last updatedJuly 28, 2026
Repositorylarksuite/cli

How do you manage Feishu knowledge base spaces?

Create, browse, and organize documents in Feishu knowledge bases from your agent.

Who is it for?

Teams organizing documentation in Feishu wikis who need to automate space and node management.

Skip if: Skip lark-wiki for editing Docx body content or Bitable records—use lark-doc or lark-base for document and table operations.

When should I use this skill?

User needs to find or create wiki documents, browse knowledge-space structure, manage space members, or move and copy wiki nodes.

What you get

Created or queried wiki spaces, updated member lists, and reorganized document node trees with moved or copied nodes.

  • organized wiki spaces
  • updated member lists

By the numbers

  • Skill version 1.0.0 using lark-cli wiki v2 API
  • Enforces bot-identity restrictions on department member additions

Files

SKILL.mdMarkdownGitHub ↗

wiki (v2)

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

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

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

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

快速决策

  • 用户给的是知识库 URL(.../wiki/<token>),且后续要查成员/加成员/删成员:先调用 lark-cli wiki spaces get_node --params '{"token":"<wiki_token>"}' 获取 space_id,后续成员接口统一使用 space_id
  • 用户要删除知识空间(wiki +delete-space)但只给了名称或 URL:不能把名称 / URL 原样传给 --space-id,必须先解析出真实 space_id。解析方式:
  • URL(.../wiki/<token>):lark-cli wiki spaces get_node --params '{"token":"<wiki_token>"}' --format json,读 data.node.space_id
  • 只知名称:lark-cli wiki spaces list --format json,边翻页边收集 items 并按 name 精确匹配;一旦任一页累计到至少 1 条精确匹配就停止翻页。只有当翻完所有页(has_more=false)仍无精确匹配时,才对已收集的全量 items 做宽松匹配(name trim 空格、大小写不敏感、子串包含)。
  • 关键安全约束:无论精确还是模糊,无论命中 1 条还是多条,发起删除前都必须把候选(`name` + `space_id` + `description` + `space_type`)列给用户,由用户明确选定一个 `space_id` 再执行。不要因为"只命中一条"就自动执行删除。
  • 命中 0 条:停下来问用户是名称拼错了还是调用方无权限;不要自行改名字重试。
  • 用户明确选定后再执行 lark-cli wiki +delete-space --space-id <ID> --yes(高风险写操作,必须显式 --yes)。
  • 用户要在知识库中创建新节点,优先使用 lark-cli wiki +node-create
  • 用户说“给知识库添加成员/管理员”:先把目标解析成“用户 / 群 / 部门”三类之一,再决定 member_type,不要先调 wiki members create 再根据报错反推类型。
  • 用户说“部门 + bot”:这是已知不支持路径。不要继续尝试 wiki members create --as bot;直接提示必须改成 --as user,或明确告知当前要求无法完成。
  • 用户说“用户 / 群 + 添加成员”:先解析对应 ID,再执行 wiki members create

成员添加流程

  • 调用 lark-cli wiki members create 前,先把自然语言里的“人 / 群 / 部门”解析成正确的 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
  • 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 members create。对于部门场景,这意味着必须是 --as user

目标语义约束

  • 我的文档库 / My Document Library / 我的知识库 / 个人知识库 / my_library 都应视为 Wiki personal library,不是 Drive 根目录
  • 处理这类目标时,先解析 my_library 对应的真实 space_id,再执行 wiki +movewiki +node-create 或其他 Wiki 写操作
  • 不要因为缺少显式 space_id 就退化成 drive +move
  • 如果用户明确说的是 Drive 文件夹、云空间根目录、我的空间,才进入 Drive 域处理

Shortcuts(推荐优先使用)

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

Shortcut说明
`+move`Move a wiki node, or move a Drive document into Wiki
`+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
`+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

API Resour

Related skills

How it compares

Use lark-wiki for space and node organization; use lark-doc when editing the actual document body inside a wiki node.

FAQ

Can lark-wiki add departments with bot identity?

lark-wiki blocks using --as bot with tenant_access_token to add department opendepartmentid members. The skill must stop and explain the limitation rather than silently switching to --as user when bot identity was requested.

When should lark-wiki be used versus lark-doc?

lark-wiki manages knowledge-space structure, members, and node hierarchy via wiki v2 commands. lark-doc handles Docx body create, fetch, and update operations on individual document content.

Is Lark Wiki safe to install?

skills.sh reports 2 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

Documentationdocsintegrations

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.