Skip to content

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。

FileKindSize
SKILL.mdskill md4.8 KB
references/genres/business-analysis.mdmarkdown3.1 KB
references/genres/data-report.mdmarkdown2.9 KB
references/genres/email.mdmarkdown4.2 KB
references/genres/execution-plan.mdmarkdown2.9 KB
references/genres/formal-doc.mdmarkdown4.4 KB
references/genres/meeting-minutes.mdmarkdown2.3 KB
references/genres/memo-brief.mdmarkdown2.0 KB
references/genres/official-redhead.mdmarkdown6.1 KB
references/genres/prd.mdmarkdown2.5 KB
references/genres/proposal.mdmarkdown2.1 KB
references/genres/research-report.mdmarkdown3.2 KB
references/genres/retrospective.mdmarkdown2.4 KB
references/genres/route-consumer.mdmarkdown3.8 KB
references/genres/route-creative.mdmarkdown3.6 KB
references/genres/route-knowledge.mdmarkdown4.7 KB
references/genres/route-marketing.mdmarkdown4.2 KB
references/genres/route-media.mdmarkdown3.7 KB
references/genres/route-opinion.mdmarkdown3.6 KB
references/genres/route-personal-brand.mdmarkdown3.4 KB
references/genres/route-platform.mdmarkdown639 B
references/genres/route-report.mdmarkdown1.2 KB
references/genres/route-workplace.mdmarkdown2.8 KB
references/genres/sop-tutorial.mdmarkdown4.0 KB
references/genres/technical-doc.mdmarkdown3.5 KB
references/genres/wechat.mdmarkdown3.9 KB
references/genres/weekly-report.mdmarkdown2.0 KB
references/genres/white-paper.mdmarkdown3.1 KB
references/genres/xiaohongshu.mdmarkdown3.2 KB
references/lark-doc-create-workflow.mdmarkdown9.3 KB
references/lark-doc-create.mdmarkdown3.3 KB
references/lark-doc-fetch.mdmarkdown7.8 KB
references/lark-doc-history.mdmarkdown5.4 KB
references/lark-doc-md.mdmarkdown5.8 KB
references/lark-doc-media-download.mdmarkdown2.3 KB
references/lark-doc-media-insert.mdmarkdown6.9 KB
references/lark-doc-media-preview.mdmarkdown1.7 KB
references/lark-doc-mindnote.mdmarkdown5.9 KB
references/lark-doc-resource-cover.mdmarkdown4.2 KB
references/lark-doc-script.mdmarkdown5.1 KB
references/lark-doc-update.mdmarkdown7.4 KB
references/lark-doc-whiteboard.mdmarkdown9.0 KB
references/lark-doc-xml-extended-blocks.mdmarkdown4.4 KB
references/lark-doc-xml.mdmarkdown5.4 KB

references/lark-doc-create.md

View on GitHub
# docs +create(创建飞书云文档)

从 XML(默认)或 Markdown 内容创建一个新的飞书云文档;语义创作默认使用 XML,只有 Authoring 明确判定为 Markdown 例外时才使用 Markdown。

写入前必须按 `--doc-format` 读取对应格式参考:`xml` 读取 [`lark-doc-xml.md`](lark-doc-xml.md),`markdown` 读取 [`lark-doc-md.md`](lark-doc-md.md);Markdown 中使用 XML 扩展标签时还须读取 `lark-doc-xml.md`。

## 命令

```bash
# 简单内容优先使用 `--content -`,文件导入如下:
lark-cli docs +create --doc-format xml --content "@<XML 文件相对路径>"
lark-cli docs +create --doc-format markdown --content "@./draft.md"
```

## 返回值

```json
{
  "ok": true,
  "identity": "user",
  "data": {
    "document": {
      "document_id": "docx_token",
      "revision_id": 1,
      "url": "https://xxx.feishu.cn/docx/docx_token",
      "new_blocks": [
        { "block_id": "blkcnXXXX", "block_type": "whiteboard", "block_token": "boardXXXX" }
      ]
    },
    "warnings": [],
    "tips": ""
  }
}
```

- **`document.new_blocks`**:本次操作新增的 block 列表(如画板)。`block_id` 可用于 `docs +update` 的 `--block-id` 做精确编辑;`block_token` 是资源块(如画板)的 token,画板后续操作用 `lark-cli whiteboard +export` / `+update`(lark-whiteboard skill 未随包收录,用法以 `--help` 为准)。
- **`warnings`**:服务端返回的警告列表;`ok=true` 时也要检查,按提示确认是否存在降级或未完全处理的内容。
- **`tips`**:服务端返回的后续处理建议;为空表示没有额外建议,非空本身不表示创建失败。
- **`permission_grant`**:仅以 bot 身份创建时返回。CLI 会尝试为当前 CLI 用户授予新文档的 `full_access`;`status` 为 `granted` 表示授权成功,`skipped` 表示没有可用的当前用户 `open_id`,`failed` 表示文档已创建但授权失败。`perm` 固定为 `full_access`,失败或跳过时按 `message` / `hint` 处理。**自动授权不等于 owner 转移;用户要求转移 owner 时必须单独确认。**

## 参数

|参数|必填|说明|
|-|-|-|
|`--title`|否|文档标题,Markdown 导入时使用;XML 创建推荐在 `--content` 开头写 `<title>...</title>`;多个标题仅保留第一个|
|`--content`|视情况|文档内容(XML 或 Markdown 格式);不传 `--content` 时必须传 `--title`|
|`--reference-map`|否|结构化 `reference_map` JSON object;必须与 `--content` 一起使用。普通写入优先把结构写在正文里;该参数主要用于保留或回放已有 `document.reference_map`。支持直接 JSON、任务独占目录内的相对 `@file`,或 `-` 从 stdin 读取。|
|`--doc-format`|否|CLI 与语义创作均默认 `xml`,并建议显式传入;仅用户明确要求 Markdown 或保真导入 Markdown 时使用 `markdown`。不要混用完整的 XML 与 Markdown 文档格式;Markdown 中允许使用文档已定义的 XML 扩展标签。|
|`--parent-token`|否|父文件夹或知识库节点 token(与 `--parent-position` 互斥)|
|`--parent-position`|否|父节点位置,如 `my_library`(与 `--parent-token` 互斥)|

## 需要回查文档

用 `lark-cli docs +fetch --doc "<document_id 或文档 URL>" --detail with-ids` 回查,若需要更多信息可查看 [`+fetch`](lark-doc-fetch.md)。
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall
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: 198kUpdated Claude CodeCodexVerifiedInstall