Feishu binding

From Starchild-ai-agent/official-skills · View interactive version

Feishu binding is an AI agent skill from the GitHub repository Starchild-ai-agent/official-skills. 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).

How to use this skill

Skill file

📱 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


Brand selection

| Brand | Region | Domain |

|---|---|---|

| feishu | China mainland (中国大陆) | feishu.cn / accounts.feishu.cn |

| lark | International | larksuite.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:
  1. Wait for the user to confirm. Don't auto-poll — let them say "done" / "confirmed" / "已确认" / "scanned" first.
  2. Poll for completion: feishu(action="poll", device_code=<from step 1>, brand=<same brand>).
  1. Confirm to user: "Feishu/Lark connected! You can now chat with your agent on Feishu/Lark."

Actions

| action | required params | purpose |

|---|---|---|

| status | — | Current Feishu/Lark app state. Use to check if already connected. |

| connect | brand (optional, default "feishu") | Start device flow. Returns verification URL + device_code. |

| poll | device_code, brand | Check if user has confirmed authorization. Returns status. |

| disconnect | — | Unbind Feishu/Lark app (destructive — confirm with user first). |


Channel-aware QR / link display

| User channel | How to show |

|---|---|

| Web | Include file_path (QR image) in your reply — frontend renders it inline. Also show the link. |

| Telegram | send_to_telegram(file_path=<qr_path>, message_type="photo") + include the link in the caption |

| WeChat | Show 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

| Aspect | Feishu/Lark | WeChat | Telegram |

|---|---|---|---|

| Auth method | Device flow (URL) | QR code scan | Bot token |

| User action | Open URL + confirm in app | Scan QR + confirm | Create bot via @BotFather |

| Credential | None (device flow handles it) | bot_token (from QR) | bot_token (from BotFather) |

| Brand choice | feishu / lark | N/A | N/A |


Critical rules


Troubleshooting

| Symptom | Likely cause | Fix |

|---|---|---|

| connect returns error | User already has an active app | Call status first; if active, ask if they want to disconnect and rebind |

| poll returns expired | User took too long to confirm | Start a new connect |

| poll returns pending repeatedly | User hasn't opened the URL yet | Remind them to open the verification URL |

| User says "I can't find the link" | URL was in a previous message | Re-run connect to get a fresh URL |

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.