PluginBench
Skill
Pass
Audit score 90

feishu-binding

starchild-ai-agent/official-skills

Connect or disconnect Feishu/Lark accounts for agent messaging via device flow authorization.

What is feishu-binding?

Manages Feishu (China) and Lark (International) account binding using device-flow OAuth. Use this to set up or tear down agent access to chat via the Feishu/Lark app, with QR code and direct-link options.

  • Start device-flow authorization with QR code and verification URL
  • Poll for user confirmation and complete binding
  • Check current Feishu/Lark connection status
  • Disconnect and unbind Feishu/Lark accounts
  • Support both Feishu (China) and Lark (International) brands

How to install feishu-binding

npx skills add https://github.com/starchild-ai-agent/official-skills --skill feishu-binding
Prerequisites
  • User must have an active Feishu (feishu.cn) or Lark (larksuite.com) account
  • User must be able to scan QR codes or open links in their Feishu/Lark app
Claude Code
Cursor
Windsurf
Cline

How to use feishu-binding

  1. 1.Call `feishu(action="status")` to check if already connected
  2. 2.If not connected, call `feishu(action="connect", brand="feishu")` (or `brand="lark"` for international)
  3. 3.Display the returned QR code image inline and show the verification URL as a clickable link
  4. 4.Wait for the user to confirm they've scanned the QR or opened the link and authorized in their app
  5. 5.Call `feishu(action="poll", device_code=<code>, brand=<same brand>)` to check completion
  6. 6.If status is `done`, confirm success; if `pending`, remind user to complete authorization; if `expired`, start a new `connect`
  7. 7.To disconnect, confirm with user first, then call `feishu(action="disconnect")` to unbind

Use cases

Good for
  • User wants to chat with the agent via Feishu app instead of web interface
  • Setting up multi-channel messaging to include Feishu/Lark alongside Telegram or WeChat
  • User needs to switch from Feishu to Lark or vice versa
  • Checking if Feishu/Lark is already connected before attempting binding
  • Removing Feishu/Lark access when no longer needed
Who it's for
  • Agents managing multi-channel messaging
  • Users in China wanting Feishu integration
  • International users preferring Lark
  • Teams coordinating across Feishu/Lark and other messaging platforms

feishu-binding FAQ

What's the difference between Feishu and Lark?

Feishu (feishu.cn) is for China mainland users; Lark (larksuite.com) is for international users. Ask the user which they use, defaulting to Feishu for Chinese-speaking users.

Why shouldn't I auto-poll after calling connect?

Device flow expires in ~5 minutes and auto-polling wastes API calls. Wait for the user to confirm they've opened the link and authorized in their app before polling.

What if the device flow expires?

If `poll` returns `expired`, the user took too long to confirm (typically over 5 minutes). Start a new `connect` to get a fresh verification URL and device code.

Can a user have both Feishu and Lark connected at the same time?

No, only one Feishu/Lark app per user. To switch brands, the user must `disconnect` first, then `connect` with the new brand.

How do I display the QR code to the user?

Include the `file_path` from the `connect` response in your reply (e.g., `![Feishu QR Code](feishu_qrcode_xxx.png)`). Also show the `verification_url` as a clickable link. On Telegram, use `send_to_telegram(file_path=<qr_path>, message_type="photo")`.

Full instructions (SKILL.md)

Source of truth, from starchild-ai-agent/official-skills.


name: feishu-binding version: 1.0.0 description: | Feishu/Lark binding: device flow authorization, connect, disconnect, status check.

Use when setting up or managing Feishu/Lark connection (e.g. connect Feishu, connect Lark, bind 飞书, check Feishu status, disconnect Lark). author: starchild tags: [feishu, lark, binding, connection, device-flow]

metadata: starchild: emoji: "💬" skillKey: feishu-binding

user-invocable: true disable-model-invocation: false


📱 Feishu/Lark Binding

