lark-shared

Manages lark-cli authentication, identity selection, permissions, and JSON output contracts for Feishu workflows.

3|2|Updated Jul 21, 2026
One-click install
npx skills add https://github.com/zlsbksdxl/codex-lark --skill lark-shared-zlsbksdxl
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-shared
Source: https://github.com/zlsbksdxl/codex-lark/tree/main/plugins/feishu2codex/skills/lark-shared
Command: npx skills add https://github.com/zlsbksdxl/codex-lark --skill lark-shared-zlsbksdxl

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Configuring and authenticating the lark-cli against Feishu/Lark involves device-code OAuth flows, user-versus-bot identity choices, incremental scope grants, and structured JSON envelopes that are easy to misinterpret. This Skill centralizes the shared rules so every lark-cli operation starts from a correct, authorized, and safe state. ## Core Features & Use Cases - Guided setup and authentication: Runs lark-cli config init and split-flow auth login with --no-wait, generates QR codes for verification URLs, and completes device-code authorization in a later turn. - Identity and permission handling: Distinguishes user vs bot identities via --as, resolves missing scopes with domain- or scope-level incremental login, and routes bot permission gaps to the developer console URL. - Safe command execution: Enforces the JSON envelope contract (ok == true, not code == 0), handles the exit-10 high-risk-write confirmation gate with explicit user approval, and supports --dry-run previews. - Use Case: A user asks the agent to read their calendar, but the CLI reports a missing scope. The Skill initiates auth login --scope calendar:calendar:readonly --no-wait --json, shows the URL and QR code, then completes the device-code login after the user confirms. ## Quick Start Ask the agent to check your current lark-cli login status and identity, then authorize the calendar read scope if it is missing.

Frequently Asked Questions about lark-shared

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I authenticate lark-cli with Feishu using device code flow?

Run lark-cli auth login with --no-wait --json and a --scope or --domain flag to get a verification_url and device_code. Show the URL and a generated QR code to the user, then run auth login --device-code after they confirm authorization.

What is the difference between user and bot identity in lark-cli?

User identity (--as user) accesses personal resources like calendars and drive files and requires auth login authorization. Bot identity (--as bot) acts as the application, needs only appId and appSecret, and cannot see user-owned resources.

How do I fix missing scope permission errors in lark-cli?

For user identity, run auth login with the missing scope or its business domain; scopes accumulate across logins. For bot identity, do not run auth login—open the console_url from the error and enable the scope in the developer console.

Why does lark-cli exit with code 10 on delete operations?

Exit code 10 is a confirmation gate for high-risk-write actions, returned with a confirmation_required error envelope. Show the action and risk to the user, and only retry with --yes appended after explicit user approval.

How should I check whether a lark-cli JSON command succeeded?

Check that the envelope field ok equals true or that the process exit code is 0. Do not check code == 0, because success envelopes have no top-level code field and that pattern misclassifies every success as failure.

Can lark-cli revoke a single granted scope?

No, the CLI cannot revoke one scope individually. You can re-authorize with a minimal scope set, or the user can manage granted permissions in the Feishu authorization management page; auth logout only clears local login state.