AgenticX: Command for Claude Code

.cursor/commands/setup-feishu-cli.md

setup-feishu-cli is a command for Claude Code, Cursor from DemonDamon/AgenticX. It costs 0 tokens per session (1,821 once invoked), scanned A, original, Apache-2.0.

A guided command for installing and configuring the Lark CLI for multiple Feishu business accounts. Each profile represents one Feishu application and company.

In plain words
What is it for?
It helps install the CLI, add company profiles, and complete browser-based authorization one company at a time.
Why use it?
It prevents accounts logged into the Feishu desktop app from being mistaken for configured CLI profiles. It also keeps application secrets and login details out of project files.

Command for Claude CodeCursor

Written for Cursor and Claude Code: installed under .cursor/, but also a Claude Code command (commands/*.md).

This is DemonDamon/AgenticX's own configuration. It tells Claude Code and Cursor how to work on AgenticX itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything AgenticX configures →

Reuse

Borrowing it

Nothing to install: this file belongs to DemonDamon/AgenticX. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/DemonDamon/AgenticX/main/.cursor/commands/setup-feishu-cli.md
Clone the repo
git clone --depth 1 https://github.com/DemonDamon/AgenticX

Made for: Claude Code, Cursor.

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 setup-feishu-cli

README.md
[![agentmods](https://agentmods.dev/badge/commands/demondamon/agenticx/setup-feishu-cli/github.svg)](https://agentmods.dev/commands/demondamon/agenticx/setup-feishu-cli)
Your own site
<a href="https://agentmods.dev/commands/demondamon/agenticx/setup-feishu-cli"><img src="https://agentmods.dev/badge/commands/demondamon/agenticx/setup-feishu-cli/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for setup-feishu-cli

Your own site · 80×15
<a href="https://agentmods.dev/commands/demondamon/agenticx/setup-feishu-cli"><img src="https://agentmods.dev/badge/commands/demondamon/agenticx/setup-feishu-cli.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,821 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 1 finding. 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.00000 $0.01821
Opus 5.5 $0.00000 $0.00728
Sonnet 5.5 $0.00000 $0.00364
Haiku 4.5 $0.00000 $0.00182

Measured 10d ago against content hash 49899f288e3d, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

setup-feishu-cli scanned grade A with 1 finding 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 10d 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.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

proc = subprocess.run(
.cursor/commands/setup-feishu-cli.md · 168 lines

How it starts

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

setup-feishu-cli

从安装到配置多个飞书企业账号。一个 profile 对应一个开放平台应用,对应一个企业。飞书客户端里登了几个企业,不会自动变成几条 profile。

官方安装页:飞书 CLI。命令与多账号说明以 larksuite/cli 的中文 README 为准。

命令名

  • 对话里使用:/setup-feishu-cli
  • 可选参数:要配置的企业清单。用户没给清单时,先列出已有 profile,再问还要加哪几个企业。

硬性边界

  • 只改本机 lark-cli 配置(钥匙串 / ~/.lark-cli)。不要把 App Secret、device code、用户令牌写入仓库、plan、commit 或 mcp.json。
  • 回复用户时不回显 App Secret。添加 profile 时 Secret 只从 stdin 进入 lark-cli profile add --app-secret-stdin。
  • 不使用 config init 覆盖已有默认应用。已有 App ID 时用 profile add,不要再 --new 出一个重复应用。
  • 未经用户点名,不执行 profile use、profile remove。单次操作用 --profile "<名称>"。
  • 同一轮只发起一个企业的浏览器授权。展示授权链接和二维码后结束本轮,等用户说做完了,再执行 --device-code。不要在同一轮里阻塞等待。
  • 授权失败且 CLI 写明「请勿持续重试」时,不要立刻重开登录。把缺的 scope 告诉用户。

第一步:安装

需要本机有 Node.js(npm / npx)。源码编译才需要 Go 1.23+ 和 Python 3。

先检查:

command -v lark-cli && lark-cli -v

已有可执行文件就跳过安装,向用户报告版本和路径。没有则用官方一行安装(飞书 CLI 安装页 与 README 的推荐方式):

npx @larksuite/cli@latest install

装完再跑 command -v lark-cli && lark-cli -v。新开的 shell 找不到命令时,提示用户新开终端,或执行 hash -r。

源码安装只在用户明确要求时使用:

git clone https://github.com/larksuite/cli.git
cd cli
make install
npx skills add larksuite/cli -y -g

npm 安装脚本若没有装上 Agent skills,补一次:

npx skills add larksuite/cli -y -g

用 lark-cli skills list 确认能看到 lark-shared。不要把社区包 feishu-mcp 或 @larksuiteoapi/lark-mcp 当成这个 CLI。

第二步:看清已有账号

lark-cli profile list
lark-cli whoami

向用户说明:active: true 是以后不写 --profile 时的默认身份。tokenStatus: valid 且 user 非空,才算用户身份可用。只有 bot、没有 user 的 profile 不能读该用户的知识库和云文档。

第三步:逐个企业接入

对用户点名的每一个企业单独做完下面一整段,再开始下一个。

3.1 已有应用

用户提供该企业的 App ID 和 App Secret。profile 名称用用户指定的短名(例如企业简称),不要用 App ID 当名字,除非用户要求。

python3 - << 'PY'
import subprocess
secret = """PASTE_SECRET"""
proc = subprocess.run(
    [
        "lark-cli", "profile", "add",
        "--name", "PROFILE_NAME",
        "--app-id", "APP_ID",
        "--app-secret-stdin",
        "--lang", "zh_cn",
    ],
    input=secret,
    text=True,
    capture_output=True,
)
print(proc.stdout)
print(proc.stderr)
raise SystemExit(proc.returncode)
PY
lark-cli --profile "PROFILE_NAME" whoami

Read the full file on GitHub · 168 lines

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. 10d ago First seen · 168 lines · 0 tokens per session scan A 49899f288e3d

Subscribe to this mod's changes

setup-feishu-cli is a command published in the GitHub repository DemonDamon/AgenticX (988 stars, last pushed yesterday), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 1,821 tokens. A static security scan graded it A with 1 finding (runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-10-27.

Related

setup-feishu-cli compared with commands from other repositories

setup-feishu-cli next to 6 commands from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
setup-feishu-cliDemonDamon/AgenticXCommand988yesterdayApache-2.0A0Claude Code, Cursor
parallel-executeshyftlabs/continuumCommand841mo agoApache-2.0A0Claude Code
renameasgeirtj/system_prompts_leaksCommand71k2d agoCC0-1.0A0Claude Code
dashboard-session-abort-allBlackBeltTechnology/pi-agent-dashboardCommand3412d agoMITA16Claude Code
dashboard-session-renameBlackBeltTechnology/pi-agent-dashboardCommand3412d agoMITA18Claude Code
dashboard-session-tellBlackBeltTechnology/pi-agent-dashboardCommand3412d agoMITA21Claude Code
dashboard-session-unhideBlackBeltTechnology/pi-agent-dashboardCommand3412d agoMITA18Claude Code