lark-skill-maker

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Skill Maker

Skill Maker

基于 lark-cli 创建新 Skill。Skill = 一份
SKILL.md
,教 AI 用 CLI 命令完成任务。
Create new Skills based on lark-cli. A Skill is a
SKILL.md
file that teaches AI to complete tasks using CLI commands.

CLI 核心能力

Core CLI Capabilities

bash
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
裸调。
bash
lark-cli <service> <resource> <method>          # Registered API
lark-cli <service> +<verb>                      # Shortcut (advanced encapsulation)
lark-cli api <METHOD> <path> [--data/--params]  # Any Feishu OpenAPI
lark-cli schema <service.resource.method>       # Check parameter definitions
Priority: Shortcut > Registered API > Raw
api
call.

调研 API

Research APIs

bash
undefined
bash
undefined

1. 查看已有的 API 资源和 Shortcut

1. View existing API resources and Shortcuts

lark-cli <service> --help
lark-cli <service> --help

2. 查参数定义

2. Check parameter definitions

lark-cli schema <service.resource.method>
lark-cli schema <service.resource.method>

3. 未注册的 API,用 api 直接调用

3. For unregistered APIs, call directly with 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](../lark-openapi-explorer/SKILL.md) 从飞书官方文档库逐层挖掘原生 OpenAPI 接口,获取完整的方法、路径、参数和权限信息,再通过 `lark-cli api` 裸调完成任务。

通过以上流程确定需要哪些 API、参数和 scope。
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 your needs (the CLI does not have a corresponding registered API or Shortcut), use [lark-openapi-explorer](../lark-openapi-explorer/SKILL.md) to dig through the official Feishu documentation library layer by layer to obtain complete method, path, parameter, and permission information, then complete the task via raw `lark-cli api` calls.

Confirm which APIs, parameters, and scopes are needed through the above process.

SKILL.md 模板

SKILL.md Template

文件放在
skills/lark-<name>/SKILL.md
markdown
---
name: lark-<name>
version: 1.0.0
description: "<功能描述>。当用户需要<触发场景>时使用。"
metadata:
  requires:
    bins: ["lark-cli"]
---
Place the file at
skills/lark-<name>/SKILL.md
:
markdown
---
name: lark-<name>
version: 1.0.0
description: "<Function description>. Use when users need <trigger scenario>."
metadata:
  requires:
    bins: ["lark-cli"]
---

<标题>

<Title>

前置条件: 先阅读
../lark-shared/SKILL.md
Prerequisite: Read
../lark-shared/SKILL.md
first.

命令

Commands

```bash
```bash

单步操作

Single-step operation

lark-cli api POST /open-apis/xxx --data '{...}'
lark-cli api POST /open-apis/xxx --data '{...}'

多步编排:说明步骤间数据传递

Multi-step orchestration: Explain data transfer between steps

Step 1: ...(记录返回的 xxx_id)

Step 1: ... (Record the returned xxx_id)

Step 2: 使用 Step 1 的 xxx_id

Step 2: Use xxx_id from Step 1

```
```

权限

Permissions

操作所需 scope
xxx
scope:name
undefined
OperationRequired scope
xxx
scope:name
undefined

关键原则

Key Principles

  • description 决定触发 — 包含功能关键词 + "当用户需要...时使用"
  • 认证 — 说明所需 scope,登录用
    lark-cli auth login --domain <name>
  • 安全 — 写入操作前确认用户意图,建议
    --dry-run
    预览
  • 编排 — 说明数据传递、失败回滚、可并行步骤
  • description determines triggering — Include function keywords + "Use when users need..."
  • Authentication — Specify required scopes, use
    lark-cli auth login --domain <name>
    for login
  • Security — Confirm user intent before write operations, recommend
    --dry-run
    for preview
  • Orchestration — Explain data transfer, failure rollback, and parallelizable steps