AI Skill
Review
Audit score 70

lark-openapi-explorer

larksuite/cli

Discover and call native Feishu/Lark OpenAPIs not yet wrapped by lark-cli commands

What is lark-openapi-explorer?

lark-openapi-explorer is a skill for coding agents that enables step-by-step discovery and invocation of raw Feishu/Lark OpenAPI endpoints. When existing lark-* skills or lark-cli registered commands cannot satisfy a user's requirement, this skill guides the agent through the official markdown documentation hierarchy—from top-level index to module docs to individual API specs—and then calls the API directly via `lark-cli api`. It enforces a strict no-guessing policy: all API paths and parameters must be sourced from official docs before any call is made.

  • Checks existing lark-cli commands before attempting raw API discovery
  • Fetches and parses the Feishu/Lark llms.txt documentation index to locate relevant modules
  • Drills into module-level docs to find specific API documentation links
  • Retrieves full API specs including HTTP method, path, parameters, request body, permissions, and error codes
  • Calls discovered APIs using `lark-cli api` with GET, POST, PUT, DELETE, or PATCH methods
  • Requires user confirmation before executing write or delete operations

How to install lark-openapi-explorer

npx skills add null --skill lark-openapi-explorer
Prerequisites
  • lark-cli must be installed and available in PATH
  • Authentication must be configured per the lark-shared SKILL.md (credentials, identity switching)
  • Network access to open.feishu.cn or open.larksuite.com for documentation fetching
  • Agent must support WebFetch capability to retrieve markdown documentation
Claude Code
Cursor
Windsurf
Cline

How to use lark-openapi-explorer

  1. 1.Install the skill: npx skills add null --skill lark-openapi-explorer
  2. 2.Ensure lark-cli is installed and authenticated following lark-shared setup
  3. 3.Ask the agent to perform a Feishu/Lark action; the skill first checks if an existing lark-cli command covers it
  4. 4.If no existing command is found, the skill fetches https://open.feishu.cn/llms.txt (or open.larksuite.com for Lark) to locate the relevant module
  5. 5.The skill fetches the module-level doc to find the specific API link
  6. 6.The skill fetches the individual API markdown to extract method, path, parameters, permissions, and error codes
  7. 7.The skill presents the API spec and example `lark-cli api` command for review before execution
  8. 8.Confirm write/delete operations when prompted; the skill then executes via `lark-cli api`

Use cases

Good for
  • Adding members to a Feishu/Lark group chat when lark-cli has no chat_members command
  • Setting or updating a group announcement not covered by existing CLI commands
  • Accessing any Feishu/Lark OpenAPI endpoint that has no corresponding lark-cli shortcut
  • Exploring available API capabilities across Feishu/Lark modules before building a new skill
  • Performing one-off administrative API calls without writing custom integration code
Who it's for
  • Developers using Claude Code or Cursor with lark-cli installed
  • Teams automating Feishu/Lark workflows that go beyond pre-packaged CLI commands
  • Administrators needing to call specific Feishu/Lark APIs not yet wrapped as skills
  • Engineers evaluating which Feishu/Lark APIs to formalize into new lark-* skills

lark-openapi-explorer FAQ

When should I use this skill instead of other lark-* skills?

Use it only when no existing lark-* skill or lark-cli registered command covers your need. The skill itself checks this first via `lark-cli <service> --help`.

Does this skill work for both Feishu and Lark brands?

Yes. It uses open.feishu.cn for Feishu and open.larksuite.com for Lark. If the brand is unclear, it defaults to Feishu.

Will the skill guess API paths if it cannot find documentation?

No. The skill explicitly prohibits guessing API paths or parameters. All specs must be confirmed from official documentation before any call is made.

What happens before a POST, PUT, or DELETE call is made?

The skill requires explicit user confirmation before executing any write or delete operation, and recommends previewing with --dry-run where supported.

Can I turn a discovered API into a reusable skill?

Yes. The lark-skill-maker skill is referenced for formalizing discovered APIs into new installable lark-* skills.

Full instructions (SKILL.md)

Source of truth, from larksuite/cli.


name: lark-openapi-explorer version: 1.0.0 description: "飞书/Lark 原生 OpenAPI 探索:从官方文档库中挖掘未经 CLI 封装的原生 OpenAPI 接口。当用户的需求无法被现有 lark-* skill 或 lark-cli 已注册命令满足,需要查找并调用原生飞书 OpenAPI 时使用。" metadata: requires: bins: ["lark-cli"]

OpenAPI Explorer

前置条件: 先阅读 ../lark-shared/SKILL.md 了解认证、身份切换和安全规则。

当用户的需求无法被现有 skill 或 CLI 已注册 API 覆盖时,使用本技能从飞书官方 markdown 文档库中逐层挖掘原生 OpenAPI 接口,然后通过 lark-cli api 裸调完成任务。

文档库结构

飞书 OpenAPI 文档以 markdown 层级组织:

llms.txt                          ← 顶层索引,列出所有模块文档链接
  └─ llms-<module>.txt            ← 模块文档,包含功能概述 + 底层 API 文档链接
       └─ <api-doc>.md            ← 单个 API 的完整说明(方法/路径/参数/响应/错误码)

文档入口:

品牌入口 URL
飞书 (Feishu)https://open.feishu.cn/llms.txt
Larkhttps://open.larksuite.com/llms.txt

