Feishu Bridge
Connect a Feishu (Lark) bot to Clawdbot via WebSocket long-connection. No public server, domain, or ngrok required. Use when setting up Feishu/Lark as a messaging channel, troubles…
Yangsen AN
@alexanys
What This Skill Does
Local WebSocket bridge that connects a Feishu (Lark) bot to Clawdbot Gateway without needing a public server, domain, or ngrok. Handles bot creation, credential setup, bridge startup, macOS auto-restart via launchd, and group chat behavior tuning.
Eliminates the need for a public-facing server or tunneling service by using Feishu's outbound WebSocket long-connection to relay messages to a local Clawdbot instance.
When to Use It
- Set up Feishu/Lark as a messaging channel for your Clawdbot AI agent
- Start or stop the Feishu bridge service on macOS
- Troubleshoot bridge connectivity by checking logs and service status
- Configure group chat response rules (e.g., only reply when @-mentioned or message ends with '?')
- Store Feishu app credentials securely and configure environment variables
- Enable auto-restart of the bridge on macOS using launchd
Install
$ openclaw skills install @alexanys/feishu-bridgeFeishu Bridge
Bridge Feishu bot messages to Clawdbot Gateway over local WebSocket.
Architecture
Feishu user → Feishu cloud ←WS→ bridge.mjs (local) ←WS→ Clawdbot Gateway → AI agent
- Feishu SDK connects outbound (no inbound port / public IP needed)
- Bridge authenticates to Gateway using the existing gateway token
- Each Feishu chat maps to a Clawdbot session (
feishu:<chatId>)
Setup
1. Create Feishu bot
- Go to open.feishu.cn/app → Create self-built app → Add Bot capability
- Enable permissions:
im:message,im:message.group_at_msg,im:message.p2p_msg - Events: add
im.message.receive_v1, set delivery to WebSocket long-connection - Publish the app (create version → request approval)
- Note the App ID and App Secret
2. Store secret
mkdir -p ~/.clawdbot/secrets
echo "YOUR_APP_SECRET" > ~/.clawdbot/secrets/feishu_app_secret
chmod 600 ~/.clawdbot/secrets/feishu_app_secret
3. Install & run
cd <skill-dir>/feishu-bridge
npm install
FEISHU_APP_ID=cli_xxx node bridge.mjs
4. Auto-start (macOS)
FEISHU_APP_ID=cli_xxx node setup-service.mjs
launchctl load ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plist
Diagnostics
# Check service
launchctl list | grep feishu
# Logs
tail -f ~/.clawdbot/logs/feishu-bridge.err.log
# Stop
launchctl unload ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plist
Group chat behavior
Bridge replies only when: user @-mentions the bot, message ends with ?/?, contains request verbs (帮/请/分析/总结…), or calls the bot by name. Customize the name list in bridge.mjs → shouldRespondInGroup().
Environment variables
| Variable | Required | Default |
|---|---|---|
FEISHU_APP_ID | ✅ | — |
FEISHU_APP_SECRET_PATH | — | ~/.clawdbot/secrets/feishu_app_secret |
CLAWDBOT_CONFIG_PATH | — | ~/.clawdbot/clawdbot.json |
CLAWDBOT_AGENT_ID | — | main |
FEISHU_THINKING_THRESHOLD_MS | — | 2500 |
Top skills in this category
API Gateway
@byungkyuCall third-party APIs through the Maton gateway, which injects the credential for an app the user has already connected. Use this skill when the user names a connected app and a concrete action in it - read a mailbox, query a CRM, file an issue, update a spreadsheet, etc.
1password
@steipeteSet up and use 1Password CLI (op). Use when installing the CLI, enabling desktop app integration, signing in (single or multi-account), or reading/injecting/running secrets via op.
Prompt Guard
@seojoonkim650+ pattern AI agent security defense covering prompt injection, supply chain injection, memory poisoning, action gate bypass, unicode steganography, cascad...
Google Drive
@hith3shGoogle Drive API integration with managed OAuth. Search Drive files, manage permissions, organize folders, upload and download files, and handle sharing chan...
Meta Ads
@zachgodsell93Manage Meta (Facebook) Ads campaigns, ad sets, ads, creatives, and access performance metrics via full read/write API integration.