飞书文档操作-林小满

v1.0.0

在飞书中创建、读取、追加、更新和删除文档内容,支持Markdown格式编辑与文档块管理。

0· 257·0 current·0 all-time
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Benign
medium confidence
Purpose & Capability
Name/description match the instructions: all operations (create/read/append/write/list_blocks/update_block/delete_block) relate to Feishu documents and the parameters described are what you'd expect for document operations.
Instruction Scope
SKILL.md stays within document operations and does not instruct the agent to read arbitrary files, environment variables, or system paths. One omission: it never describes authentication or how the feishu_doc tool obtains API credentials — this is an operational gap rather than direct scope creep.
Install Mechanism
No install spec and no code files: instruction-only skill has minimal surface area and writes nothing to disk. This is the lowest-risk install model.
Credentials
The skill declares no required environment variables or secrets, which is consistent with the absence of an install. However, real Feishu API calls normally require auth tokens; the SKILL.md's silence about credentials suggests the platform or an external 'feishu_doc' tool provides auth. Confirming how authentication is handled is important.
Persistence & Privilege
always is false and the skill does not request persistent system-level privileges or modify other skills' configurations. Autonomous invocation is allowed (platform default) but not combined with other red flags here.
Assessment
This instruction-only Feishu doc skill appears coherent for creating/reading/updating Feishu documents and has low install risk. Before installing or using it, verify: (1) what the 'feishu_doc' tool is and where it runs (platform-provided or third-party?), (2) how authentication is handled and which credentials or tokens will be used/stored (the SKILL.md does not mention tokens), (3) what permissions the token will grant (prefer least privilege), and (4) whether document contents will be logged or transmitted to any external endpoint. Test the skill with non-sensitive documents first and confirm privacy, rate limits, and error-handling (the doc notes create+content issues and recommends create+append). If you cannot confirm how auth is provided, treat the omission as a potential risk and avoid granting broad credentials.

Like a lobster shell, security has layers — review code before you run it.

documentvk97chvw5g0v99q4hm0ytke228h82a55gfeishuvk97chvw5g0v99q4hm0ytke228h82a55glatestvk97chvw5g0v99q4hm0ytke228h82a55gopenclawvk97chvw5g0v99q4hm0ytke228h82a55g
257downloads
0stars
1versions
Updated 1mo ago
v1.0.0
MIT-0

Feishu Doc 技能

概述

飞书文档操作技能,用于在飞书中创建、读取、追加和更新文档。

工具

使用 feishu_doc 工具,参数:

  • action: 操作类型
  • doc_token: 文档 token(从飞书文档 URL 中提取,如 /docx/XXX 中的 XXX)
  • content: 文档内容(markdown 格式)
  • title: 文档标题(仅 create 时使用)
  • folder_token: 文件夹 token(可选)

操作类型

action说明必需参数
create创建新空白文档title
read读取文档内容doc_token
append向文档追加内容doc_token, content
write覆盖写入整个文档doc_token, content
list_blocks列出文档所有块doc_token
get_block获取单个块doc_token, block_id
update_block更新单个块doc_token, block_id, content
delete_block删除单个块doc_token, block_id

创建文档的正确方式

坑:create + content 可能不生效

直接用 create action 并传入大量 content 可能导致文档创建成功但内容为空:

{
  "action": "create",
  "title": "文档标题",
  "content": "大量内容..."
}

正确做法:先 create 空文档,再 append

  1. 先用 create 创建空白文档(只传 title)
  2. 再用 append 逐次追加内容
// 步骤1:创建空白文档
{
  "action": "create",
  "title": "文档标题"
}

// 返回 doc_token,如 "HYhbdqE2Goy9NLxle9XcomtPnVc"

// 步骤2:追加内容
{
  "action": "append",
  "doc_token": "HYhbdqE2Goy9NLxle9XcomtPnVc",
  "content": "# 标题\n\n内容..."
}

文档 URL 解析

飞书文档 URL 格式:

  • https://feishu.cn/docx/{token}
  • https://feishu.cn/wiki/{token}

从 URL 中提取 token:

  • /docx/ 后面的部分就是 token
  • /wiki/ 后面的部分也是 token

使用示例

创建技术文档

{
  "action": "create",
  "title": "OpenClaw 使用指南"
}

返回:

{
  "document_id": "JZyJdrVVTok9mfxVHqJc91Dhn3g",
  "title": "OpenClaw 使用指南",
  "url": "https://feishu.cn/docx/JZyJdrVVTok9mfxVHqJc91Dhn3g"
}

读取文档

{
  "action": "read",
  "doc_token": "JZyJdrVVTok9mfxVHqJc91Dhn3g"
}

追加内容

{
  "action": "append",
  "doc_token": "JZyJdrVVTok9mfxVHqJc91Dhn3g",
  "content": "## 新章节\n\n这里是新增加的内容。"
}

覆盖写入

{
  "action": "write",
  "doc_token": "JZyJdrVVTok9mfxVHqJc91Dhn3g",
  "content": "# 完全覆盖的标题\n\n全部内容都被替换了。"
}

内容格式

  • 使用 Markdown 格式
  • 飞书会自动渲染标题、列表、代码块等
  • 建议每段内容不要太长,分多次 append

常见问题

Q: create 后内容是空的

A: 使用 create + append 的两步写法,不要一次性 create + content

Q: 追加内容格式混乱

A: 每次 append 建议包含完整的 Markdown 结构,飞书会按块处理

Q: 如何知道 doc_token

A: 从 URL 提取,或 create 后的返回值获取


相关工具

  • feishu_wiki: 知识库操作
  • feishu_bitable: 多维表格操作
  • feishu_drive: 云盘操作

Comments

Loading comments...