360 Secure SkillHub
360 安全技能中心

Feishu Doc

这是一款飞书文档处理工具,需依赖feishu-common完成鉴权。核心功能涵盖读取飞书文档、表格、多维表格、Wiki内容,创建空白文档,覆盖/追加Markdown内容,对文档块进行增删改查。支持长文档分段追加,可解决超LLM输出限制的问题。通过命令行传参操作,返回文档令牌或操作结果,适用于批量处理飞书文档、生成超长文档等场景。

autogame-17
autogame-17
热度 92.40
最近更新 2026-05-20 03:35:38
分类:效率依赖:代码执行 / 读写文件 / 第三方 API应用场景:API 集成 / 文件转换 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add feishu-doc
Metadata
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-common first.
  • This skill depends on ../feishu-common/index.js for 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):

  1. Create the document first to get a doc_token.
  2. Chunk the content into logical sections (e.g., Introduction, Chapter 1, Chapter 2).
  3. Append each chunk sequentially using feishu_doc_append.
  4. Do NOT try to write the entire document in one feishu_doc_write call 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_ID
  • FEISHU_APP_SECRET