| 1 | --- |
| 2 | name: feishu |
| 3 | description: Work with Feishu or Lark bots, docs, sheets, bitables, approval flows, and OpenAPI/MCP setup without hardcoding credentials. |
| 4 | --- |
| 5 | |
| 6 | # Feishu / Lark |
| 7 | |
| 8 | Use this skill when the user asks for Feishu, Lark, or "飞书" integration work. |
| 9 | |
| 10 | ## Ground Rules |
| 11 | |
| 12 | - Feishu China APIs use `open.feishu.cn`; Lark international APIs use |
| 13 | `open.larksuite.com`. |
| 14 | - Never hardcode app secrets, webhook secrets, tenant tokens, or user tokens. |
| 15 | Use environment variables such as `FEISHU_APP_ID`, |
| 16 | `FEISHU_APP_SECRET`, `FEISHU_WEBHOOK_URL`, and |
| 17 | `FEISHU_WEBHOOK_SECRET`. |
| 18 | - If credentials are unavailable, produce setup instructions or a local stub |
| 19 | instead of pretending the integration is live. |
| 20 | |
| 21 | ## Common Use Cases |
| 22 | |
| 23 | - Bot webhook messages |
| 24 | - App access token and tenant access token flows |
| 25 | - Docs, Sheets, Wiki, and Bitable reads/writes |
| 26 | - Approval or workflow status updates |
| 27 | - Feishu/Lark MCP server configuration |
| 28 | |
| 29 | ## Workflow |
| 30 | |
| 31 | 1. Clarify whether the target is Feishu or Lark. |
| 32 | 2. Identify the credential type: webhook, internal app, marketplace app, or |
| 33 | OAuth user token. |
| 34 | 3. Prefer official OpenAPI endpoints and signed webhooks when secrets are |
| 35 | configured. |
| 36 | 4. For MCP, build or configure a server that exposes narrow tools such as |
| 37 | `send_message`, `read_doc`, `append_sheet_row`, or `query_bitable`. |
| 38 | 5. Register the MCP server with `codewhale mcp add`, then run |
| 39 | `codewhale mcp validate` and `codewhale mcp tools`. |
| 40 | 6. Verify with a dry run, sandbox document, or read-back call before sending |
| 41 | externally visible messages. |
| 42 | |
| 43 | Ask for confirmation before sending messages, writing production documents, or |
| 44 | changing approval/workflow state. |
| 45 |