Token导航 LogoToken导航TokenDH.com
研究检索需要联网clawhub未标认证来源可访问clear审计提醒

feishu-doc-collab飞书文档合作

Agent Skill

用于辅助文档、README、Markdown、说明文和内容稿件的整理与改写。它适合让 Agent 提炼结构、补齐章节、统一术语、检查链接或把零散材料整理成可读文档。使用时应保留项目已有事实、命令和路径,不要把未确认的信息写成确定结论;涉及对外文案时,还需要控制语气,避免过度营销或夸大能力。

总安装

8,940

周安装

384

GitHub Stars

公开资料未说明

下载量

3,133
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:feishu-doc-collab(飞书文档合作)
来源仓库:https://github.com/dongweiii/feishu-doc-collab
安装命令:
openclaw skills install feishu-doc-collab
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install feishu-doc-collab

简介

实现飞书文档实时人工智能协作编辑功能。

  • 自动检测更改并读取文档内容进行智能处理。
  • 适合多人协同写作与内容优化场景。feishu-doc-collab 属于研究检索类 Skill,可作为该场景下的辅助能力补充。
  • 需文档读写权限并关注并发操作冲突问题。
  • 安装前请核实 API 调用频率与团队协作规范。

SKILL.md

name
feishu-doc-collab
description
|
Features
Triggers
Feishu doc collaboration, 飞书文档协作, document edit event, in-doc chat, 文档内对话,

Feishu Document Collaboration Skill

Turn any Feishu document into a real-time human-AI collaboration space.

Overview

This skill patches OpenClaw's Feishu extension to detect document edit events and trigger isolated agent sessions. Combined with a structured in-document chat protocol, it enables:

  • ✍️ Write a question in a Feishu doc → AI reads it and appends a reply
  • 🚦 Status flags (🔴 editing / 🟢 done) prevent premature responses
  • 👥 Multi-party routing: messages can target specific participants
  • 📋 Optional Bitable task board for structured task management

Prerequisites

  1. OpenClaw with Feishu channel configured (app ID, app secret, event subscriptions)
  2. openclaw-lark extension installed (v2026.3+) or built-in feishu extension
  3. Feishu app event subscriptions enabled:

- drive.file.edit_v1 — document edit events - drive.file.bitable_record_changed_v1 — (optional) bitable record changes - drive.file.read_v1 — (optional, auto-ignored to suppress warnings)

  1. Required Feishu app permissions (enable in Open Platform console + user OAuth):

- space:document:retrieve — read documents - docx:document:readonly — read docx content (app-level) - base:table:read — read bitable table structure - base:record:read — read bitable records - base:record:update — update bitable records (for task board) - base:field:read — read bitable field definitions - drive:drive:readonly — read drive file info

  1. Hooks enabled in openclaw.json:
   {
     "hooks": {
       "enabled": true,
       "token": "your-hooks-token-here"
     }
   }

Quick Setup

Step 1: Enable hooks in openclaw.json

Add the hooks section if not present:

# Generate a random token
TOKEN=$(openssl rand -hex 16)
echo "Your hooks token: $TOKEN"
# Then add to openclaw.json:
# "hooks": { "enabled": true, "token": "<TOKEN>" }

Step 2: Apply the monitor patch

bash ./skills/feishu-doc-collab/scripts/patch-monitor.sh

This patches the Feishu extension's monitor.js (or monitor.ts for older installs) to:

  • Detect drive.file.edit_v1 and bitable_record_changed_v1 events
  • Apply 30-second debounce per file to prevent event storms
  • Skip bot's own edits (anti-loop)
  • Trigger an isolated agent session via /hooks/agent with deliver: false
  • Silently ignore drive.file.read_v1 events (suppress warnings)

Step 3: Configure your agent identity

Edit ./skills/feishu-doc-collab/config.json:

{
  "agent_name": "MyBot",
  "agent_display_name": "My AI Assistant"
}

The patch script uses this to set up message routing (who the agent responds as).

Step 4: Restart the gateway

openclaw gateway restart

Step 5: Set up the Doc Chat Protocol

Copy the protocol template to your workspace:

cp ./skills/feishu-doc-collab/assets/DOC_PROTOCOL_TEMPLATE.md ./DOC_PROTOCOL.md

Edit DOC_PROTOCOL.md to fill in your participant roster.

How It Works

Document Edit Flow

User edits Feishu doc
        ↓
Feishu sends drive.file.edit_v1 event
        ↓
Patched monitor.ts receives event
        ↓
Checks: is this the bot's own edit? → Yes: skip (anti-loop)
        ↓ No
Debounce: same file triggered within 30s? → Yes: skip
        ↓ No
