lark-shared

Manages lark-cli authentication, identity selection, and permission recovery for Feishu resources.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Working with Feishu (Lark) resources through lark-cli requires correct authentication, identity selection between user and bot, and proper handling of missing scopes and authorization errors. This Skill provides the shared rules and workflows so every lark-cli operation runs with the right identity, permissions, and safety gates. ## Core Features & Use Cases - Authentication Workflows: Handles auth login, status checks, logout, and split-flow device-code authorization with QR code generation for user consent. - Identity Management: Distinguishes user vs bot identities via --as, enforces identity continuity across multi-command workflows, and prevents silent identity fallback. - Permission Recovery: Diagnoses missing_scope vs resource ACL errors, routes bot scope fixes to the developer console, and retries with the original identity after recovery. - Safety Gates: Enforces confirmation protocol for high-risk write operations (exit code 10), supports --dry-run previews, and blocks secret leakage. - Use Case: When a lark-cli command fails with a missing scope error, this Skill guides the agent to initiate a scoped re-authorization, show the user a QR code and URL, complete the device-code flow, and retry the original command with the same identity. ## Quick Start Use the lark-shared skill to check my current lark-cli login status and verify which identity and scopes are active.

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 to lark-cli with specific permissions?

Run lark-cli auth login with either --domain for business-domain scopes (all, docs, drive) or --scope for a specific permission, plus --no-wait --json. Multiple logins accumulate scopes incrementally, and the command returns a verification URL and device code for user consent.

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

User identity (--as user) accesses personal resources like calendars and cloud docs and requires auth login, while bot identity (--as bot) acts as the application using only appId and appSecret. Bots cannot see user resources, so the correct identity must be chosen per task.

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

For user identity, re-run auth login with the missing scope from the error's missing_scopes field. For bot identity, do not run auth login; instead open the console_url from the error in the Feishu developer console to enable the scope, then retry with the original identity.

Why does lark-cli exit with code 10 on some commands?

Exit code 10 means the command is a high-risk write operation requiring confirmation, indicated by error.type confirmation in the stderr JSON. Show the action and risk to the user, and only retry with --yes appended after explicit user approval.

Can I revoke a single granted scope in lark-cli?

No, lark-cli does not support revoking an individual granted scope. You can re-authorize with a minimal scope set, or the user can manage server-side authorization in the Feishu authorization management page; auth logout only clears local login state.