360 Secure SkillHub
360 安全技能中心

Feishu Comments

通过 Bash 与 Python3 脚本调用飞书 Drive 评论 API,读取指定 docx 文档的全部评论或按评论 ID 批量查询,输出评论 ID、状态、范围、引用文本及各条回复;凭据从本地 OpenClaw 配置读取,需 curl 与 python3,运行期需访问飞书开放平台接口。

deadblue22
deadblue22
热度 58.28
最近更新 2026-05-18 12:11:06
分类:协作依赖:代码执行 / 第三方 API / 读写文件应用场景:任务管理

安装技能

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

执行命令安装此 skill: npx secure-skills-cli add feishu-comments
Metadata
name
feishu-comments
description
Read comments from Feishu documents. Use when: user asks to check/read/fetch comments on a Feishu doc, review feedback on a document, or collaborate on document revisions via comments.

Feishu Document Comments

Fetch comments from Feishu docx documents via the Drive Comment API.

Requirements

  • Feishu app credentials configured in ~/.openclaw/openclaw.json (reads appId and appSecret from channels.feishu)
  • System dependencies: curl, python3 (must be available on PATH)
  • Feishu app permission: docs:document.comment:read or drive:drive

Usage

Run the bundled script to get all comments on a document:

bash skills/feishu-comments/scripts/get_comments.sh <doc_token>

To fetch specific comments by ID:

bash skills/feishu-comments/scripts/get_comments.sh <doc_token> "id1,id2,id3"

Resolve skills/ paths relative to the workspace directory.

When to Use

  • After feishu_doc list_blocks shows comment_ids on blocks
  • When user asks to review or check comments on a document
  • During document collaboration review cycles

Output Format

Each comment shows:

  • Comment ID, status (Open/Resolved), scope (Global/Local)
  • Quoted text (for local/inline comments)
  • All replies with user ID and text content

Extracting doc_token

From URL https://xxx.feishu.cn/docx/ABC123def → doc_token = ABC123def

For wiki pages, first use feishu_wiki to get obj_token, then use that as the doc_token.

How It Works

The bundled shell script:

  1. Reads Feishu app credentials (appId, appSecret) from ~/.openclaw/openclaw.json
  2. Obtains a tenant_access_token via the Feishu auth API
  3. Calls the Drive Comment API to list and batch-query comments
  4. Formats and outputs comment content to stdout

No data is sent to any third party beyond the Feishu/Lark API endpoints.

Limitations

  • Read-only (cannot create or reply to comments)
  • API error responses are printed to stderr (may contain request IDs but no sensitive data)