跳到主要内容

lark-wiki 标准

飞书知识库:管理知识空间、空间成员和文档节点。创建和查询知识空间、查看和管理空间成员、管理节点层级结构、在知识库中组织文档和快捷方式。当用户需要在知识库中查找或创建文档、浏览知识空间结构、查看或管理空间成员、移动或复制节点时使用。

在 GitHub 打开

安装方式

cp -r skills/lark-cli/lark-wiki ~/.claude/skills/lark-wiki

把该 skill 目录放进客户端 skills 目录。不同客户端的目录可能不同,Claude Code 默认是 ~/.claude/skills/

整仓一次性获取:git clone --depth 1 https://github.com/pengfeiqiao/kunpeng.git

依赖与权限

  • 需要 API Key —— 使用前需配置相应的密钥环境变量
  • 无需联网
  • 依赖外部命令:node
  • 以上为按正文与 frontmatter 自动推断的信号,仅供参考;安装前建议先阅读原文。

SKILL.md 正文

来源 pengfeiqiao/kunpeng@bf8a8ac · 许可 MIT · 内容未修改

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。

快速决策

  • 用户给的是知识库 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 +move、wiki +node-create 或其他 Wiki 写操作
  • 不要因为缺少显式 space_id 就退化成 drive +move
  • 如果用户明确说的是 Drive 文件夹、云空间根目录、我的空间,才进入 Drive 域处理

Shortcuts(推荐优先使用)

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

Shortcut说明
[+move](references/lark-wiki-move.md)Move a wiki node, or move a Drive document into Wiki
[+node-create](references/lark-wiki-node-create.md)Create a wiki node with automatic space resolution
[+delete-space](references/lark-wiki-delete-space.md)Delete a wiki space, polling the async delete task when needed
[+space-list](references/lark-wiki-space-list.md)List all wiki spaces accessible to the caller
[+node-list](references/lark-wiki-node-list.md)List wiki nodes in a space or under a parent node (supports pagination)
[+node-copy](references/lark-wiki-node-copy.md)Copy a wiki node to a target space or parent node

API Resources

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

spaces

  • create — 创建知识空间
  • get — 获取知识空间信息
  • get_node — 获取知识空间节点信息
  • list — 获取知识空间列表

members

  • create — 添加知识空间成员
  • delete — 删除知识空间成员
  • list — 获取知识空间成员列表

nodes

  • copy — 创建知识空间节点副本
  • create — 创建知识空间节点
  • list — 获取知识空间子节点列表

权限表

方法所需 scope
spaces.createwiki:space:write_only
spaces.getwiki:space:read
spaces.get_nodewiki:node:read
spaces.listwiki:space:retrieve
members.createwiki:member:create
members.deletewiki:member:update
members.listwiki:member:retrieve
nodes.copywiki:node:copy
nodes.movewiki:node:move
nodes.createwiki:node:create
nodes.listwiki:node:retrieve

质量与来源

所属仓库
pengfeiqiao/kunpeng
仓库星标
99
最近更新
2 天前
采集时间
今天
commit
bf8a8ac8c6d3
内容指纹
sha256:9f7d9f28e3d1425
文件路径
skills/lark-cli/lark-wiki/SKILL.md

同仓库其它 Skill

查看全部 49 个
anchor-frame-production
建立参考分工、锚定图变体、局部核验与版本记录,用于普通对话、画布和工坊的连续镜头创作。
pengfeiqiao/kunpeng 99 原文
Codex CLIMCP 客户端
blender-clay-previz
用户提到白模/白膜/运镜预演/previs 时使用。调用本机 Blender 无界面渲染极简白模场景与运镜视频,用于验证构图遮挡、空间调度与动作时机,也可作为 AI 视频生成的全能参考。
pengfeiqiao/kunpeng 99 原文
Codex CLIMCP 客户端
blender-modeling
在 Blender 中新建或修改可编辑模型、材质、灯光及场景工程。适用于产品建模、场景搭建、已有 blend 修改与渲染;纯白模运镜使用 blender-clay-previz。
pengfeiqiao/kunpeng 99 原文
Codex CLIMCP 客户端
canvas-project-manager
画布能力由 canvas 工具契约提供,本文件仅保留操作顺序和数据安全约束。
pengfeiqiao/kunpeng 99 原文
Codex CLIMCP 客户端
car-commercial-storyboard
汽车TVC、品牌片、汽车文案剧本、车辆资产与图片/视频提示词、分镜及Blender白模运镜。按人物叙事、生活观察、产品演示、造型光影等意图选择方法,维护车型身份与驾驶安全带连续性;不处理购车行情或维修问答。
pengfeiqiao/kunpeng 99 原文
Codex CLIMCP 客户端
car-model-generation
专业的汽车3D模型图片生成技能,使用Gemini API生成高质量汽车展示图片,并通过豆包AI进行质量分析和优化。 使用场景:汽车品牌宣传片、车型展示、汽车广告素材生成。 关键词:汽车模型、车型图、汽车展示图、AI生图、Gemini
pengfeiqiao/kunpeng 99 原文
Codex CLIMCP 客户端

相似 Skill

更多「办公」
opencli-adapter-author
Use when writing an OpenCLI adapter for a new site or adding a new command to an existing site. Guides end-to-end from first recon through field decoding, adapter coding, and verify. Replaces opencli-oneshot / opencli-explorer. For ad-hoc browser driving (no adapter), see opencli-browser instead; for a top-level orientation to opencli, see opencli-usage.
精选 jackwener/OpenCLI 3.0 万 原文
Gemini CLI
opencli-autofix
Automatically fix broken OpenCLI adapters when commands fail. Load this skill when an opencli command fails — it guides you through collecting a trace artifact, patching the adapter, retrying, and filing an upstream GitHub issue after a verified fix. Works with any AI agent.
精选 jackwener/OpenCLI 3.0 万 原文
Gemini CLI
opencli-browser
Use when an agent needs to drive a real Chrome window via opencli — inspect a page, fill forms, click through logged-in flows, or extract data ad-hoc. Covers the selector-first target contract, compound form fields, stale-ref handling, network capture, and the agent-native envelopes the CLI returns. Not for writing adapters — see opencli-adapter-author for that.
精选 jackwener/OpenCLI 3.0 万 原文
Gemini CLI
opencli-usage
Use at the start of any OpenCLI session — this is the top-level map of what `opencli` can do, how to discover adapters, what flags and output formats are universal, and which specialized skill to load next. Point here when an agent asks "what can opencli do?" or "how do I find the right command?".
精选 jackwener/OpenCLI 3.0 万 原文
Gemini CLI
smart-search
基于 opencli 命令的智能搜索路由器。当用户想要使用 OpenCLI、CLI 或 API 搜索、查询、查找或研究信息时,尤其是涉及指定网站、社交媒体、技术资料、新闻、购物、旅游、求职、金融或中文内容时,务必使用此 skill
精选 jackwener/OpenCLI 3.0 万 原文
Gemini CLI
deeptutor-cli
终身个性化辅导系统:根据学习者情况持续调整教学方式。
精选 HKUDS/DeepTutor 4.1 万 仓库简介
Codex CLIMCP 客户端