Agent skill

Feishu Document Collaboration

by LeoYeAI in LeoYeAI/openclaw-master-skills

Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

MITAuto-check passedProductivity & Automation

Install Feishu Document Collaboration

skills CLI
$ npx skills add LeoYeAI/openclaw-master-skills --skill feishu-doc-collab -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install LeoYeAI/openclaw-master-skills feishu-doc-collab --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/LeoYeAI/openclaw-master-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/feishu-doc-collab .claude/skills/feishu-doc-collab && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
feishu-doc-collab
GitHub stars
2.2k
Token cost
~2k tokens
SKILL.md length
726 words
Files
10 (incl. scripts, references, assets)
Skills in repo
1,235
Repo updated
First seen
Licence
MIT

At a glance

Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space.

  • Works in 5 steps: Enable hooks in openclaw.json → Apply the monitor patch → Configure your agent identity → …
  • Turning a shared Feishu document into a live back-and-forth with an AI agent
  • SKILL.md covers Overview, Prerequisites, Quick Setup and How It Works, plus 6 more sections
  • Runs TypeScript and Shell scripts from its folder; calls bash and openssl

What it does

A Feishu document edit fires a drive.file.edit_v1 event, which this skill's patched monitor turns into a call to an isolated agent session through /hooks/agent; the agent then reads the document, checks for new messages and appends a reply. Status flags such as a red editing marker and a green done marker stop the AI from replying while someone is still mid-sentence, and the bot ignores its own edits to avoid a reply loop.

Setup has five steps: enable hooks in openclaw.json with a generated token, run scripts/patch-monitor.sh to apply the monitor patch, set the agent's name and display name in config.json, restart the gateway, and copy the DOC_PROTOCOL_TEMPLATE.md into the workspace to define the participant roster. Messages inside the document follow a fixed format naming sender and receiver with a status flag, which supports several humans and several agents working in one document at once.

An optional Bitable integration adds a spreadsheet-style task board, triggered by a bitable_record_changed event, for teams that want structured task tracking alongside the free-form document chat.

When your agent uses it

  • Turning a shared Feishu document into a live back-and-forth with an AI agent
  • Letting several people and several agents collaborate in one document
  • Adding a lightweight task board on top of document-based collaboration

Example prompts

  • “Set up Feishu document collaboration for our planning doc.”
  • “Reply inline in the roadmap document to the question I just typed.”
  • “Add a status flag to my message so the bot knows I'm still editing.”

Requirements

  • OpenClaw with a configured Feishu channel (app ID and secret)
  • Feishu event subscriptions for drive.file.edit_v1 and, optionally, bitable_record_changed_v1
  • Hooks enabled in openclaw.json

Workflow steps

5 steps, taken from the step headings in SKILL.md.

  1. Enable hooks in openclaw.json
  2. Apply the monitor patch
  3. Configure your agent identity
  4. Restart the gateway
  5. Set up the Doc Chat Protocol

What it can do on your machine

Read from SKILL.md and the folder at commit e5199b5. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships 1 file in scripts/ (TypeScript and Shell), which the agent can run.

    Shell commands in SKILL.md call:

    • bash
    • openssl

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Feishu Document Collaboration loads about 2k tokens when it runs, and up to ~8.1k if it reads all its reference files. Until then it costs about 201 tokens; SKILL.md has 726 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~201
When it runs · the whole SKILL.md, loaded when a task matches
~2k
With references · SKILL.md plus every file in references/, read only if the agent opens them
~8.1k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); the scripts in this folder are not scanned.

SKILL.md

The full file from LeoYeAI/openclaw-master-skills at commit e5199b5, republished under its MIT licence (© LeoYeAI). 726 words, ~1,999 tokens.

Download SKILL.mdSave it as .claude/skills/feishu-doc-collab/SKILL.md (or your agent's skills folder). This skill also uses 9 other files; get the full folder from GitHub.
name
feishu-doc-collab
description
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 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. Feishu app event subscriptions enabled:
    • drive.file.edit_v1 — document edit events
    • drive.file.bitable_record_changed_v1 — (optional) bitable record changes
  3. Hooks enabled in openclaw.json:
    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:

bash
# 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
bash ./skills/feishu-doc-collab/scripts/patch-monitor.sh

This patches monitor.ts in the Feishu extension to:

  • Detect drive.file.edit_v1 events
  • 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:

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
bash
openclaw gateway restart
Step 5: Set up the Doc Chat Protocol

Copy the protocol template to your workspace:

bash
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:

markdown
---
> **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)
  2. Configure in config.json:

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

