Create a new Skill based on lark-cli. Skill = a copy of SKILL.md, teaching AI to complete tasks using CLI commands.
CLI Core Capabilities
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> # 查参数定义
Priority: Shortcut > registered API > api raw invocation.
Research 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"}'
If the above commands cannot cover the requirement (the CLI has no corresponding registered API or Shortcut), use lark-openapi-explorer to dig layer by layer through the official Feishu documentation library for native OpenAPI interfaces, obtain the complete method, path, parameters, and permission information, then use lark-cli api raw invocation to complete the task.
Through the above process, determine which APIs, parameters, and scopes are needed.
SKILL.md Template
Place the file in 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` |
Key Principles
- description determines triggering — include feature keywords + "use when the user needs..."
- Authentication — specify the required scope, log in with
lark-cli auth login --domain <name> - Security — confirm user intent before write operations, recommend
--dry-runpreview - Orchestration — specify data passing, failure rollback, and steps that can be parallelized