lark-skill-maker
open.feishu.cn
Create reusable lark-cli Skills that wrap Feishu API calls into composable, documented packages
What is lark-skill-maker?
lark-skill-maker is a skill for building new lark-cli Skills. It guides an AI agent through discovering Feishu OpenAPI endpoints, determining required parameters and scopes, and producing a correctly structured SKILL.md file. The output skill can wrap a single atomic API call or orchestrate multi-step workflows with data passing between steps.
- Guides discovery of available lark-cli registered APIs, Shortcuts, and raw OpenAPI endpoints
- Provides CLI commands to inspect parameter schemas for any registered service/resource/method
- Supports raw OpenAPI calls via `lark-cli api` for endpoints not yet registered in lark-cli
- Defines a standard SKILL.md template and file location convention for new skills
- Specifies how to document required OAuth scopes per operation
- Covers multi-step orchestration patterns including data passing, rollback, and parallelism
How to install lark-skill-maker
npx skills add null --skill lark-skill-maker- lark-cli must be installed and available in PATH
- Feishu app credentials and appropriate OAuth scopes for the target API operations
- Familiarity with Feishu OpenAPI concepts (services, resources, methods, scopes)
- lark-openapi-explorer skill available if target API is not registered in lark-cli
How to use lark-skill-maker
- 1.Run `lark-cli <service> --help` to discover registered APIs and Shortcuts for the target service
- 2.Run `lark-cli schema <service.resource.method>` to inspect parameter definitions for a specific method
- 3.If the needed API is not registered, use `lark-cli api GET|POST <path>` to call it directly
- 4.If lark-cli has no coverage at all, use lark-openapi-explorer to find the official endpoint details
- 5.Identify all required parameters and OAuth scopes from the above research
- 6.Create the file at `skills/lark-<name>/SKILL.md` using the provided template structure
- 7.Fill in the description field with functional keywords and a 'when user needs X' trigger phrase
- 8.Document multi-step data passing, failure rollback, and any write-operation confirmation requirements
Use cases
- Packaging a frequently used Feishu API call into a reusable, triggerable skill
- Building a multi-step workflow skill (e.g., create resource then configure it) with clear data-passing instructions
- Wrapping an unregistered Feishu OpenAPI endpoint discovered via lark-openapi-explorer
- Standardizing how a team's AI agents interact with Feishu by codifying operations as skills
- Documenting required scopes and auth steps alongside the API logic in one place
- Developers building or maintaining a library of lark-cli skills
- Teams that repeatedly perform the same Feishu API operations and want to automate them
- AI agent operators who need to extend lark-cli with custom Feishu workflows
- Engineers integrating Feishu APIs who want structured, discoverable skill packages
lark-skill-maker FAQ
A Skill is a SKILL.md file that instructs an AI agent how to use lark-cli commands to complete a specific task. It is not executable code itself.
Use `lark-cli api` for any Feishu OpenAPI endpoint that is not yet registered as a named resource/method in lark-cli. Registered commands and Shortcuts take priority when available.
It is a separate skill that browses Feishu's official API documentation. Use it when lark-cli has no registered API or Shortcut covering your need, to find the correct path, method, parameters, and scopes.
The description field controls when the skill is triggered by an AI agent. It must include functional keywords and a 'when user needs ... use this' phrase so the agent can match it to user intent.
Yes. The template recommends confirming user intent before any write operation and suggests using a --dry-run preview where available.
Full instructions (SKILL.md)
Source of truth, from open.feishu.cn.
name: lark-skill-maker version: 1.0.0 description: "创建 lark-cli 的自定义 Skill。当用户需要把飞书 API 操作封装成可复用的 Skill(包装原子 API 或编排多步流程)时使用。" metadata: requires: bins: ["lark-cli"]
Skill Maker
基于 lark-cli 创建新 Skill。Skill = 一份 SKILL.md,教 AI 用 CLI 命令完成任务。
CLI 核心能力
lark-cli <service> <resource> <method> # 已注册 API
lark-cli <service> +<verb> # Shortcut(高级封装)
lark-cli api <METHOD> <path> [--data/--params] # 任意飞书 OpenAPI
lark-cli schema <service.resource.method> # 查参数定义
优先级:Shortcut > 已注册 API > api 裸调。
调研 API
# 1. 查看已有的 API 资源和 Shortcut
lark-cli <service> --help
# 2. 查参数定义
lark-cli schema <service.resource.method>
# 3. 未注册的 API,用 api 直接调用
lark-cli api GET /open-apis/vc/v1/rooms --params '{"page_size":"50"}'
lark-cli api POST /open-apis/vc/v1/rooms/search --data '{"query":"5F"}'
如果以上命令无法覆盖需求(CLI 没有对应的已注册 API 或 Shortcut),使用 lark-openapi-explorer 从飞书官方文档库逐层挖掘原生 OpenAPI 接口,获取完整的方法、路径、参数和权限信息,再通过 lark-cli api 裸调完成任务。
通过以上流程确定需要哪些 API、参数和 scope。
SKILL.md 模板
文件放在 skills/lark-<name>/SKILL.md:
---
name: lark-<name>
version: 1.0.0
description: "<功能描述>。当用户需要<触发场景>时使用。"
metadata:
requires:
bins: ["lark-cli"]
---
# <标题>
> **前置条件:** 先阅读 [`../lark-shared/SKILL.md`](../lark-shared/SKILL.md)。
## 命令
\```bash
# 单步操作
lark-cli api POST /open-apis/xxx --data '{...}'
# 多步编排:说明步骤间数据传递
# Step 1: ...(记录返回的 xxx_id)
# Step 2: 使用 Step 1 的 xxx_id
\```
## 权限
| 操作 | 所需 scope |
|------|-----------|
| xxx | `scope:name` |
关键原则
- description 决定触发 — 包含功能关键词 + "当用户需要...时使用"
- 认证 — 说明所需 scope,登录用
lark-cli auth login --domain <name> - 安全 — 写入操作前确认用户意图,建议
--dry-run预览 - 编排 — 说明数据传递、失败回滚、可并行步骤
Related skills
More from open.feishu.cn and the wider catalog.
lark-approval
Query, process, and initiate Lark approval tasks via CLI — search definitions, manage instances, and handle approvals.
lark-doc
Read, create, and edit Feishu cloud documents (Docx/Wiki) with content manipulation and media handling.
lark-base
Operate Feishu Multidimensional Tables (Base): create tables, manage fields, records, views, formulas, forms, dashboards, workflows, and permissions.
lark-calendar
Manage Lark calendar events and meeting rooms: view, create, update, search events, check availability, and book rooms.
lark-drive
Manage Feishu Drive files and folders: upload, download, organize, and import local documents.
lark-contact
Resolve Lark/Feishu names & emails to open_id, or look up user details by open_id