Feishu cli

From fanfan-de/anybox · View interactive version

Feishu cli is an AI agent skill from the GitHub repository fanfan-de/anybox. Use when the user wants to operate Feishu or Lark through the official lark-cli command-line tool from shell commands, including setup, authentication, messages, docs, calendar, sheets, base, tasks, mail, meetings, approvals, and raw OpenAPI calls.

How to use this skill

Skill file

Feishu CLI

Use this skill when the user asks to use Feishu, Lark, Feishu CLI, Lark CLI, or lark-cli from the agent shell. This is a CLI-first workflow, not an MCP workflow. Use shell commands to call lark-cli directly.

Operating Model

Setup Checks

First check whether the CLI is available:

lark-cli --version

If it is missing, tell the user it needs to be installed, then use the official installer when the user wants you to proceed:

npx @larksuite/cli@latest install

After installation, initialize app configuration if needed:

lark-cli config init --new

Then check login state:

lark-cli auth status

If not logged in, start login with recommended scopes:

lark-cli auth login --recommend

For agent-driven browser handoff, use non-blocking login when appropriate and relay only the authorization URL or next safe instruction to the user:

lark-cli auth login --recommend --no-wait

Safety Rules

Common Commands

Check authentication:

lark-cli auth status
lark-cli auth list
lark-cli auth scopes

Calendar examples:

lark-cli calendar +agenda --format json
lark-cli calendar +agenda --as user --format json

Messages:

lark-cli im +messages-send --as bot --chat-id "oc_xxx" --text "Hello" --dry-run
lark-cli im +messages-send --as bot --chat-id "oc_xxx" --text "Hello"

Docs:

lark-cli docs +create --api-version v2 --doc-format markdown --content "<title>Title</title>`n# Heading`nContent"

Raw API fallback:

lark-cli api GET /open-apis/calendar/v4/calendars --format json
lark-cli api POST /open-apis/im/v1/messages --params "{\"receive_id_type\":\"chat_id\"}" --data "{\"receive_id\":\"oc_xxx\",\"msg_type\":\"text\",\"content\":\"{\\\"text\\\":\\\"Hello\\\"}\"}" --dry-run

Workflow

  1. Identify whether the task is read-only or a write action.
  2. Run setup checks only when the current CLI/auth state is unknown.
  3. Choose the highest-level shortcut command first, then service commands, then raw API as a last resort.
  4. For read tasks, return a concise summary and mention key IDs only when useful.
  5. For write tasks, dry-run when available, confirm the target and content, then execute.
  6. If output is too large, rerun with narrower filters, pagination, or a more specific command.

Troubleshooting

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.