lark-shared

Manages lark-cli authentication, identity switching, output contracts, and high-risk operation approvals.

2.0k|291|Updated Jul 24, 2026
One-click install
npx skills add https://github.com/Pinvou/pinvou-agent --skill lark-shared-pinvou
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-shared
Source: https://github.com/Pinvou/pinvou-agent/tree/main/pinvou3-app/src-tauri/resources/common/bundle/lark-skills/lark-shared
Command: npx skills add https://github.com/Pinvou/pinvou-agent --skill lark-shared-pinvou

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires lark-cli, and includes references (resource) components.

What problem does it solve? When working with any lark-* skill, agents often stumble on authentication setup, user-versus-bot identity confusion, misreading JSON output envelopes, and unexpected exit code 10 confirmation gates. This Skill provides the shared foundation that resolves those issues consistently. ## Core Features & Use Cases - Authentication & Configuration: Guides first-time setup with lark-cli config init, split-flow authorization via auth login --no-wait, QR code generation for authorization URLs, and login status checks with auth status and whoami. - Identity & Permission Handling: Explains --as user versus --as bot semantics, incremental scope authorization, and how to resolve missing_scope errors using console_url hints. - Output Contract & Safety Gates: Defines the JSON success/error envelope rules (ok == true, not code == 0) and the exit-10 high-risk-write approval protocol requiring explicit user confirmation before retrying with confirmation flags. - Use Case: An agent calling a lark-cli drive delete command receives exit code 10 with a confirmation_required envelope; this Skill instructs it to present the action and risk to the user, obtain explicit consent, then retry with --yes appended to the original arguments. ## Quick Start Ask the agent to check the current lark-cli login identity and authorization status before running any other lark command.

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 for the first time?

Run lark-cli config init to configure the application, then use lark-cli auth login with --scope or --domain plus --no-wait --json to get a verification URL. Generate a QR code with lark-cli auth qrcode, let the user authorize, then complete with auth login --device-code.

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

The --as user identity acts on behalf of the user and can access personal resources like calendars and cloud drive, while --as bot acts as the application and only accesses bot-owned resources. Bot queries against user resources return empty success rather than errors.

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

Exit code 10 is a high-risk-write confirmation gate, not an error. The stderr JSON contains confirmation_required with the action and a hint flag such as --yes; show the action to the user, get explicit consent, then retry with the confirmation flag appended.

How do I check lark-cli command success in JSON output?

Check that ok equals true or the process exit code is 0. Success envelopes have no top-level code field; code only appears inside the error object, so checking code == 0 misclassifies every successful call as a failure.

How do I fix missing_scope permission errors in lark-cli?

For bot identity, share the console_url from the error so scopes can be enabled in the developer console; never run auth login as bot. For user identity, run auth login with the specific missing scope using --scope and --no-wait --json for incremental authorization.