Re-applying After Updates

⚠️ OpenClaw updates overwrite monitor.ts. After any update:

bash
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
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

Show full SKILL.md (295 more words)Show less
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 updates overwrite monitor.ts. After any update:

bash
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_v1 event 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

© LeoYeAI, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 9 other files (scripts, references, assets) in skills/feishu-doc-collab of LeoYeAI/openclaw-master-skills.

  • SKILL.md
  • .clawhub/origin.json
  • _meta.json
  • assets/DOC_PROTOCOL_TEMPLATE.md
  • config.json
  • references/bitable-task-protocol.md
  • references/feishu-app-setup.md
  • references/manual-patch.md
  • references/monitor-full-patched.ts
  • scripts/patch-monitor.sh

Open the folder on GitHubat commit e5199b5

Compare with similar skills

Feishu Document Collaboration next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Feishu Document Collaboration compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Feishu Document Collaboration this skillLeoYeAI/openclaw-master-skills2.2k—~2kAutomated safety check: PassMIT
Feishu Docopenclaw/openclaw392k—~516Automated safety check: PassMIT
Feishu Docraucvr/Group-Goki1123 repos~592Automated safety check: PassMIT
Feishu Driveraucvr/Group-Goki1123 repos~587Automated safety check: PassMIT
Feishu Permraucvr/Group-Goki1123 repos~630Automated safety check: PassMIT
Feishu Safety GuideSafeAI-Lab-X/ClawKeeper1k—~3.6kAutomated safety check: PassNone

Similar skills

  • Feishu Doc

    openclaw/openclaw

    Feishu document read/write workflows. An agent skill from openclaw/openclaw.

    392k GitHub stars~516 tokensUpdated today
    Productivity & AutomationAuto-check passed
  • Feishu Doc

    raucvr/Group-Goki

    Feishu document read/write operations. An agent skill from raucvr/Group-Goki.

    112 GitHub starsUsed in 3 repos~592 tokens
    Productivity & AutomationAuto-check passed
  • Feishu Drive

    raucvr/Group-Goki

    Feishu cloud storage file management. An agent skill from raucvr/Group-Goki.

    112 GitHub starsUsed in 3 repos~587 tokens
    Productivity & AutomationAuto-check passed
  • Feishu Perm

    raucvr/Group-Goki

    Feishu permission management for documents and files. An agent skill from raucvr/Group-Goki.

    112 GitHub starsUsed in 3 repos~630 tokens
    Productivity & AutomationAuto-check passed
  • Feishu Safety Guide

    SafeAI-Lab-X/ClawKeeper

    One-click deployment Skill for Feishu security governance and message anti-data-leakage guide, responsible for Feishu message security, credential protection, permission auditing, interaction…

    1k GitHub stars~3.6k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check passed
  • Tlive

    y49/tlive

    tlive — remote approvals (Telegram/Feishu/web), live web terminal, and session monitoring for Claude Code / Codex.

    215 GitHub stars~1.7k tokensUpdated 1 mo ago
    Productivity & AutomationAuto-check: notes

More from LeoYeAI/openclaw-master-skills