POST /hooks/agent with deliver:false (isolated session)
        ↓
Agent reads DOC_PROTOCOL.md for message format
        ↓
Agent reads the document, finds last message block
        ↓
Checks: status=🟢? addressed to me? not from me?
        ↓ Yes
Agent composes reply and appends to document

In-Document Chat Protocol

Messages in the document follow this format:

---
> **Sender Name** → **Receiver Name** | 🟢 完成

Your message content here.

Status flags:

  • 🔴 编辑中 (editing) — AI will NOT process this message (user is still typing)
  • 🟢 完成 (done) — AI will read and respond to this message

Routing:

  • → AgentName — addressed to a specific AI agent
  • → all — broadcast to all participants

This solves a critical problem: Feishu auto-saves continuously while typing, which would trigger multiple premature AI responses without the status flag mechanism.

Bitable Task Board (Optional)

For structured task management alongside document collaboration:

  1. Create a Bitable with these fields:

- Task Summary (Text) - Status (SingleSelect): Unread / Read / In Progress / Done / N/A - Created (DateTime) - From (SingleSelect): participant names - To (MultiSelect): participant names - Priority (SingleSelect): Low / Medium / High / Urgent - Notes (Text) - Related Doc (URL)

  1. Configure in config.json:
   {
     "bitable": {
       "app_token": "your_bitable_app_token",
       "table_id": "your_table_id"
     }
   }
  1. The patch also handles bitable_record_changed_v1 events for task routing.

Re-applying After Updates

⚠️ OpenClaw or extension updates may overwrite monitor.js. After any update:

bash ./skills/feishu-doc-collab/scripts/patch-monitor.sh
openclaw gateway restart

The patch script is idempotent — safe to run multiple times.

Note: For the openclaw-lark extension (compiled .js), no jiti cache clearing is needed. For older built-in .ts installs, also run: rm -f /tmp/jiti/src-monitor.*.cjs

Configuration Reference

config.json

FieldTypeRequiredDescription
agent_namestringYesInternal name used in protocol routing
agent_display_namestringYesDisplay name shown in doc replies
bitable.app_tokenstringNoBitable app token for task board
bitable.table_idstringNoBitable table ID for task board

Environment

The patch reads from ~/.openclaw/openclaw.json:

  • hooks.token — authentication for /hooks/agent endpoint
  • gateway.port — gateway port (default: 18789)

Known Issues & Solutions

Event Storm (事件风暴)

Problem: Feishu sends multiple drive.file.edit_v1 and bitable_record_changed_v1 events for a single logical edit. Bitable edits are especially bad — changing one record field can trigger 10-20+ events in rapid succession. Without debounce, each event spawns a separate isolated agent session (using the full model), causing massive token waste.

Real-world impact: A single bitable task edit triggered 15+ Hook sessions consuming 350k+ tokens, all running in parallel and all reaching the same conclusion: "nothing to do".

Solution: 30-second debounce per fileToken (implemented in patch-monitor.sh v2):

  • A Map<string, number> tracks the last trigger timestamp per file/table
  • If the same file was triggered within 30 seconds, the event is silently skipped
  • For bitable events, the debounce key includes both fileToken and tableId
  • The debounce is applied before the /hooks/agent call, so no session is created

Bot self-edit loop: When the agent updates a bitable record (e.g., changing status to "处理完"), that edit triggers MORE events. The bot self-edit check (comparing operator_id to botOpenId) catches most of these, but the debounce provides a critical safety net for cases where the operator ID doesn't match (e.g., API calls vs. bot identity).

Important: Already-running sessions cannot be stopped by debounce. If an event storm has already started, the sessions will run to completion. Debounce only prevents NEW triggers.

Re-patching After Updates

OpenClaw or extension updates may overwrite monitor.js. After any update:

bash ./skills/feishu-doc-collab/scripts/patch-monitor.sh
openclaw gateway restart

The patch script is idempotent — checks for both /hooks/agent and _editDebounce markers.

Limitations

  • Requires patching OpenClaw extension files (fragile across updates)
  • Feishu app needs drive.file.edit_v1 event subscription approval
  • Multiple OAuth scopes must be authorized (use batch auth for convenience)
  • Document must use the structured protocol format for reliable routing
  • Works best with docx type; other file types (sheets, slides) are not supported
  • Isolated hook sessions reuse cached OAuth tokens from the main interactive session

Credits

Created by dongwei. Inspired by the need for real-time human-AI collaboration in Chinese enterprise workflows using Feishu/Lark.

License

MIT

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

80.1%
按下载量换算2,510

安全审计

VirusTotal

可疑

ClawScan

可疑

Static analysis

可疑

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills