lark-doc
larksuite/cli · Agent Skill
管理飛書文件(Docx/Wiki)內容,包括讀取、建立、編輯、插入/下載圖片以及操作思維筆記。
前往安裝 ↓總覽
| 發布者 | |
|---|---|
| 儲存庫 | larksuite/cli ↗ |
| 技能資料夾 | lark-shared |
| 星 | 17,066 |
| 附帶檔案 | 1 |
| 授權 | MIT |
| 最近更新 | 2026年8月30日 |
| 連結 | 技能原始碼 ↗ · 儲存庫 ↗ |
Mozgi 檢查
我們在技能檔案中發現的內容。詳細資訊需訂閱。
安裝
技能就是一個含 SKILL.md 的資料夾。選擇你的代理,在專案根目錄的終端機(macOS、Linux 或 Windows 的 Git Bash)執行指令。
把提示貼到 Claude、Codex 或其他助理:它會自行檢查並安裝技能。
Install the “lark-doc” skill from mozgi.io (https://mozgi.io/skills/lark-doc/) for me. 1. Download the archive: https://mozgi.io/skills/lark-doc/download If it fails, take the skill folder from the source: https://github.com/larksuite/cli/tree/main/skills/lark-shared 2. Read SKILL.md and the other files. Check the skill is safe: no hidden commands, no sending data elsewhere, no scripts doing something other than described. If anything looks suspicious, stop and tell me. 3. Put the “lark-doc” folder into your agent's skills folder: .claude/skills/ for Claude Code, .agents/skills/ for Codex, .cursor/skills/ for Cursor, .gemini/skills/ for Gemini CLI. Inside the project if we are in one, otherwise in the home folder (~/.claude/skills/ etc.). 4. Make sure <skills folder>/lark-doc/SKILL.md exists. 5. Briefly tell me what this skill does and offer to try it on my task. If you cannot do a step yourself, tell me what to click or type.
git clone --depth 1 --branch main https://github.com/larksuite/cli.git /tmp/cli mkdir -p .claude/skills cp -r /tmp/cli/skills/lark-shared .claude/skills/lark-shared
重新啟動 Claude Code — 技能就會出現在清單中,手動呼叫:/lark-doc。要套用到所有專案,請放在 ~/.claude/skills。
git clone --depth 1 --branch main https://github.com/larksuite/cli.git /tmp/cli mkdir -p .agents/skills cp -r /tmp/cli/skills/lark-shared .agents/skills/lark-shared
Codex 會從目前資料夾往上到儲存庫根目錄,在 .agents/skills 中尋找技能;用 /skills 或 $lark-doc 呼叫。所有專案:~/.agents/skills。
git clone --depth 1 --branch main https://github.com/larksuite/cli.git /tmp/cli mkdir -p .cursor/skills cp -r /tmp/cli/skills/lark-shared .cursor/skills/lark-shared
Cursor 啟動時會載入技能;在 Agent 聊天輸入「/」呼叫。Cursor 也會讀取 .claude/skills 與 .agents/skills。所有專案:~/.cursor/skills。
git clone --depth 1 --branch main https://github.com/larksuite/cli.git /tmp/cli mkdir -p .gemini/skills cp -r /tmp/cli/skills/lark-shared .gemini/skills/lark-shared
任務符合時,Gemini CLI 會提議啟用技能,由你確認。所有專案:~/.gemini/skills。
安裝前請先檢視 SKILL.md 與相關檔案。點擊檔案即可預覽。
SKILL.md 內容
作者原文 · 唯讀lark-cli 共享规则
所有 lark-* skill 共享的底座:身份、认证、输出契约与高风险操作。
通用准则
1. 调用前先确认用法:执行前读对应 reference 或跑 --help,别猜 flag 盲调。
2. 身份决定你代表谁操作:--as user 代表用户本人(能看到、也能操作其日历、云空间/云盘/云存储等个人资源),--as bot 代表应用自己,应用级操作,只能访问bot自己的资源,bot 查用户资源会返回空成功而非报错。动手前先搞清楚身份identity。身份模型和权限管理 → lark-shared-identity-and-permissions.md ↗。
3. 授权 / 配置类 URL 必须配二维码:当命令输出 verification_url、verification_uri_complete、console_url 等 URL 字段时,必须用 lark-cli auth qrcode 生成并在回复中展示,URL 在前二维码在后;优先生成 PNG(--output),仅当用户明确要求时才使用 ASCII(--ascii)。URL 原样转发——不编解码、不加标点、不重拼 query,二维码和链接请一起展示给用户。
4. --format json(默认)下,判断成功用 ok == true(或进程退出码 0),不要用 code == 0:成功信封没有顶层 code / msg 字段,code 只出现在错误信封的 error 内。按 OpenAPI 老格式 {"code": 0, "msg": "ok"}判断会把所有成功调用误判为失败——封装写入类命令时尤其危险。JSON 输出契约 → lark-shared-output-contract.md ↗。
安全规则
1. 禁止输出密钥(appSecret、accessToken等)到终端明文。
2. 写入/删除操作前必须确认用户意图。
3. 目标命令支持 --dry-run 时,用 --dry-run 预览危险请求。
4. 退出码 10 是高风险确认门禁(risk: "high-risk-write"),不是错误:停下 → 向用户确认(展示 action、risk 和关键参数)→ 取得用户显式同意后,将 hint 指出的确认 flag 追加到你原始 argv 的末尾后重试;绝不静默加确认 flag 绕过 → lark-shared-high-risk-approval.md ↗。
5. 文件路径只接受相对路径:--file、--output、--output-dir、@file 等路径参数只接受 cwd 下的相对路径,传绝对路径会报 unsafe file path。数据输入(@file、大 JSON)优先用 stdin 传入,避免路径和转义问题。
Reference 强触发索引
命中任一触发条件时,MUST 在执行下一步前读取对应 reference。命中多条时按表中顺序读取,同一reference只读取一次。
| 强触发条件(命中任一即必读) | Reference |
|---|---|
| 查看自己是谁(user/bot)、获取当前身份详细字段信息、身份诊断、--as选择逻辑、身份延续、登录态、认证、scope、授权和权限管理、missing_scopes 或 console_url、Agent 准备发起或完成 auth login | lark-shared-identity-and-permissions.md ↗ |
| 需要依赖 JSON 输出契约判断成功 / 失败、读取 stdout / stderr,或为命令编写脚本与封装 | lark-shared-output-contract.md ↗ |
| 准备执行high-risk-write(高风险操作)、判断命令风险等级、遇到退出码 exit 10、confirmation_required、确认后重试 | lark-shared-high-risk-approval.md ↗ |
| 首次使用CLI需运行 lark-cli config init 完成应用配置、或 CLI 明确提示 config init --new | lark-shared-config-init.md ↗ |
| 用户询问 notice、CLI版本更新、或输出含 _notice(升级 / skills 落后 / 废弃命令提示)| lark-shared-update-notice.md ↗ |
常見問題
lark-doc 技能有什麼用途?
管理飛書文件(Docx/Wiki)內容,包括讀取、建立、編輯、插入/下載圖片以及操作思維筆記。
如何安裝 lark-doc?
打開本頁的「安裝」區塊並選擇你的代理 — Claude Code、Codex、Cursor 或 Gemini CLI:那裡有把技能資料夾複製到正確位置的現成指令。也可以複製「透過助理」分頁中的提示,讓助理自行檢查並安裝技能。
lark-doc 適用哪些 AI 模型?
技能是純 Markdown 指示(Agent Skills 格式),因此 lark-doc 適用任何讀取 SKILL.md 的代理:Claude Code、Codex、Cursor、Gemini CLI、GitHub Copilot、OpenCode 等。只有在任務符合技能描述時,模型才會載入指示。
lark-doc 是免費的嗎?
此技能由 larksuite 公開發布,採用 MIT 授權。技能本身免費 — 你只需向 AI 供應商支付實際使用的 token 費用。
安裝技能安全嗎?
技能是代理會遵循的指示,安裝前請閱讀 SKILL.md 及相關檔案。技能資料夾中的腳本只有在代理執行時才會運行 — 留意它的動作,不要授予多餘權限。
技能和 MCP 伺服器或外掛有何不同?
MCP 伺服器或外掛為模型提供新工具 — 會執行並回傳結果的程式碼。技能提供的是知識與流程:如何處理任務、要遵循哪些步驟、好的成果長什麼樣子。它不需要伺服器或 API 金鑰。