Pinvou/pinvou-agent / pinvou3-app/src-tauri/resources/common/skill-marketplace/tencent-docs-skill
tencent-docs
Unverified腾讯文档(docs.qq.com)-在线云文档平台,是创建、编辑、管理**在线**文档的首选 skill。仅当用户明确指向腾讯文档/在线文档/docs.qq.com,或任务需要在线协作文档时使用;泛指"做个文档/保存成文件/PPT"且未点名在线平台时,默认走本地工具(本地 pptx 技能等),不要误用本 skill。支持能力:(1) 创建各类在线文档(文档/Word/Excel/幻灯片/思维导图/流程图/智能表格/收集表)(2) 管理知识库空间(创建空间、查询空间列表)(3) 管理空间节点、文件夹结构 (4) 读取/搜索文档内容 (5) 编辑操作智能表 (6) 编辑操作在线文档 (7) 文件管理(重命名、移动、删除、复制、导入导出)(8) 网页剪藏、本地文件/html/文档上云。
references/ocr_references.md
View on GitHub# OCR 图片识别参考文档
## 工具总览
| 工具 | 功能 | 输入 | 输出 |
|------|------|------|------|
| `ocr.extract` | 识别单张图片文字 | 单张图片 | 文字列表,可选带坐标 |
| `ocr.toword` | 图片转在线文档 | 1-9 张图片 | `file_id` + `file_url` |
| `ocr.toexcel` | 图片表格转在线表格 | 1-9 张图片 | `file_id` + `file_url` |
**限制**:单张 ≤10MB,总 ≤50MB,格式 PNG/JPG/JPEG/BMP/WEBP
## 图片来源路由(重要)
```
├─ 有公网 URL → 直接调 ocr.* 工具,填 image_url(首选)
├─ 本地文件 → shell `base64` 读取编码后,调 ocr.* 工具传 image_base64
└─ data URI → 先存本地文件,再走 base64 编码
```
**本地图片先用 shell 的 `base64` 命令编码**,再把 base64 字符串作为 `image_base64` / `images[].image_base64` 参数调用 `mcp_tencent-docs_ocr.*` 工具:
```bash
# 编码本地图片(macOS 无需 -w 0)
base64 -w 0 /path/to/image.png > /tmp/image_b64.txt
```
## 图片输入字段规则
`image_url` 与 `image_base64` **严格二选一**,不能同时填也不能都不填:
- `image_url`:公网 http(s) URL,必须后端可直接下载(不支持内网/需鉴权/过期签名地址)
- `image_base64`:纯 base64 字符串,**不接受** URL 或 `data:image/...;base64,` 前缀
---
## ocr.extract
| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `image_url` | string | 二选一(首选) | 公网图片 URL |
| `image_base64` | string | 二选一 | 纯 base64 字符串 |
| `extract_type` | string | 否 | `basic`(默认,平衡)/ `accurate`(高精度,适合小字模糊)/ `efficient`(快速) |
| `with_positions` | bool | 否 | 是否返回文字坐标,默认 false |
**返回**:`texts`(string[]) 文字列表 + `text_detections`(仅 with_positions=true 时) 带坐标结果
```json
{"image_url": "https://example.com/invoice.png", "extract_type": "accurate", "with_positions": true}
```
## ocr.toword / ocr.toexcel
两个工具参数结构相同,区别仅在输出类型(文档 vs 表格)。单张图片时启用矫正增强,效果优于批量。
| 参数 | 类型 | 必填 | 说明 |
|------|------|------|------|
| `images` | array | 是 | 1-9 张,每项含 `image_url` 或 `image_base64` 二选一 |
| `title` | string | 否 | 标题,默认"OCR识别文档"/"OCR识别表格" |
**返回**:`file_id` + `file_url`
```json
{"images": [{"image_url": "https://example.com/page-1.png"}], "title": "会议纪要"}
```
---
## 典型工作流
### 提取图片文字
1. URL → `ocr.extract`;本地 → shell `base64` 编码后调 `ocr.extract` 传 `image_base64`
2. 从 `texts` 拼接结果反馈用户
### 图片转文档/表格
1. URL → `ocr.toword`/`ocr.toexcel`;本地 → shell `base64` 编码后调 `ocr.toword`/`ocr.toexcel` 传 `images[].image_base64`
2. 返回 `file_url` 给用户
### OCR 回填到现有文档
1. 先用上述方式拿到 `texts`
2. 按目标类型写回:smartcanvas → `smartcanvas.edit`(INSERT_AFTER) / Word → `insert_markdown` / sheet → `smartsheet.add_records`
---
## 注意事项
- 同步接口,图片多或精度高时较慢,耐心等待不要重复触发
- 仅 1 张图且对质量敏感时,不要凑数传多张(单张有矫正增强)
- URL 下载失败时改用 base64 重试
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 |