lark-shared
飞书/Lark CLI 共享基础:应用配置初始化、认证登录(auth login)、身份切换(--as user/bot)、权限与 scope 管理、Permission denied 错误处理、安全规则。当用户需要第一次配置(`lark-cli config init`)、使用登录授权(`lark-cli auth login`)、遇到权限不足、切换 user/bot 身份、配置 scope、或首次使用 lark-cli 时触发。
Security Assessment
About lark-shared
The 'lark-shared' skill provides a set of foundational tools for interacting with Lark (飞书) resources using the Lark CLI (Command-Line Interface). This skill is designed to help users set up and configure their Lark applications, handle authentication and authorization, manage user and bot identities, and manage access permissions and scopes. It resolves the common challenges of first-time configuration, user and bot identity management, and permission handling for users and applications utilizing the Lark API, enabling a seamless setup experience and reducing the complexity for developers and administrators.
FAQ
How do I configure my Lark application for the first time?
You can configure your Lark application for the first time by running the command `lark-cli config init --new` to start the configuration process. This will provide you with an authorization link to complete the setup.
What are the different identity types in Lark CLI?
There are two identity types in Lark CLI: 'user' (for accessing personal resources like calendar and cloud space) and 'bot' (for application-level actions, requiring appId and appSecret). You can switch between these identities using the `--as` flag.
How do I handle permission issues in Lark CLI?
Permission issues are handled differently depending on whether you're operating as a user or bot. For a bot, you should guide the user to enable the necessary scopes in the Lark developer console. For a user, you should use the `lark-cli auth login` command to authorize with the required domain or scope.
What should I do when a new version of the Lark CLI is available?
When a new version of the Lark CLI is available, you should update it using the command `npm update -g @larksuite/cli && npx skills add larksuite/cli -g -y`. After updating, restart the AI Agent to load the latest skills.
What are the security guidelines when using Lark CLI?
For security, you should never output sensitive keys like appSecret or accessToken in plaintext. Additionally, write and delete operations must be confirmed with the user, and you should use the `--dry-run` option for previewing potentially dangerous commands.
Install lark-shared
Quick Setup:
- Copy the skill folder to
.claude/skills/ - Claude will automatically detect and use the skill
Repository
larksuite/cli