All 1,235 skills in this repo
  • DevOps Pipeline Management

    LeoYeAI/openclaw-master-skills

    Manages pipelines on a DevOps quality and efficiency platform through its OpenAPI: list workspaces and templates, create, update, run and cancel pipelines, and read run records.

    2.2k GitHub stars~4.2k tokensUpdated 2 mo ago
    Auto-check: notes
  • Files Memory System

    LeoYeAI/openclaw-master-skills

    Multi-context memory management system for OpenClaw agents with group-isolated storage, global shared memory, workspace organization, and group-specific skills isolation.

    2.2k GitHub stars~3.8k tokensUpdated 2 mo ago
    Auto-check passed
  • GEO-Claw AI Visibility Agent

    LeoYeAI/openclaw-master-skills

    Runs a brand's AI-search visibility work end to end: diagnosing how AI platforms represent it, repositioning it, producing AI-optimized content and monitoring ongoing mentions.

    2.2k GitHub stars~4.7k tokensUpdated 2 mo ago
    Auto-check passed
  • Google Workspace CLI

    LeoYeAI/openclaw-master-skills

    Installs and authenticates the gws CLI, then automates Gmail, Drive, Sheets, Calendar, Docs, Chat and Tasks with ready-made recipes, persona bundles and security audits.

    2.2k GitHub stars~2.6k tokensUpdated 2 mo ago
    Auto-check: notes
  • HealthFit Health Advisors

    LeoYeAI/openclaw-master-skills

    Runs four advisor roles, a fitness coach, nutritionist, data analyst and TCM practitioner, to build a health profile and track workouts, diet and wellness over time.

    2.2k GitHub stars~4.4k tokensUpdated 2 mo ago
    Auto-check passed
  • Humanizer

    LeoYeAI/openclaw-master-skills

    Humanize AI-generated text by detecting and removing patterns typical of LLM output.

    2.2k GitHub stars~2k tokensUpdated 2 mo ago
    Auto-check passed

Works with

Questions about Feishu Document Collaboration

What does Feishu Document Collaboration do?

Patches OpenClaw's Feishu extension so an edited document triggers an isolated agent session that reads the doc and replies inline, turning it into a live chat space. edit_v1 event, which this skill's patched monitor turns into a call to an isolated agent session through /hooks/agent; the agent then reads the document, checks for new messages and appends a reply. Status flags such as a red editing marker and a green done marker stop the AI from replying while someone is still mid-sentence, and the bot ignores its own edits to avoid a reply loop.

When should I use Feishu Document Collaboration?

Feishu Document Collaboration fits situations like: turning a shared Feishu document into a live back-and-forth with an AI agent; letting several people and several agents collaborate in one document; adding a lightweight task board on top of document-based collaboration.

How do I install Feishu Document Collaboration in Claude Code?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill feishu-doc-collab -a claude-code`. Or copy the skill folder (skills/feishu-doc-collab in LeoYeAI/openclaw-master-skills) into .claude/skills/feishu-doc-collab in your project. Claude Code loads it when a task matches its description.

How do I install Feishu Document Collaboration in Codex?

Run `npx skills add LeoYeAI/openclaw-master-skills --skill feishu-doc-collab -a codex`. Or copy the skill folder (skills/feishu-doc-collab in LeoYeAI/openclaw-master-skills) into .agents/skills/feishu-doc-collab in your project. Codex loads it when a task matches its description.

Can I use Feishu Document Collaboration in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add LeoYeAI/openclaw-master-skills --skill feishu-doc-collab -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/feishu-doc-collab, .gemini/skills/feishu-doc-collab, .github/skills/feishu-doc-collab and .opencode/skills/feishu-doc-collab in your project.

What does Feishu Document Collaboration need to run?

Going by SKILL.md and its folder, Feishu Document Collaboration needs TypeScript and a shell for the scripts in its folder and the command-line tools its instructions call (bash and openssl). Our summary lists: OpenClaw with a configured Feishu channel (app ID and secret); Feishu event subscriptions for drive.file.edit_v1 and, optionally, bitable_record_changed_v1; Hooks enabled in openclaw.json.

Does Feishu Document Collaboration access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Feishu Document Collaboration safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. The check reads SKILL.md only: the scripts in the folder are not scanned, so read them before running anything.

What licence does Feishu Document Collaboration use?

Feishu Document Collaboration is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Feishu Document Collaboration use?

About 2k tokens (SKILL.md is roughly 8k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full. Its references folder adds about 6.1k tokens, read only when the agent opens those files.

What are the alternatives to Feishu Document Collaboration?

Skills that share tags, products or a category with Feishu Document Collaboration: Feishu Doc (openclaw/openclaw, 392k stars), Feishu Doc (raucvr/Group-Goki, 112 stars), Feishu Drive (raucvr/Group-Goki, 112 stars) and Feishu Perm (raucvr/Group-Goki, 112 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Feishu Document Collaboration?

LeoYeAI (a GitHub user) maintains it in LeoYeAI/openclaw-master-skills, which has 2,161 GitHub stars. The repository holds 1,235 skills in this directory. The repository was last updated on July 20, 2026.

Source: LeoYeAI/openclaw-master-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.