feishu-doc
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFeishu Doc Skill
Feishu Doc Skill
快速索引
Quick Index
文档操作
Document Operations
| 用户意图 | module | tool_action | 必填参数 |
|---|---|---|---|
| 创建文档 | doc | create | 可空(建议 title) |
| 读取文档 | doc | read | document_id |
| 读取文档内容 | doc | read_content | document_id |
| 写入 Markdown | doc | write_markdown | document_id, content(或 markdown) |
| 列出文档块 | doc | list_blocks | document_id |
| 更新文本块 | doc | update_block_text | document_id, block_id, content |
| User Intent | module | tool_action | Required Parameters |
|---|---|---|---|
| Create Document | doc | create | Optional (title recommended) |
| Read Document | doc | read | document_id |
| Read Document Content | doc | read_content | document_id |
| Write Markdown | doc | write_markdown | document_id, content (or markdown) |
| List Document Blocks | doc | list_blocks | document_id |
| Update Text Block | doc | update_block_text | document_id, block_id, content |
Wiki 操作
Wiki Operations
| 用户意图 | module | tool_action | 必填参数 |
|---|---|---|---|
| 列出知识空间 | wiki | list_spaces | - |
| 列出节点 | wiki | list_nodes | space_id |
| 创建节点 | wiki | create_node | space_id, title |
| 获取节点 | wiki | get_node | space_id, node_token |
| User Intent | module | tool_action | Required Parameters |
|---|---|---|---|
| List Knowledge Spaces | wiki | list_spaces | - |
| List Nodes | wiki | list_nodes | space_id |
| Create Node | wiki | create_node | space_id, title |
| Get Node | wiki | get_node | space_id, node_token |
调用示例
Usage Examples
创建文档
Create Document
bash
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "doc",
"tool_action": "create",
"title": "Q1 工作总结",
"folder_token": "fldcnXXXX"
}'bash
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "doc",
"tool_action": "create",
"title": "Q1 Work Summary",
"folder_token": "fldcnXXXX"
}'读取文档内容
Read Document Content
bash
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "doc",
"tool_action": "read_content",
"document_id": "doccnXXXX"
}'bash
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "doc",
"tool_action": "read_content",
"document_id": "doccnXXXX"
}'写入 Markdown 内容
Write Markdown Content
bash
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "doc",
"tool_action": "write_markdown",
"document_id": "doccnXXXX",
"content": "## 概述\n\n本季度完成了以下关键目标:\n\n1. 项目 A 上线\n2. 性能优化 30%"
}'bash
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "doc",
"tool_action": "write_markdown",
"document_id": "doccnXXXX",
"content": "## Overview\n\nThis quarter completed the following key objectives:\n\n1. Project A launched\n2. Performance optimized by 30%"
}'Wiki 操作
Wiki Operations
bash
undefinedbash
undefined列出知识空间
List Knowledge Spaces
python3 skills/feishu-cli/run.py '{"action":"tool","module":"wiki","tool_action":"list_spaces"}'
python3 skills/feishu-cli/run.py '{"action":"tool","module":"wiki","tool_action":"list_spaces"}'
列出节点
List Nodes
python3 skills/feishu-cli/run.py '{"action":"tool","module":"wiki","tool_action":"list_nodes","space_id":"7xxx"}'
undefinedpython3 skills/feishu-cli/run.py '{"action":"tool","module":"wiki","tool_action":"list_nodes","space_id":"7xxx"}'
undefined核心约束
Core Constraints
文档 ID 来源
Document ID Sources
- URL 中提取:→
https://xxx.feishu.cn/docx/doccnXXXXdocument_id = "doccnXXXX" - Wiki URL:先用 获取
wiki get_node,再作为obj_token使用document_id - API 返回:创建文档后返回
- Extract from URL: →
https://xxx.feishu.cn/docx/doccnXXXXdocument_id = "doccnXXXX" - Wiki URL: First use to get
wiki get_node, then use it asobj_tokendocument_id - API Response: Returned after document creation
Lark Markdown 与标准 Markdown 差异
Differences between Lark Markdown and Standard Markdown
飞书文档支持的 Markdown 是 Lark 风味,与标准 GFM 有一些差异:
- 标题: 支持 到
####### - 代码块: 支持 语法
```language - 表格: 使用 标准表格语法
| col1 | col2 | - 任务列表: 使用 和
- [ ]- [x] - 引用: 使用 前缀
> - 特殊块: 支持 、
callout、grid、mermaid等plantuml
Feishu documents support Lark-flavored Markdown, which has some differences from standard GFM:
- Headings: Supports to
####### - Code Blocks: Supports syntax
```language - Tables: Uses standard table syntax
| col1 | col2 | - Task Lists: Uses and
- [ ]- [x] - Blockquotes: Uses prefix
> - Special Blocks: Supports ,
callout,grid,mermaid, etc.plantuml
权限与默认行为
Permissions and Default Behaviors
- 读取需要 scope
docx:document:readonly - 写入需要 scope
docx:document - Wiki 操作需要 相关 scope
wiki:wiki - 通过 CLI 创建文档时,会自动返回 与
urlapplink_url - 创建文档后,CLI 会尝试默认给当前用户开启 管理权限(full_access),无需额外参数;若当前调用身份无法修改协作者权限,则会在返回中给出
manage_permission_warning
- Reading requires scope
docx:document:readonly - Writing requires scope
docx:document - Wiki operations require related scopes
wiki:wiki - When creating a document via CLI, it will automatically return and
urlapplink_url - After document creation, the CLI will attempt to enable full_access management permission for the current user by default, no additional parameters needed; if the current calling identity cannot modify collaborator permissions, a will be included in the response
manage_permission_warning