📄 Feishu Doc Collab
Feishuドキュメントでの編集をAIがリアルタイムで検知し、文書内で自動応答することで、人間とAIが協調して作業を進めるSkill。
📺 まず動画で見る(YouTube)
▶ Claude最新!PowerPoint, Excel, Wordを生成できる機能を解説 ↗
※ jpskill.com 編集部が参考用に選んだ動画です。動画の内容と Skill の挙動は厳密には一致しないことがあります。
📜 元の英語説明(参考)
Enable real-time AI collaboration in Feishu (Lark) documents. When a user edits a Feishu doc, the agent automatically detects the change, reads the document, and responds inline — turning any Feishu document into a live human-AI conversation. Features: - Feishu document edit event → triggers isolated agent session automatically - Structured in-doc chat protocol (status flags prevent premature AI responses while user is still typing) - Multi-party support: multiple humans + multiple AI agents in one document - Bitable (spreadsheet) task board integration for collaborative task management - Anti-loop: bot's own edits are automatically ignored Triggers: Feishu doc collaboration, 飞书文档协作, document edit event, in-doc chat, 文档内对话, Lark document AI, feishu doc auto-reply, 飞书文档自动回复
🇯🇵 日本人クリエイター向け解説
Feishuドキュメントでの編集をAIがリアルタイムで検知し、文書内で自動応答することで、人間とAIが協調して作業を進めるSkill。
※ jpskill.com 編集部が日本のビジネス現場向けに補足した解説です。Skill本体の挙動とは独立した参考情報です。
⚠️ ダウンロード・利用は自己責任でお願いします。当サイトは内容・動作・安全性について責任を負いません。
🎯 このSkillでできること
下記の説明文を読むと、このSkillがあなたに何をしてくれるかが分かります。Claudeにこの分野の依頼をすると、自動で発動します。
📦 インストール方法 (3ステップ)
- 1. 上の「ダウンロード」ボタンを押して .skill ファイルを取得
- 2. ファイル名の拡張子を .skill から .zip に変えて展開(macは自動展開可)
- 3. 展開してできたフォルダを、ホームフォルダの
.claude/skills/に置く- · macOS / Linux:
~/.claude/skills/ - · Windows:
%USERPROFILE%\.claude\skills\
- · macOS / Linux:
Claude Code を再起動すれば完了。「このSkillを使って…」と話しかけなくても、関連する依頼で自動的に呼び出されます。
詳しい使い方ガイドを見る →- 最終更新
- 2026-05-17
- 取得日時
- 2026-05-17
- 同梱ファイル
- 7
💬 こう話しかけるだけ — サンプルプロンプト
- › Feishu Doc Collab を使って、来週の会議資料の下書きを作って
- › Feishu Doc Collab で、既存ファイルから必要な部分だけ抽出して
- › Feishu Doc Collab で、提供されたテンプレートに沿って自動整形して
これをClaude Code に貼るだけで、このSkillが自動発動します。
📖 Claude が読む原文 SKILL.md(中身を展開)
この本文は AI(Claude)が読むための原文(英語または中国語)です。日本語訳は順次追加中。
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
- OpenClaw with Feishu channel configured (app ID, app secret, event subscriptions)
- Feishu app event subscriptions enabled:
drive.file.edit_v1— document edit eventsdrive.file.bitable_record_changed_v1— (optional) bitable record changes
- 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 monitor.ts in the Feishu extension to:
- Detect
drive.file.edit_v1events - Trigger an isolated agent session via
/hooks/agent - The agent reads the doc, checks for new messages, and responds
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
POST /hooks/agent with isolated session instructions
↓
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:
-
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)
-
Configure in
config.json:{ "bitable": { "app_token": "your_bitable_app_token", "table_id": "your_table_id" } } -
The patch also handles
bitable_record_changed_v1events for task routing.
Re-applying After Updates
⚠️ OpenClaw updates overwrite monitor.ts. 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.
Configuration Reference
config.json
| Field | Type | Required | Description |
|---|---|---|---|
agent_name |
string | Yes | Internal name used in protocol routing |
agent_display_name |
string | Yes | Display name shown in doc replies |
bitable.app_token |
string | No | Bitable app token for task board |
bitable.table_id |
string | No | Bitable table ID for task board |
Environment
The patch reads from ~/.openclaw/openclaw.json:
hooks.token— authentication for /hooks/agent endpointgateway.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/agentcall, 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 updates overwrite monitor.ts. 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 source files (fragile across updates)
- Feishu app needs
drive.file.edit_v1event subscription approval - Document must use the structured protocol format for reliable routing
- Works best with docx type; other file types (sheets, slides) are not supported
Credits
Created by dongwei. Inspired by the need for real-time human-AI collaboration in Chinese enterprise workflows using Feishu/Lark.
License
MIT
同梱ファイル
※ ZIPに含まれるファイル一覧。`SKILL.md` 本体に加え、参考資料・サンプル・スクリプトが入っている場合があります。
- 📄 SKILL.md (8,138 bytes)
- 📎 assets/DOC_PROTOCOL_TEMPLATE.md (1,422 bytes)
- 📎 references/bitable-task-protocol.md (2,053 bytes)
- 📎 references/feishu-app-setup.md (2,414 bytes)
- 📎 references/manual-patch.md (1,742 bytes)
- 📎 references/monitor-full-patched.ts (18,056 bytes)
- 📎 scripts/patch-monitor.sh (5,836 bytes)