lark-shared

lark-shared is a skill for Claude Code, Codex from davidtoby/agent-skills. It costs 49 tokens per session (2,978 once invoked), scanned A, original, MIT.

A helper for setting up and troubleshooting lark-cli, a command-line tool for accessing Feishu resources. It covers sign-in, user or bot identity, permissions, and access scopes.

In plain words
What is it for?
Starting or ending login sessions, checking the current identity and permissions, selecting business domains, and handling missing-access errors.
Why use it?
It helps diagnose why Feishu commands cannot authenticate or access the requested data.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Starting or ending login sessions, checking the current identity and permissions, selecting…

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/davidtoby/agent-skills/lark-shared
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add davidtoby/agent-skills --skill lark-shared
Clone the repo
git clone --depth 1 https://github.com/davidtoby/agent-skills

Made for: Claude Code, Codex.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for lark-shared

README.md
[![agentmods](https://agentmods.dev/badge/skills/davidtoby/agent-skills/lark-shared.svg)](https://agentmods.dev/skills/davidtoby/agent-skills/lark-shared)
Your own site
<a href="https://agentmods.dev/skills/davidtoby/agent-skills/lark-shared"><img src="https://agentmods.dev/badge/skills/davidtoby/agent-skills/lark-shared.svg" alt="Measured on agentmods" height="20"></a>
Per session 49 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,978 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00049 $0.02978
Opus 5 $0.00024 $0.01489
Sonnet 5 $0.00010 $0.00596
Haiku 4.5 $0.00005 $0.00298

Measured 3d ago against content hash 036e6fe4f45e, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

lark-shared scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

skills/lark-shared/SKILL.md · 212 lines

How it starts

The opening of the file, as written. The whole thing — 212 lines — stays where its author put it; the contents beside it link to each section on GitHub.

lark-cli 共享规则

本技能指导你如何通过lark-cli操作飞书资源, 以及有哪些注意事项。

配置初始化

首次使用需运行 lark-cli config init 完成应用配置。

当你帮用户初始化配置时,使用background方式使用下面的命令发起配置应用流程,启动后读取输出,从中提取授权链接并发给用户。

URL 转发规则:当命令输出 verification_urlverification_uri_completeconsole_url 等 URL 字段时:必须生成二维码:你必须调用 lark-cli auth qrcode 将 URL 转为二维码并展示给用户,这是必须步骤,不要跳过。优先生成 PNG 二维码(--output);仅当用户明确要求时才使用 ASCII(--ascii)。URL 输出规则:将 URL 视为不可修改的 opaque string,不要做任何修改(包括 URL 编码/解码、添加空格或标点、重新拼接 query),二维码和链接请一起展示给用户。

# 发起配置(该命令会阻塞直到用户打开链接并完成操作或过期)
lark-cli config init --new

认证

认证任务速查

认证、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;回答时引用 identityverifiedidentities.user.statusidentities.user.userNameidentities.user.openId(用户 open id)、identities.user.tokenStatusidentities.user.scope
快速查看当前身份状态 lark-cli whoami;实际生效的那一个身份
退出当前机器的用户登录态 lark-cli auth logout --jsonloggedOut:true 表示注销成功
bot 缺少权限 不要执行 auth login;引导用户在开发者后台开通 bot scope,优先复用错误里的 console_url
取消用户对应用的全部服务端授权 auth logout 只清本机登录态;服务端授权需用户在飞书授权管理页取消
只取消一个 scope CLI 不支持单独撤销一个已授予 scope;可重新走最小 scope 授权,或让用户在授权管理页处理

机器读取 JSON 时,为减少 _notice 干扰,可在命令前加:

LARKSUITE_CLI_NO_UPDATE_NOTIFIER=1 LARKSUITE_CLI_NO_SKILLS_NOTIFIER=1 lark-cli auth status --json --verify

身份类型

两种身份类型,通过 --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 授权,两层都要满足

Read the full file on GitHub · 212 lines

Files

What ships with it

1 file beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 212 lines · 49 tokens per session scan A 036e6fe4f45e

Subscribe to this mod's changes

lark-shared is a skill published in the GitHub repository davidtoby/agent-skills (10 stars, last pushed 1mo ago), licensed MIT. It adds 49 tokens to every session and 2,978 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.