feishu-connection
Original:🇺🇸 English
Translated
2 scriptsChecked / no sensitive code detected
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, troubleshooting the Feishu bridge, or managing the bridge service (start/stop/logs). Covers bot creation on Feishu Open Platform, credential setup, bridge startup, macOS launchd auto-restart, and group chat behavior tuning.
6installs
Added on
NPX Install
npx skill4agent add xiaomingx/moltbot-connector-feishu-dingtalk feishu-connectionTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Feishu Bridge
Bridge Feishu bot messages to Clawdbot Gateway over local WebSocket.
Architecture
Feishu user → Feishu cloud ←WS→ bridge.py (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_msgim:message.p2p_msg - Events: add , set delivery to WebSocket long-connection
im.message.receive_v1 - Publish the app (create version → request approval)
- Note the App ID and App Secret
2. Store secret
bash
mkdir -p ~/.clawdbot/secrets
echo "YOUR_APP_SECRET" > ~/.clawdbot/secrets/feishu_app_secret
chmod 600 ~/.clawdbot/secrets/feishu_app_secret3. Install & run
bash
cd <skill-dir>/feishu-connection
uv sync
FEISHU_APP_ID=cli_xxx uv run python bridge.py4. Auto-start (macOS)
bash
FEISHU_APP_ID=cli_xxx uv run python setup_service.py
launchctl load ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plistDiagnostics
bash
# Check service
launchctl list | grep feishu
# Logs
tail -f ~/.clawdbot/logs/feishu-bridge.err.log
# Stop
launchctl unload ~/Library/LaunchAgents/com.clawdbot.feishu-bridge.plistGroup 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.pyshould_respond_in_group()Environment variables
| Variable | Required | Default |
|---|---|---|
| ✅ | — |
| — | |
| — | |
| — | |
| — | |