skills/lark-switch/SKILL.md
切换 lark-cli 飞书账号配置。当用户需要在多个飞书账号之间切换(如个人/组织)、查看当前账号、或新增账号配置时使用。触发词:lark-switch, 切换飞书账号, switch feishu account, 飞书切换
npx skillsauth add psylch/lark-switch-skill lark-switchInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Match user's language: Respond in the same language the user uses.
在多个 lark-cli 飞书账号配置之间切换。每个 profile 对应一个飞书应用(App ID + Secret),通过替换 ~/.lark-cli/config.json 实现切换。Token 随 config 文件保存,切换后无需重新授权。
bash <SKILL_DIR>/scripts/helper.sh preflight
检查 lark-cli 是否安装、config 目录是否存在、有哪些可用 profiles。
source ~/.lark-cli/switch.sh <profile>
示例:
source ~/.lark-cli/switch.sh personal # 切到个人账号
source ~/.lark-cli/switch.sh einsia # 切到 Einsia 组织账号
source ~/.lark-cli/switch.sh # 查看所有可用 profiles
lark-cli auth status
应返回 tokenStatus: "valid" 和正确的 userName。
当用户需要添加新的飞书账号时:
# 1. 配置应用
echo "<app-secret>" | lark-cli config init --app-id <app-id> --app-secret-stdin --brand feishu
# 2. 登录用户身份
lark-cli auth login --domain docs,wiki,drive
# 3. 保存 profile
cp ~/.lark-cli/config.json ~/.lark-cli/config-<name>.json
# 4. 保存 secret(用于 keychain 恢复)
echo -n "<app-secret>" > ~/.lark-cli/.<name>.secret
chmod 600 ~/.lark-cli/.<name>.secret
# 5. 恢复之前的活跃 profile
source ~/.lark-cli/switch.sh <previous-profile>
注意:lark-cli config init 是破坏性操作,会覆盖当前 config.json。新增 profile 前务必确认当前 profile 已保存。
Token 有效期约 2 小时,refresh token 7 天。如果切换后 auth status 显示 token 过期:
lark-cli auth login --domain docs,wiki,drive
# 登录后重新保存 profile
cp ~/.lark-cli/config.json ~/.lark-cli/config-<current-profile>.json
| 症状 | 原因 | 解决 |
|------|------|------|
| keychain entry not found | keychain 中该 appId 的 secret 被清除 | 从 .<profile>.secret 文件恢复,或重新 config init |
| client secret is invalid | 飞书后台的 secret 已刷新 | 获取新 secret,重新 config init 并保存 |
| app is pending approval | 组织应用未审批 | 联系管理员审批 |
| 切换后需要重新授权 | config 文件中 token 丢失 | 确认保存的是登录后的完整 config |
tools
Use when work should span one or more detached tasks but still behave like one job with a single owner context. TaskFlow is the durable flow substrate under authoring layers like Lobster, ACPX, plugins, or plain code. Keep conditional logic in the caller; use TaskFlow for flow identity, child-task linkage, waiting state, revision-checked mutations, and user-facing emergence.
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
# Lobster Lobster executes multi-step workflows with approval checkpoints. Use it when: - User wants a repeatable automation (triage, monitor, sync) - Actions need human approval before executing (send, post, delete) - Multiple tool calls should run as one deterministic operation ## When to use Lobster | User intent | Use Lobster? | | ------------------------------------------------------ | --------------------------
tools
A CLI tool for making authenticated requests to the X (Twitter) API. Use this skill when you need to post tweets, reply, quote, search, read posts, manage followers, send DMs, upload media, or interact with any X API v2 endpoint.