Connect / disconnect the user's Feishu (飞书) or Lark account so the agent can chat via the Feishu/Lark app.

The feishu tool stays built-in. This SKILL.md is the reference doc.

See also

  • config/context/references/messaging-channels.md — how messages are routed across channels
  • skills/wechat-binding/SKILL.md — analogous WeChat flow
  • skills/tg-bot-binding/SKILL.md — analogous Telegram flow

Brand selection

BrandRegionDomain
feishuChina mainland (中国大陆)feishu.cn / accounts.feishu.cn
larkInternationallarksuite.com / accounts.larksuite.com

Ask the user which brand they use. Default to feishu if unclear. Chinese-speaking users almost always use feishu.


Typical binding flow

connect(brand) → user scans QR / opens link → poll(device_code) → done
  1. Start device flow: feishu(action="connect", brand="feishu") — returns verification_uri, device_code, and a QR code image saved to workspace.
  2. Show BOTH options to the user:
    • QR code scan: Display the QR code image inline using the markdown_image from the result (e.g. ![Feishu QR Code](feishu_qrcode_xxx.png)). The user scans it with their Feishu/Lark app.
    • Direct link: Show the verification_url as a clickable link. The user opens it in their browser, logs in to Feishu/Lark, and confirms.
  3. Wait for the user to confirm. Don't auto-poll — let them say "done" / "confirmed" / "已确认" / "scanned" first.
  4. Poll for completion: feishu(action="poll", device_code=<from step 1>, brand=<same brand>).
    • status: "done" → binding complete, congratulate the user.
    • status: "pending" → ask the user if they've scanned the QR code or opened the link and confirmed.
    • status: "expired" → the device flow expired (typically 5 minutes). Start over with connect.
  5. Confirm to user: "Feishu/Lark connected! You can now chat with your agent on Feishu/Lark."

Actions

actionrequired paramspurpose
status—Current Feishu/Lark app state. Use to check if already connected.
connectbrand (optional, default "feishu")Start device flow. Returns verification URL + device_code.
polldevice_code, brandCheck if user has confirmed authorization. Returns status.
disconnect—Unbind Feishu/Lark app (destructive — confirm with user first).

Channel-aware QR / link display

User channelHow to show
WebInclude file_path (QR image) in your reply — frontend renders it inline. Also show the link.
Telegramsend_to_telegram(file_path=<qr_path>, message_type="photo") + include the link in the caption
WeChatShow the link only (user can't scan a QR inside WeChat for Feishu)
Feishu(User is already on Feishu — they don't need to bind. Tell them it's already connected or check status.)

Key differences from WeChat / Telegram

AspectFeishu/LarkWeChatTelegram
Auth methodDevice flow (URL)QR code scanBot token
User actionOpen URL + confirm in appScan QR + confirmCreate bot via @BotFather
CredentialNone (device flow handles it)bot_token (from QR)bot_token (from BotFather)
Brand choicefeishu / larkN/AN/A

Critical rules

  • Don't auto-poll after connect. Wait for user confirmation that they've opened the link and confirmed in Feishu/Lark. Auto-polling wastes API calls.
  • Device flow expires in ~5 minutes. If poll returns expired, tell the user and start a new connect.
  • disconnect is destructive — confirm with the user before calling it. It will stop the Feishu/Lark gateway instance.
  • Brand matters — feishu and lark use different API domains. Using the wrong brand will fail silently or redirect to the wrong login page.
  • One app per user — a user can only have one Feishu/Lark app at a time. If they want to switch brands, they must disconnect first, then connect with the new brand.

Troubleshooting

SymptomLikely causeFix
connect returns errorUser already has an active appCall status first; if active, ask if they want to disconnect and rebind
poll returns expiredUser took too long to confirmStart a new connect
poll returns pending repeatedlyUser hasn't opened the URL yetRemind them to open the verification URL
User says "I can't find the link"URL was in a previous messageRe-run connect to get a fresh URL