Create a new Skill based on lark-cli. A Skill = a 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 call.
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 from the official Feishu documentation library for native OpenAPI endpoints, obtain the complete method, path, parameters, and permission information, then complete the task through lark-cli api raw call.
Through the above process, determine which APIs, parameters, and scopes are needed.
SKILL.md Template
File placed 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 to..."
- Authentication — specify the required scope, for login use
lark-cli auth login --domain <name> - Security — confirm the user's intent before write operations, recommend
--dry-runpreview - Orchestration — explain data passing, failure rollback, and parallelizable steps