Prerequisites: First read
../lark-shared/SKILL.mdto learn about authentication, identity switching, and security rules.
When the user's needscannot be covered by existing skills or APIs already registered in the CLI, use this skill to dig layer by layer through Feishu's official markdown documentation library to find native OpenAPI interfaces, then use lark-cli api to make raw calls to complete the task.
Documentation library structure
Feishu OpenAPI documentation is organized in markdown hierarchy:
llms.txt ← 顶层索引,列出所有模块文档链接
└─ llms-<module>.txt ← 模块文档,包含功能概述 + 底层 API 文档链接
└─ <api-doc>.md ← 单个 API 的完整说明(方法/路径/参数/响应/错误码)
Documentation entry points:
| Brand | Entry URL |
|---|---|
| Feishu (Feishu) | https://open.feishu.cn/llms.txt |
| Lark | https://open.larksuite.com/llms.txt |
All documentation is written inChinese. If the user communicates in English, the documentation content must be translated into English before output.
Exploration process
Strictly follow the steps below to retrieve layer by layer,do not skip steps or guess the API:
Step 1: Confirm existing capabilities are insufficient
# 先检查是否已有对应的 skill 或已注册 API
lark-cli <可能的service> --help
If a corresponding command or shortcut already exists, use it directly,no need to continue exploration。
Step 2: Locate the module from the top-level index
Use WebFetch to get the top-level index and find the module documentation link related to the need:
WebFetch https://open.feishu.cn/llms.txt
→ 提取问题:"列出所有模块文档链接,找出与 <用户需求关键词> 相关的链接"
- For the Feishu brand use
open.feishu.cn - For the Lark brand use
open.larksuite.com - If unsure of the user's brand, use Feishu by default
Step 3: Locate the specific API from the module documentation
Use WebFetch to get the module documentation and find the documentation link for the specific API:
WebFetch https://open.feishu.cn/llms-docs/zh-CN/llms-<module>.txt
→ 提取问题:"找出与 <用户需求> 相关的 API 说明和文档链接"
Step 4: Get the complete API specification
Use WebFetch to get the specific API documentation and extract the complete calling specification:
WebFetch https://open.feishu.cn/document/server-docs/.../<api>.md
→ 提取问题:"返回完整 API 规范:HTTP 方法、URL 路径、路径参数、查询参数、请求体字段(名称/类型/必填/说明)、响应字段、所需权限、错误码"
Step 5: Call the API via CLI
Use lark-cli api for raw calls:
# GET 请求
lark-cli api GET /open-apis/<path> --params '{"key":"value"}'
# POST 请求
lark-cli api POST /open-apis/<path> --data '{"key":"value"}'
# PUT 请求
lark-cli api PUT /open-apis/<path> --data '{"key":"value"}'
# DELETE 请求
lark-cli api DELETE /open-apis/<path>
Output specification
When presenting exploration results to the user, organize them in the following format:
- API name and function: one-sentence description
- HTTP method and path:
METHOD /open-apis/... - Key parameters: list required and commonly used optional parameters
- Required permissions: scope list
- Call example: provide
lark-cli apicomplete command - Notes: rate limits, special constraints, etc.
If the user communicates in English, translate all of the above content into English.
Security rules
- Write/delete APIs(POST/PUT/DELETE) must confirm the user's intent before calling
- It is recommended to first use
--dry-runto preview the request (if supported) - Do not guess API paths or parameters—they must be confirmed from the documentation
- For sensitive operations (deleting groups, removing members, etc.), explain the scope of impact to the user
Usage scenario examples
Scenario 1: The user needs to add people to a group (not wrapped by the CLI)
# Step 1: 确认 CLI 没有封装
lark-cli im --help
# → 发现没有 chat_members 相关的 create 命令
# Step 2-4: 通过文档挖掘获得 API 规范
# → POST /open-apis/im/v1/chats/:chat_id/members
# Step 5: 调用
lark-cli api POST /open-apis/im/v1/chats/oc_xxx/members \
--data '{"id_list":["ou_xxx","ou_yyy"]}' \
--params '{"member_id_type":"open_id"}'
Scenario 2: The user needs to set a group announcement
# Step 1: 确认 CLI 没有封装
lark-cli im --help
# → 没有 announcement 相关命令
# Step 2-4: 挖掘文档
# → PATCH /open-apis/im/v1/chats/:chat_id/announcement
# Step 5: 调用
lark-cli api PATCH /open-apis/im/v1/chats/oc_xxx/announcement \
--data '{"revision":"0","requests":["<html>公告内容</html>"]}'
References
- lark-shared — authentication and global parameters
- lark-skill-maker — if you need to solidify explored APIs into a new Skill