larksuite avatar

Lark Shared

Handles the foundational setup and authentication flow for Lark/Feishu CLI operations. Walks you through initial app configuration with `lark-cli config init`, manages the two-layer permission system (backend scopes plus user authorization), and crucially helps you pick the right identity with `--as user` versus `--as bot`. The bot identity can't see user calendars or documents, which trips people up constantly. When you hit permission errors, it parses the response to guide you through either backend scope configuration or the proper `auth login` command. Also catches version update notices and reminds you to restart your AI agent after CLI updates.

install copies · 90 days. Times the install command was copied on this site in the last 90 days, bots filtered.
7
skills.sh installs
487.1K
GitHub stars
18K
last updated
Aug 21, 2026

Install

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

Installs into .claude/skills of the current project.

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 预览危险请求。

Sponsors

Details

Repository
github.com/larksuite/cli
Categories
Backend & APIs, Security, Documentation, CLI & Terminal, Office & Documents
First seen
Apr 16, 2026

More from larksuite/cli

All 29
1larksuite avatarlark-skill-makerlarksuite/cli创建 lark-cli 的自定义 Skill。当用户需要把飞书 API 操作封装成可复用的 Skill(包装原子 API 或编排多步流程)时使用。476Kskills.sh installs
2heygen-com avatarembedded-captionsheygen-com/hyperframesAdd captions or subtitles to an existing single-subject talking-head video without editing the footage. Use for plain verbatim captions, cinematic captions embe453.9Kskills.sh installs
3microsoft avatarentra-agent-idmicrosoft/azure-skillsProvision Microsoft Entra Agent Identity Blueprints, BlueprintPrincipals, and per-instance Agent Identities via Microsoft Graph, and configure OAuth 2.0 token e428.8Kskills.sh installs
4runcomfy-com avatarcontrolnet-poseruncomfy-com/skillsPose-conditioned generation on RunComfy via the `runcomfy` CLI. Routes across Kling 2-6 Motion Control Pro / Standard (transfer the motion / blocking of a refer274Kskills.sh installs
5runcomfy-com avatarnano-banana-editruncomfy-com/skillsEdit images with Google Nano Banana 2 (image-to-image edit endpoint) on RunComfy. Documents Nano Banana Edit's strengths (preserve subject identity, swap backgr274Kskills.sh installs
6higgsfield-ai avatarhiggsfield-marketplace-cardshiggsfield-ai/skillsGenerate marketplace product image cards through Higgsfield: compliant main image, secondary product images, and A+ style content modules. Use when the user ask210.6Kskills.sh installs