Agent skill · software engineering · aiskillstore

lark-shared

Use for lark-cli setup/auth tasks: auth login/status/logout, user vs bot identity, business-domain permissions (--domain, including all/docs/drive), missing scopes, revoking authorization, or handling _notice JSON.

Why this skill is useful

Adds executable commands for lark-cli authentication and configuration management that are not widely documented.

What it needs

Requires lark-cli installed locally. About 3k tokens when loaded. Last updated 2026-08-07. 405 stars on the source repository.

What this skill does

lark-cli 共享规则 本技能指导你如何通过lark-cli操作飞书资源, 以及有哪些注意事项。 配置初始化 首次使用需运行 lark-cli config init 完成应用配置。 当你帮用户初始化配置时,使用background方式使用下面的命令发起配置应用流程,启动后读取输出,从中提取授权链接并发给用户。 URL 转发规则:当命令输出 verificationurl、verificationuricomplete、consoleurl 等 URL 字段时:必须生成二维码:你必须调用 lark-cli auth qrcode 将 URL 转为二维码并展示给用户,这是必须步骤,不要跳过。优先生成 PNG 二维码(--output);仅当用户明确要求时才使用 ASCII(--ascii)。URL 输出规则:将 URL 视为不可修改的 opaque string,不要做任何修改(包括 URL 编码/解码、添加空格或标点、重新拼接 query),二维码和链接请一起展示给用户。 认证 认证任务速查 认证、scope、业务域、登录态、退出登录态、撤销授权问题都走本技能。 用户意图 首选命令 / 回答 --- --- 获取全部权限 lark-cli auth login --domain all --no-wait --json 按业务域授权 lark-cli auth login --domain docs --domain drive --no-wait --json;--domain 可重复,也可用逗号分隔 指定单个 scope 授权 lark-cli auth login --scope "<scope>" --no-wait --json 检查当前登录态、是谁登录、token 是否有效 lark-cli auth status --json --verify;回答时引用 identity、verified、identities.user.status、identities.user.userName、identities.user.openId(用户 open id)、identities.user.tokenStatus、identities.user.scope 快速查看当前身份状态 lark-cli whoami;实际生效的那一个身份 退出当前机器的用户登录态 lark-cli auth logout --json;loggedOut:true 表示注销成功 bot 缺少权限 不要执行 auth login;引导用户在开发者后台开通 bot scope,优先复用错误里的 consoleurl 取消用户对应用的全部服务端授权 auth logout 只清本机登录态;服务端授权需用户在飞书授权管理页取消 只取消一个 scope CLI 不支持单独撤销一个已授予 scope;可重新走最小 scope 授权,或让用户在授权管理页处理 机器读取 JSON 时,为减少 notice 干扰,可在命令前加: 身份类型 两种身份类型,通过 --as 切换: 身份 标识 获取方式 适用场景 ------ ------ --------- --------- user 用户身份 --as user lark-cli auth login 等 访问用户自己的资源(日历、云空间/云盘/云存储等) bot 应用身份 --as bot 自动,只需 appId + appSecret 应用级操作,访问bot自己的资源 身份选择原则 输出的 [identity: bot/user] 代表当前身份。bot 与 user 表现差异很大,需确认身份符合目标需求: Bot 看不到用户资源:无法访问用户的日历、云空间(云盘/云存储)文档、邮箱等个人资源。例如 --as bot 查日程返回 bot 自己的(空)日历 Bot 无法代表用户操作:发消息以应用名义发送,创建文档归属 bot Bot 权限:只需在飞书开发者后台开通 scope,无需 auth login User 权限:后台开通 scope + 用户通过 auth login 授权,两层都要满足 权限不足处理 遇到权限相关错误时,根据当前身份类型采取不同解决方案。 错误响应中包含关键信息: permissionviolations:列出缺失的 scope (N选1) consoleurl:飞书开发者后台的权限配置链接 hint:建议的修复命令 Bot 身份(--as bot) 将错误中的 consoleurl 原样提供给用户,引导去后台开通 scope。禁止对 bot 执行 auth login。 User 身份(--as user) 规则:auth login 必须指定范围(--domain 或 -- …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills aiskillstore/lark-shared

View the source on GitHub

Browse the @skills marketplace