SkillsGrove
SkillsGrove/생산성/cklxx/elephant.ai/feishu-doc

feishu-doc

설치

$npx skills add https://github.com/cklxx/elephant.ai --skill feishu-doc
$git clone --depth 1 https://github.com/cklxx/elephant.ai.git /tmp/elephant.ai && mkdir -p ~/.claude/skills && cp -r /tmp/elephant.ai/skills/feishu-doc ~/.claude/skills/feishu-doc
이 Agent Skill을 설치해 주세요: https://github.com/cklxx/elephant.ai/tree/bc94628f41b7daba20825b86069ae8e0fa83dc5e/skills/feishu-doc — 먼저 SKILL.md와 스크립트를 읽고, 안전하다고 확인한 뒤에만 제 skills 폴더에 설치해 주세요.

요약

원문 설명 · MITWhen 飞书云文档 needs creating, reading, or updating → CRUD docs with Lark-flavored Markdown syntax.
아래 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.