Lark Doc logo

Lark Doc

Community
liangdabiao
lark-doc

飞书云文档:创建和编辑飞书文档。从 Markdown 创建文档、获取文档内容、更新文档(追加/覆盖/替换/插入/删除)、上传和下载文档中的图片和文件、搜索云空间文档。当用户需要创建或编辑飞书文档、读取文档内容、在文档中插入图片、搜索云空间文档时使用;如果用户是想按名称或关键词先定位电子表格、报表等云空间对象,也优先使用本 skill 的 docs +search 做资源发现。

Overview

Publisherliangdabiao
Repositorylark-workflow-feishu-cli
Skill namelark-doc
Stars
68
Forks
10
Bundled files
7
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 7 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by liangdabiao on GitHub. Read the source before you install it.

Installation

Install the Lark Doc AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/liangdabiao/lark-workflow-feishu-cli/tree/main/.claude/skills/lark-doc
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/liangdabiao/lark-workflow-feishu-cli.git /tmp/lark-workflow-feishu-cli
mkdir -p .claude/skills
cp -r /tmp/lark-workflow-feishu-cli/.claude/skills/lark-doc .claude/skills/lark-doc
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Lark Doc in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Lark Doc on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Lark Doc is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

docs (v1)

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

核心概念

文档类型与 Token

飞书开放平台中,不同类型的文档有不同的 URL 格式和 Token 处理方式。在进行文档操作(如添加评论、下载文件等)时,必须先获取正确的 file_token。

文档 URL 格式与 Token 处理

URL 格式示例Token 类型处理方式
/docx/https://example.larksuite.com/docx/doxcnxxxxxxxxxfile_tokenURL 路径中的 token 直接作为 file_token 使用
/doc/https://example.larksuite.com/doc/doccnxxxxxxxxxfile_tokenURL 路径中的 token 直接作为 file_token 使用
/wiki/https://example.larksuite.com/wiki/wikcnxxxxxxxxxwiki_token⚠️ 不能直接使用,需要先查询获取真实的 obj_token
/sheets/https://example.larksuite.com/sheets/shtcnxxxxxxxxxfile_tokenURL 路径中的 token 直接作为 file_token 使用
/drive/folder/https://example.larksuite.com/drive/folder/fldcnxxxxfolder_tokenURL 路径中的 token 作为文件夹 token 使用

Wiki 链接特殊处理(关键!)

知识库链接(/wiki/TOKEN)背后可能是云文档、电子表格、多维表格等不同类型的文档。不能直接假设 URL 中的 token 就是 file_token,必须先查询实际类型和真实 token。

处理流程
  1. 使用 wiki.spaces.get_node 查询节点信息

    bash
    lark-cli wiki spaces get_node --params '{"token":"wiki_token"}'
  2. 从返回结果中提取关键信息

    • node.obj_type:文档类型(docx/doc/sheet/bitable/slides/file/mindnote)
    • node.obj_token:真实的文档 token(用于后续操作)
    • node.title:文档标题
  3. 根据 obj_type 使用对应的 API

    obj_type说明使用的 API
    docx新版云文档drive file.comments.*、docx.*
    doc旧版云文档drive file.comments.*
    sheet电子表格sheets.*
    bitable多维表格bitable.*
    slides幻灯片drive.*
    file文件drive.*
    mindnote思维导图drive.*
查询示例
bash
# 查询 wiki 节点
lark-cli wiki spaces get_node --params '{"token":"wiki_token"}'

返回结果示例:

json
{
   "node": {
      "obj_type": "docx",
      "obj_token": "xxxx",
      "title": "标题",
      "node_type": "origin",
      "space_id": "12345678910"
   }
}

资源关系

Wiki Space (知识空间)
└── Wiki Node (知识库节点)
    ├── obj_type: docx (新版文档)
    │   └── obj_token (真实文档 token)
    ├── obj_type: doc (旧版文档)
    │   └── obj_token (真实文档 token)
    ├── obj_type: sheet (电子表格)
    │   └── obj_token (真实文档 token)
    ├── obj_type: bitable (多维表格)
    │   └── obj_token (真实文档 token)
    └── obj_type: file/slides/mindnote
        └── obj_token (真实文档 token)

Drive Folder (云空间文件夹)
└── File (文件/文档)
    └── file_token (直接使用)

重要说明:画板编辑

⚠️ lark-doc skill 不能直接编辑已有画板内容,但 docs +update 可以新建空白画板

场景 1:已通过 docs +fetch 获取到文档内容和画板 token

如果用户已经通过 docs +fetch 拉取了文档内容,并且文档中已有画板(返回的 markdown 中包含 <whiteboard token="xxx"/> 标签),请引导用户:

  1. 记录画板的 token
  2. 查看 ../lark-whiteboard/SKILL.md 了解如何编辑画板内容

场景 2:刚创建画板,需要编辑

如果用户刚通过 docs +update 创建了空白画板,需要编辑时: 步骤 1:按空白画板语法创建

  • 在 --markdown 中直接传 <whiteboard type="blank"></whiteboard>
  • 需要多个空白画板时,在同一个 --markdown 里重复多个 whiteboard 标签 步骤 2:从响应中记录 token
  • docs +update 成功后,读取响应字段 data.board_tokens
  • data.board_tokens 是新建画板的 token 列表,后续编辑直接使用这里的 token 步骤 3:引导编辑
  • 记录需要编辑的画板 token
  • 查看 ../lark-whiteboard/SKILL.md 了解如何编辑画板内容

注意事项

快速决策

  • 用户说“找一个表格”“按名称搜电子表格”“找报表”“最近打开的表格”,先用 lark-cli docs +search 做资源发现。
  • docs +search 不是只搜文档 / Wiki;结果里会直接返回 SHEET 等云空间对象。
  • 拿到 spreadsheet URL / token 后,再切到 lark-sheets 做对象内部读取、筛选、写入等操作。

补充说明

docs +search 除了搜索文档 / Wiki,也承担“先定位云空间对象,再切回对应业务 skill 操作”的资源发现入口角色;当用户口头说“表格 / 报表”时,也优先从这里开始。

Shortcuts(推荐优先使用)

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

Shortcut说明
+searchSearch Lark docs, Wiki, and spreadsheet files (Search v2: doc_wiki/search)
+createCreate a Lark document
+fetchFetch Lark document content
+updateUpdate a Lark document
+media-insertInsert a local image or file at the end of a Lark document (4-step orchestration + auto-rollback)
+media-downloadDownload document media or whiteboard thumbnail (auto-detects extension)
+whiteboard-updateUpdate an existing whiteboard in lark document with whiteboard dsl. Such DSL input from stdin. refer to lark-whiteboard skill for more details.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Lark Doc AI skill do?

飞书云文档:创建和编辑飞书文档。从 Markdown 创建文档、获取文档内容、更新文档(追加/覆盖/替换/插入/删除)、上传和下载文档中的图片和文件、搜索云空间文档。当用户需要创建或编辑飞书文档、读取文档内容、在文档中插入图片、搜索云空间文档时使用;如果用户是想按名称或关键词先定位电子表格、报表等云空间对象,也优先使用本 skill 的 docs +search 做资源发现。

Why use Lark Doc on TypingMind?

Because you install it once and use it with any model. Lark Doc is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Lark Doc in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/liangdabiao/lark-workflow-feishu-cli/tree/main/.claude/skills/lark-doc. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Lark Doc?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Lark Doc?

As many as you like. As long as a model supports skills, you can use Lark Doc with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Lark Doc AI skill free?

It is published on GitHub by liangdabiao. Check the repository for licensing terms. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