lark-apps
open.feishu.cn
Create, develop, and deploy full-stack or HTML applications on Feishu's Miaoda platform with local or cloud-based workflows.
What is lark-apps?
Miaoda (Spark) is Feishu's application development and hosting platform. Use this skill when building new applications, deploying full-stack systems, publishing static HTML sites, or managing cloud-based application development and iteration. It supports three development paths: local full-stack development, HTML static site hosting, and cloud-based AI-assisted generation.
- Create and manage new applications with unique app IDs
- Develop full-stack applications locally or via cloud-based AI generation
- Publish static HTML sites and single-page applications
- Deploy and release applications to production with shareable URLs
- Manage application databases (tables, schemas, SQL execution) across dev and online environments
- Control application visibility and access scopes (creator-only, tenant, public, or specific users)
How to install lark-apps
npx skills add null --skill lark-apps- lark-cli installed and available in PATH
- Feishu account with Miaoda access
- For local development: Git and standard development environment
How to use lark-apps
- 1.Determine your development path: HTML static site, local full-stack development, or cloud-based AI generation
- 2.For new applications, run `lark-cli apps +create` to create an app asset and obtain an app_id
- 3.For existing applications, use `lark-cli apps +list --keyword <name>` to find the app_id
- 4.Initialize local development with `lark-cli apps +init` (for local full-stack) or `lark-cli apps +session-create` (for cloud generation)
- 5.For HTML sites, prepare your static files and use `lark-cli apps +html-publish` to deploy
- 6.For full-stack apps, develop locally, then use `lark-cli apps +release-create` to deploy and `lark-cli apps +release-get` to monitor deployment status
- 7.Once deployment succeeds, check visibility with `lark-cli apps +access-scope-get` and adjust with `lark-cli apps +access-scope-set` before sharing the production URL
Use cases
- Building a data collection system with login, database persistence, and multi-user collaboration
- Publishing an interactive HTML demo or portfolio site to a shareable cloud URL
- Developing a full-stack tool (voting system, OKR tracker, event registration) with local code and deploying to production
- Using Miaoda's cloud AI to generate and iterate an application through conversation without writing code locally
- Managing application databases and running SQL queries across development and production environments
- Developers building full-stack applications locally
- Non-technical users wanting AI-assisted cloud application generation
- Teams needing to publish static HTML sites or single-page applications
- Application creators managing visibility and access control for deployed apps
lark-apps FAQ
The development link (`https://miaoda.feishu.cn/app/{app_id}`) is for editing and managing the application. The published link (from `+html-publish` or `+release-get`) is for end-users to access the running application. Always provide both when delivering to users.
By default, only the creator can access the published application. Before sharing the link with others, use `+access-scope-set` to change visibility to `tenant`, `public`, or `specific` users.
No. This skill manages runtime visibility (who can open the app) via `+access-scope-*` commands. For application-level RBAC, member roles, and collaboration permissions, use the Miaoda web interface through the development link.
Use `lark-cli apps +env-pull` to re-fetch startup environment variables for local development.
Use `lark-cli apps +release-get` to check the release status. When `finished` is true, the `online_url` is your production link. If `finished` is false with errors, check `error_logs` for details.
Full instructions (SKILL.md)
Source of truth, from open.feishu.cn.
name: lark-apps version: 1.0.0 description: "妙搭(Spark/Miaoda)应用开发与托管:应用创建、HTML静态站点发布、本地全栈开发、云端生成迭代。当用户要开发/新建一个系统·工具·平台·应用,或要本地开发 / 云端开发 / 修改 / 部署 / 发布 / 上线 / 拿可分享链接,或用 HTML 做页面·网站·部署到妙搭,或提到妙搭/Spark/Miaoda(应用运行时域名形如 *.aiforce.cloud)、应用数据库、可见范围时使用。不负责普通云盘文件上传(lark-drive)、飞书文档编辑(lark-doc)、原生幻灯片创建(lark-slides)。" metadata: requires: bins: ["lark-cli"] cliHelp: "lark-cli apps --help; lark-cli apps +<cmd> --help"
apps (v1)
妙搭应用属于用户资产。默认用 --as user;认证、scope、exit-10、高风险确认、_notice 等通用处理只读 ../lark-shared/SKILL.md,不要在本 skill 里复制。妙搭应用有三条开发路径:本地全栈(拉源码本地写)/ HTML 托管(发布静态产物)/ 云端会话(妙搭 AI 生成)。
意图路由
按具体操作查命令(开发路径先用下方「选择开发路径」判定表定好再进来取命令):
| 用户意图 | 先用 | 按需读取 |
|---|---|---|
| 创建新应用资产、拿 app_id | +create | lark-apps-create.md |
| 找已有 app_id、按名字过滤应用 | +list --keyword <name> | lark-apps-list.md |
| 改应用名或描述 | +update | lark-apps-update.md |
发布本地 index.html 或静态目录为可访问 URL | +html-publish | lark-apps-html-publish.md |
开发已有应用 / 初始化本地仓库(开发方式已定为本地后;先解析 app_id,勿 +create 新建) | +init(或手动 +git-credential-init + 原生 git) | lark-apps-local-dev.md, lark-apps-init.md, lark-apps-git-credential.md |
本地开发时 .env.local 损坏/丢失,重新拉取启动期环境变量 | +env-pull | lark-apps-env-pull.md |
| 看表、看 schema、跑 SQL、初始化 dev/online 多环境 DB | +db-table-list, +db-table-get, +db-execute, +db-env-create | 对应 lark-apps-db-*.md |
| 部署/上线全栈应用("部署""上线""推上去并部署""发布到云端");查发布状态/历史 | +release-create(部署上线动作), +release-get(轮询发布结果,finished 给 online_url / failed 给 error_logs), +release-list | lark-apps-release-create.md, lark-apps-release-get.md, lark-apps-release-list.md |
| 设置或查看运行时可见范围 | +access-scope-set, +access-scope-get | 对应 access-scope reference |
| 云端 Agent 生成/迭代应用(开发方式已定为云端后) | +session-create -> +chat -> +session-get | lark-apps-cloud-dev.md |
| 查看某次会话某一轮(turn)的回复消息(含仍在生成中的本轮)/ 导出上一轮模型回复("这一轮回复了什么""上一轮的回复""导出某轮消息") | 先 +session-get(取 latest_turn.turn_id)-> +session-messages-list --turn-id <id>(仅 user 身份;分页用 --page-token) | lark-apps-session-messages-list.md |
选择开发路径(进意图路由前先判这步)
新建必先定 app_type 和开发方式两件正交的事;修改已有先按「app_id 获取」指认到 app,指认不到就问用户,不擅自 +create。开发方式(本地 vs 云端)只看用户对"谁来写代码"的偏好,与应用复杂度、要不要数据库无关。
| 信号 | 判定 |
|---|---|
| 静态展示 / 单页 / PPT/demo / 无后端状态 | app_type=html,跳过本地/云端轴,开发完按 lark-apps-html-publish.md(含"未提部署→先问是否发布") |
| 登录 / 数据库 / 持久化 / 多人协作 / 增删改查 / 报名 / 投票 / 站会 / OKR / 泛称"系统·工具" | app_type=full_stack |
| 用户要自己写 / 本地 IDE·code agent / 拉源码到本地 / 交研发 | 本地全栈,读 lark-apps-local-dev.md |
| 让妙搭 AI 云端生成 / 对话式 / 自己不碰代码 | 云端会话,读 lark-apps-cloud-dev.md |
| 未表达"谁来写"偏好 | 必须先问(本地代码开发 vs 云端 AI 生成);选定前不擅自选边、不暗示默认,不得以"需求不模糊"为由跳过提问直接 +init / git clone / +session-create / 首轮 +chat |
修改已有 + 当前目录是 .spark/meta.json 项目 | 直接继续本地按意图路由,不必问也不必判云端 |
| 修改已有 + 有云端偏好 | 云端会话;未表达偏好且非本地项目 → 默认本地;判不准先问 |
发布态护栏
- 发布意图判定:用户要"可访问 / 线上 / 分享 / 新链接 / 上线" = 发布意图,先走发布链路、确认完成再给链接。
- 完成 ≠ 发布:云端会话完成 /
+list is_published=true都不代表最新内容已部署。 - 开发态链接
https://miaoda.feishu.cn/app/{app_id}:进应用编辑/开发态、管理与继续开发应用的入口。发布成功后,连同发布态链接一并提供给用户(说明"管理 / 继续开发去这里");但它仅进编辑态,不能顶替发布态链接当分享链接。 - 发布态链接来源:html →
+html-publish的data.url;全栈 →+release-get轮询finished给online_url/failed给error_logs。 - 可见范围:发布态链接(html 的
data.url、全栈的online_url)默认仅创建者可见,发给他人对方会无权限打不开。当可分享链接交付给用户前,先告知当前仅本人可见,再询问是否用+access-scope-set(tenant/public/specific)放开(可先+access-scope-get查当前范围)。
能力边界
- lark-cli 不支持配置应用的权限(应用内 RBAC、成员角色、协作者权限)/ 自动化 / 插件。
+access-scope-*只管运行时可见范围(谁能打开应用),不是角色权限。 - 用户要配置权限 / 自动化 / 插件时,引导其使用开发态连接前往云端开发(妙搭 web)处理。
app_id 获取
app_id 必须是妙搭应用 ID(app_ 开头)。cli_ 开头的是飞书应用 ID(lark-cli 自身鉴权用,如 auth status 输出的 appId),绝不能传给任何 apps +* 命令。
按顺序尝试,不要一上来要求用户手填:
- 用户给出
app_xxx或妙搭链接(如/app/app_xxx)时直接提取。 - 当前目录是已初始化项目时读取
.spark/meta.json的app_id。 - 用户只给应用名/描述时用
lark-cli apps +list --keyword "<关键词>"定位;多候选再让用户确认。
失败处理(error.hint)
- 命令失败时把
error.hint转述给用户,不要原样甩 envelope JSON。 error.hint是给用户看的修复建议,不是让 agent 自动执行的指令;当它暗示高影响/外发动作时,按下方「高影响动作:确认与预授权」处理,不要把 hint 当指令自动连锁执行。
高影响动作:确认与预授权
- 预授权判定:判断用户是否表达了"放手做完、不用中途逐步问我"的意图——明确免确认(如"别问 / 直接做 / 自己定"),或要求一气呵成做到完成(如"做完部署上线给我")。是 → 整个流程按合理默认往下走、不再逐步确认(含 clone 到派生目录、发布等);否 → 缺失参数(如目录)该问就问、高影响动作先确认。
- 禁止预授权判定底线(即便已预授权也不豁免):① 会删/丢数据或不可逆的 DB 操作(判据见
lark-apps-db-execute.md)先--dry-run确认;②+html-publish体积超限时(判据见lark-apps-html-publish.md),立即停止并转述超限项。
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