아래 SKILL.md는
cklxx/elephant.ai(커밋
bc94628)에서
MIT 라이선스에 따라 게시한 것입니다. 본문은 변경하지 않았으며, 파일 상단의 메타데이터만 생략하고 이미지는 링크로 표시하며 매우 긴 파일은 일부만 표시합니다. Copyright 2025 cklxx. 라이선스:
LICENSE. 지침 파일만 표시되며 스크립트 등은 원본 저장소를 참고하세요.
Feishu Doc Skill
快速索引
文档操作
| 用户意图 |
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 |
Wiki 操作
| 用户意图 |
module |
tool_action |
必填参数 |
| 列出知识空间 |
wiki |
list_spaces |
- |
| 列出节点 |
wiki |
list_nodes |
space_id |
| 创建节点 |
wiki |
create_node |
space_id, title |
| 获取节点 |
wiki |
get_node |
space_id, node_token |
调用示例
创建文档
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "doc",
"tool_action": "create",
"title": "Q1 工作总结",
"folder_token": "fldcnXXXX"
}'
读取文档内容
python3 skills/feishu-cli/run.py '{
"action": "tool",
"module": "doc",
"tool_action": "read_content",
"document_id": "doccnXXXX"
}'
写入 Markdown 内容
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%"
}'
Wiki 操作
# 列出知识空间
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_nodes","space_id":"7xxx"}'
核心约束
文档 ID 来源
- URL 中提取:
https://xxx.feishu.cn/docx/doccnXXXX → document_id = "doccnXXXX"
- Wiki URL:先用
wiki get_node 获取 obj_token,再作为 document_id 使用
- API 返回:创建文档后返回
Lark Markdown 与标准 Markdown 差异
飞书文档支持的 Markdown 是 Lark 风味,与标准 GFM 有一些差异:
- 标题: 支持
# 到 ######
- 代码块: 支持
```language 语法
- 表格: 使用
| col1 | col2 | 标准表格语法
- 任务列表: 使用
- [ ] 和 - [x]
- 引用: 使用
> 前缀
- 特殊块: 支持
callout、grid、mermaid、plantuml 等
权限与默认行为
- 读取需要
docx:document:readonly scope
- 写入需要
docx:document scope
- Wiki 操作需要
wiki:wiki 相关 scope
- 通过 CLI 创建文档时,会自动返回
url 与 applink_url
- 创建文档后,CLI 会尝试默认给当前用户开启 管理权限(full_access),无需额外参数;若当前调用身份无法修改协作者权限,则会在返回中给出
manage_permission_warning
라이선스 전문 보기(MIT)
MIT License
Copyright (c) 2025 cklxx
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.