lark-shared

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

Updated Jun 26, 2026
One-click install
npx skills add https://github.com/dulltackle/kangkang-skills --skill lark-shared-dulltackle
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: lark-shared
Source: https://github.com/dulltackle/kangkang-skills/tree/main/lark-shared
Command: npx skills add https://github.com/dulltackle/kangkang-skills --skill lark-shared-dulltackle

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with lark-cli across Lark/Feishu services requires consistent handling of user vs bot identity, OAuth-style authorization flows, JSON output parsing, and confirmation gates for dangerous write operations. This Skill provides the shared foundation so every lark-* workflow behaves correctly and safely. ## Core Features & Use Cases - Authentication & Identity Management: Run auth login/status/logout, choose between --as user and --as bot, handle domain- or scope-based incremental authorization, and complete split-flow device-code logins with QR codes. - Output Contract Enforcement: Parse the JSON envelope correctly by checking ok == true instead of the legacy code == 0, avoiding false failure detection when wrapping commands. - High-Risk Approval Protocol: Handle exit code 10 confirmation gates by showing the user the action and risk, then retrying with the confirmation flag only after explicit consent. - Use Case: A user asks to check their login state and grant calendar permissions. The Skill runs lark-cli auth status --json --verify, identifies missing scopes, initiates auth login --scope ... --no-wait --json, generates a QR code for the verification URL, and completes the device-code flow in a follow-up turn. ## Quick Start Ask the assistant to check your current lark-cli login identity and grant the required permission scopes for your task.

Frequently Asked Questions about lark-shared

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

FAQPage Schema
How do I log in and authorize scopes with lark-cli?

Run lark-cli auth login with --domain, --scope, or --recommend plus --no-wait --json to get a verification_url and device_code. Show the URL with a QR code from lark-cli auth qrcode, then complete the flow later with auth login --device-code.

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

The user identity accesses the user's own resources like calendars and drive files, while the bot identity acts as the application and can only reach bot-owned resources. A bot querying user resources returns empty success rather than an error.

Why does my lark-cli command return exit code 10?

Exit code 10 is a high-risk-write confirmation gate, not an error. Show the user the action, risk level, and key parameters, then retry with the confirmation flag from the hint field only after explicit user consent.

How do I check whether a lark-cli command succeeded in JSON output?

Check ok == true or process exit code 0, never code == 0. Success envelopes have no top-level code field; code only appears inside the error object of failure envelopes, so the old OpenAPI check misjudges every success as failure.

What should I do when lark-cli reports missing_scopes?

For bot identity, give the user the console_url to enable scopes in the developer console and never run auth login for a bot. For user identity, run auth login with the missing scope or domain to incrementally grant permissions.

Can lark-cli accept absolute file paths for --file or --output?

No, path parameters like --file, --output, --output-dir, and @file only accept relative paths under the current working directory. Absolute paths trigger an unsafe file path error, and large data inputs should be passed via stdin.