所有文档以中文编写。如果用户使用英文交流,需将文档内容翻译为英文后输出。

挖掘流程

严格按以下步骤逐层检索,不要跳步或猜测 API

Step 1:确认现有能力不足

# 先检查是否已有对应的 skill 或已注册 API
lark-cli <可能的service> --help

如果已有对应命令或 shortcut,直接使用,不需要继续挖掘

Step 2:从顶层索引定位模块

用 WebFetch 获取顶层索引,找到与需求相关的模块文档链接:

WebFetch https://open.feishu.cn/llms.txt
  → 提取问题:"列出所有模块文档链接,找出与 <用户需求关键词> 相关的链接"
  • 飞书品牌使用 open.feishu.cn
  • Lark 品牌使用 open.larksuite.com
  • 如不确定用户品牌,默认使用飞书

Step 3:从模块文档定位具体 API

用 WebFetch 获取模块文档,找到具体 API 的文档链接:

WebFetch https://open.feishu.cn/llms-docs/zh-CN/llms-<module>.txt
  → 提取问题:"找出与 <用户需求> 相关的 API 说明和文档链接"

Step 4:获取 API 完整规范

用 WebFetch 获取具体 API 文档,提取完整的调用规范:

WebFetch https://open.feishu.cn/document/server-docs/.../<api>.md
  → 提取问题:"返回完整 API 规范:HTTP 方法、URL 路径、路径参数、查询参数、请求体字段(名称/类型/必填/说明)、响应字段、所需权限、错误码"

Step 5:通过 CLI 调用 API

使用 lark-cli api 裸调:

# 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>

输出规范

向用户呈现挖掘结果时,按以下格式组织:

  1. API 名称与功能:一句话描述
  2. HTTP 方法与路径METHOD /open-apis/...
  3. 关键参数:列出必填和常用可选参数
  4. 所需权限:scope 列表
  5. 调用示例:给出 lark-cli api 的完整命令
  6. 注意事项:频率限制、特殊约束等

如果用户使用英文交流,将以上所有内容翻译为英文。

安全规则

  • 写入/删除类 API(POST/PUT/DELETE)调用前必须确认用户意图
  • 建议先用 --dry-run 预览请求(如支持)
  • 不要猜测 API 路径或参数——必须从文档中获取确认
  • 涉及敏感操作(删除群、移除成员等)时,向用户说明影响范围

使用场景示例

场景 1:用户需要拉人进群(未被 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"}'

场景 2:用户需要设置群公告

# 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>"]}'

参考

Related skills

More from larksuite/cli and the wider catalog.

LA

lark-doc

larksuite/cli

飞书云文档(Docx / Wiki 文档):读取和编辑飞书文档内容。当用户给出文档 URL 或 token,或需要查看、创建、编辑文档、插入或下载文档图片附件时使用。文档中嵌入的电子表格、多维表格、画板,先用本 skill 提取 token 再切到对应 skill。当用户给出 doubao.com 的 /docx/ 或 /wiki/ URL/token 时,也应直接使用本 skill;路由依据是 URL 路径模式和 token,而不是域名。不负责文档评论管理,也不负责表格或 Base 的数据操作。

293k installs
LA

lark-base

larksuite/cli

飞书多维表格(Base)操作:建表、字段、记录、视图、统计、公式/lookup、表单、仪表盘、workflow、角色权限;遇到 Base/多维表格/bitable 或 /base/ 链接时使用。文件导入转 lark-drive,认证/授权转 lark-shared。

292k installs
LA

lark-im

larksuite/cli

飞书即时通讯:收发消息和管理群聊。发送和回复消息、搜索聊天记录、管理群聊成员、上传下载图片和文件(支持大文件分片下载)、管理表情回复、发送应用内/短信/电话加急、发送和处理交互卡片(Interactive Card)、监听卡片按钮回调(card.action.trigger)。当用户需要发消息、查看或搜索聊天记录、下载聊天中的文件、查看群成员、搜索群、创建群聊或话题群、管理标记数据、管理 Feed 置顶(添加/移除/查询置顶会话)、管理标签数据、处理卡片回调时使用。

292k installs
LA

lark-drive

larksuite/cli

飞书云空间(云盘/云存储):管理 Drive 文件和文件夹,包含上传/下载、创建文件夹、复制/移动/删除、查看元数据、评论/权限/订阅、标题、版本和本地文件导入。用户需要整理云盘目录、处理云空间资源 URL/token,或导入 Word/Markdown/Excel/CSV/PPTX/.base 为 docx/sheet/bitable/slides 时使用;doubao.com 云空间 URL/token 也按资源路径和 token 路由,不回退 WebFetch。不负责:文档内容编辑(走 lark-doc)、表格/Base 表内数据操作(走 lark-sheets/lark-base)、知识空间节点/成员管理(走 lark-wiki)、原生 Markdown 文件读写/patch/diff(走 lark-markdown)。

292k installsAudited
LA

lark-shared

larksuite/cli

Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling _notice JSON.

291k installsAudited
LA

lark-calendar

larksuite/cli

飞书日历:管理日历日程和会议室。查看/搜索日程、创建/更新日程、管理参会人、查询忙闲和推荐时段、预定会议室。当用户需要查看日程安排、创建/修改会议、查询/预定会议室时使用。不负责:查询过去的视频会议记录(走 lark-vc)、待办任务(走 lark-task)。

291k installsAudited