飞书文档读写工具
读取、创建、写入飞书(Lark)文档、Wiki、电子表格及Bitable,自动解析Wiki链接并转换为Markdown。
它能帮你做什么
先看懂,再决定要不要交给 AI。
feishu-doc是一个用于与飞书(Lark)协作平台交互的技能。它支持从飞书Wiki、文档(Docs)、电子表格(Sheets)以及Bitable中读取内容,并将内容转换为Markdown格式。该技能依赖 feishu-common 提供认证与token管理,并支持以下操作:1) 读取文档、电子表格、Bitable与Wiki内容;2) 创建新的空白文档;3) 使用Markdown覆盖写入文档内容;4) 向文档末尾追加Markdown内容;5) 列出、获取、更新及删除文档块(block)。针对超长文档,技能建议先创建文档获取doc_token,再将内容分块后依次追加,避免单次输出超过LLM限制。配置方式支持config.json文件或环境变量(FEISHU_APP_ID、FEISHU_APP_SECRET)。
怎么交给 AI
在线读取优先,本地安装作为备选。
适合能访问网页的 ChatGPT、Agent 或其他 AI。
请访问 https://skills.dhmip.cn/skills/imported/feishu-doc/SKILL.md,读取并按照该 Skill 完成任务;如当前环境支持本地安装,也可以下载该 Skill。未登录时可使用公共安装文档;登录后可以按不同 AI 分开管理。
请根据 https://skills.dhmip.cn/install/skillhub.md,安装 @imported/feishu-doc。兼容性与要求
安装或使用前,先确认环境是否匹配。
使用要求
- 需先安装 feishu-common 依赖
- 需要飞书开放平台的应用凭证 (App ID 与 App Secret),可通过 config.json 或环境变量配置
- 需要 Node.js 环境以执行 index.js
⌘技术详情查看完整 SKILL.md 与原始内容⌄
name: feishu-doc
description: Fetch content from Feishu (Lark) Wiki, Docs, Sheets, and Bitable. Automatically resolves Wiki URLs to real entities and converts content to Markdown.
tags: [feishu, lark, wiki, doc, sheet, document, reader, writer]
Feishu Doc Skill
Fetch content from Feishu (Lark) Wiki, Docs, Sheets, and Bitable. Write and update documents.
Prerequisites
- Install
feishu-commonfirst. - This skill depends on
../feishu-common/index.jsfor token and API auth.
Capabilities
- Read: Fetch content from Docs, Sheets, Bitable, and Wiki.
- Create: Create new blank documents.
- Write: Overwrite document content with Markdown.
- Append: Append Markdown content to the end of a document.
- Blocks: List, get, update, and delete specific blocks.
Long Document Handling (Unlimited Length)
To generate long documents (exceeding LLM output limits of ~2000-4000 tokens):
- Create the document first to get a
doc_token. - Chunk the content into logical sections (e.g., Introduction, Chapter 1, Chapter 2).
- Append each chunk sequentially using
feishu_doc_append. - Do NOT try to write the entire document in one
feishu_doc_writecall if it is very long; use the append loop pattern.
Usage
# Read
node index.js --action read --token <doc_token>
# Create
node index.js --action create --title "My Doc"
# Write (Overwrite)
node index.js --action write --token <doc_token> --content "# Title\nHello world"
# Append
node index.js --action append --token <doc_token> --content "## Section 2\nMore text"
Configuration
Create a config.json file in the root of the skill or set environment variables:
{
"app_id": "YOUR_APP_ID",
"app_secret": "YOUR_APP_SECRET"
}
Environment variables:
FEISHU_APP_IDFEISHU_APP_SECRET