Skip to content
larksuite avatar

Lark Shared

Shared Lark CLI foundation covering identity, auth scopes, output contracts, and high-risk write approval.

CCM score
72 of 100
skills.sh installs
499.6K
GitHub stars
18.2K
last updated
Aug 21, 2026
View on GitHub

Own this skill? Claim it

What it does

  • Covers lark-cli setup and auth: auth login, auth status, and auth logout, plus revoking authorization
  • Explains user versus bot identity, where --as user acts on personal resources and --as bot acts on app-owned resources
  • Manages business-domain permissions through --domain (including all, docs, and drive) and resolves missing scopes
  • Enforces exit code 10 as a high-risk confirmation gate, with --dry-run previews and the rule that _notice output is reviewed

Install

$ npx -y skills add larksuite/cli --skill lark-shared -y

Installs into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.

Files

lark-cli 共享规则

所有 lark-* skill 共享的底座:身份、认证、输出契约与高风险操作。

通用准则

  1. 调用前先确认用法:执行前读对应 reference 或跑 --help,别猜 flag 盲调。

  2. 身份决定你代表谁操作:--as user 代表用户本人(能看到、也能操作其日历、云空间/云盘/云存储等个人资源),--as bot 代表应用自己,应用级操作,只能访问bot自己的资源,bot 查用户资源会返回空成功而非报错。动手前先搞清楚身份identity。身份模型和权限管理 → lark-shared-identity-and-permissions.md。

  3. 授权 / 配置类 URL 必须配二维码:当命令输出 verification_url、verification_uri_complete、console_url 等 URL 字段时,必须用 lark-cli auth qrcode 生成并在回复中展示,URL 在前二维码在后;优先生成 PNG(--output),仅当用户明确要求时才使用 ASCII(--ascii)。URL 原样转发——不编解码、不加标点、不重拼 query,二维码和链接请一起展示给用户。

  4. --format json(默认)下,判断成功用 ok == true(或进程退出码 0),不要用 code == 0:成功信封没有顶层 code / msg 字段,code 只出现在错误信封的 error 内。按 OpenAPI 老格式 {"code": 0, "msg": "ok"}判断会把所有成功调用误判为失败——封装写入类命令时尤其危险。JSON 输出契约 → lark-shared-output-contract.md。

安全规则

  1. 禁止输出密钥(appSecret、accessToken等)到终端明文。

  2. 写入/删除操作前必须确认用户意图。

  3. 目标命令支持 --dry-run 时,用 --dry-run 预览危险请求。

Details

Repository
github.com/larksuite/cli
Category
Productivity & Notes
First seen
Apr 16, 2026

Questions

What does the lark-shared skill do?

It is the shared base for the lark-cli skills, covering identity (user versus bot), authentication, auth login, status and logout, business-domain permissions, missing scopes, and revoking authorization. It also explains how to handle the _notice JSON field that lark-cli outputs.

How do I install the lark-shared skill?

Run npx -y skills add larksuite/cli --skill lark-shared -y in your project. Once installed, the agent can follow the lark-cli setup and authorization rules in the skill's reference files.

Which other skills rank highly in the Productivity and Notes category?

In Productivity and Notes, lark-shared ranks in the top 3 alongside loop-me, lark-base, lark-wiki, lark-task and lark-calendar. Where those skills act on Lark data, lark-shared covers the setup, identity and permission rules those skills depend on.

Does lark-shared need an app configuration or account before use?

The skill requires the lark-cli binary to be available. It points to the lark-shared-config-init reference for first-time app configuration with lark-cli config init, which must be done before authorizing with auth login.

More from larksuite/cli

All 27

Similar to Lark Shared

More Productivity & Notes