Skip to content
Back to skills

Larkswitch

ASecurity

Route lark-cli operations through the intended larkswitch user account. Use whenever an AI needs to list, search, resolve, select, or switch Feishu/Lark accounts; act on behalf of a named person; choose among multiple authorized users; verify the executing identity; or sees account, 账号, 身份, 代某人, 授权用户, larkswitch, lpcctl, --account, --lpc-account, LARKSWITCH_ACCOUNT, or LPC_ACCOUNT. Also use before a lark-cli business command when the user names the account or person to operate as.

  • 15 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 19, 2026
toolsshell

Works with

  • terminal
  • cli

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 19, 2026

npx -y skills add larkswitch/lark-switch --skill larkswitch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Larkswitch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Larkswitch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/larkswitch-larkswitch/badge)](https://www.skillsdirectory.com/skills/larkswitch-larkswitch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: larkswitch
description: Route lark-cli operations through the intended larkswitch user account. Use whenever an AI needs to list, search, resolve, select, or switch Feishu/Lark accounts; act on behalf of a named person; choose among multiple authorized users; verify the executing identity; or sees account, 账号, 身份, 代某人, 授权用户, larkswitch, lpcctl, --account, --lpc-account, LARKSWITCH_ACCOUNT, or LPC_ACCOUNT. Also use before a lark-cli business command when the user names the account or person to operate as.
---

# larkswitch routing

Treat a larkswitch account as a **person**. The official CLI Profile is an App configuration. Never use official `--profile` to select a person. Select a person with `--account` (compatibility alias `--lpc-account`).

## Choose the account

`larkswitch` and `lpcctl` are the same control plane. Prefer `larkswitch`. If it is not on `PATH`, use the helper:

```powershell
$larkswitch = "$HOME\.agents\skills\larkswitch\scripts\larkswitch.ps1"
& $larkswitch account list
& $larkswitch account search --q "name or alias"
& $larkswitch account resolve "exact selector"
```

1. If the user names a person, account, or alias, resolve it before the business command.
2. Use `search` only for discovery. Use `resolve` for execution; never guess after zero or multiple matches.
3. Accept strict selectors: `id:<uuid>`, `alias:<alias>`, an exact unique display name, or `app:<app-id-or-unique-label>/<identity>`.
4. If the user does not specify an account, use the current locked account without switching it.

## Execute without changing the default

Put `--account` at the very beginning of the `lark-cli` arguments:

```powershell
lark-cli --account "exact selector" whoami
lark-cli --account "exact selector" calendar +agenda --as user
```

`--as user` is official user-vs-bot, not a person selector. Prefer the one-shot flag for AI calls. It affects only that process.

For several commands in one controlled terminal session, `LARKSWITCH_ACCOUNT` is allowed (`LPC_ACCOUNT` is a compatibility alias). Clear it afterward.

Priority: `--account` / `--lpc-account` over `LARKSWITCH_ACCOUNT` over `LPC_ACCOUNT` over the current locked account.

## Verify identity safely

```powershell
lark-cli --account "exact selector" whoami
```

Confirm `onBehalfOf.userName` matches the intended person. Do not print tokens, App secrets, keychain data, account config directories, or complete diagnostic dumps.

## Change the default only when explicitly requested

```powershell
& $larkswitch account resolve "exact selector"
& $larkswitch account switch "resolved account UUID"
```

Already-running commands keep their startup identity.

## Avoid these errors

- Wrong: `lark-cli --profile "person" ...`
- Wrong: globally switch accounts for a one-off request.
- Wrong: choose the first fuzzy search result.
- Correct: `lark-cli --account "person or alias" ...`

Files in this skill

  • SKILL.md2.8 KB
  • agents/openai.yaml275 B
  • scripts/larkswitch.ps11 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…