Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/bundle/lark-skills/lark-doc
lark-doc
Verified【何时用:仅当用户明确指向飞书/Lark(发到飞书、飞书文档等)时使用;泛指做个文档或PPT或表格或方案默认走本地工具,不要误用飞书】飞书云文档(Docx/Wiki)与思维笔记内容操作:读取、创建、编辑,插入/下载图片附件,查询/回滚历史版本。用户给出文档URL/token(doubao.com /docx/、/wiki/)按路径/token 路由;`/page/<token>` 是妙搭应用非云文档;内嵌表格/多维表格提取 token 切对应 skill;画板无技能,CLI 直连。评论走 lark-drive;表格/Base 内部操作不在本 skill。
references/lark-doc-media-download.md
View on GitHub
# docs +media-download(下载文档素材/画板缩略图)
> **前置条件:** 按 [`../SKILL.md`](../SKILL.md) 的按需策略,执行本命令前**不预读** [`../../lark-shared/SKILL.md`](../../lark-shared/SKILL.md);仅遇到认证、token / 身份或 scope 错误时再读取该 Skill,修复后重试。
下载文档中的图片/文件素材(`file_token`),或下载画板缩略图(`whiteboard_id`)。当 `--output` 不带扩展名时,会根据响应的 `Content-Type` 自动补全扩展名。
## 选择规则
- 用户明确说“下载素材”时,使用 `docs +media-download`
- 用户只是想查看、预览图片或文件素材时,优先使用 [`docs +media-preview`](lark-doc-media-preview.md)
- 如果目标明确是画板 / whiteboard / 画板缩略图,继续使用 `docs +media-download --type whiteboard`;`+media-preview` 不支持画板
## 命令
```bash
# 下载图片/文件素材(默认 type=media)
lark-cli docs +media-download --token "Z1Fjxxxxxxxx" --output ./asset
# 指定输出文件名(带扩展名则不会自动补全)
lark-cli docs +media-download --token "Z1Fjxxxxxxxx" --output ./asset.png
# 下载画板缩略图(whiteboard token)
lark-cli docs +media-download --type whiteboard --token "wbcnxxxxxxxx" --output ./whiteboard
```
## 参数
| 参数 | 必填 | 说明 |
|------|------|------|
| `--token <token>` | 是 | 资源 token:素材为 `file_token`,画板为 `whiteboard_id` |
| `--output <path>` | 是 | 本地保存路径;不带扩展名会自动补全 |
| `--type <type>` | 否 | `media`(默认)或 `whiteboard` |
## token 从哪里来
- 若你是从文档内容里提取:`lark-doc-fetch` 返回的内容里可能包含:
- 图片:`<img token="..." .../>`
- 文件:`<source token="..." name="..."/>`
- 画板:`<whiteboard token="..."/>`
## 排障
- 如果返回 `permission_denied`,或最终下载返回 `HTTP 403`,按错误 `hint` 改用 [`docs +media-preview`](lark-doc-media-preview.md) 预览内容。
- 如果返回限流错误,停止立即重试,稍后按指数退避重试。
## 参考
- [lark-doc-fetch](lark-doc-fetch.md) — 获取文档内容(用于提取 token)
- [lark-doc-media-preview](lark-doc-media-preview.md) — 预览素材
- [lark-shared](../../lark-shared/SKILL.md) — 认证和全局参数
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| canvas-designanthropics/skillsCreate beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| docxanthropics/skillsUse this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pdfanthropics/skillsUse this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text/tables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting/decrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| pptxanthropics/skillsUse this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions "deck," "slides," "presentation," or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |