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/文档上云。
doc/doc_format/README.md
View on GitHub# 文本格式化模块
纯文本 → 结构化 XML → 样式美化的工程化流程。
---
## 文件结构
```
doc_format/
├── prompt/
│ ├── scenario_recognition_prompt.txt # 场景识别 Prompt
│ ├── pure_text_system_prompt.txt # 文本转 XML Prompt
│ └── style_customization_prompt.txt # 样式解析 Prompt
└── templates/
├── general.json # 通用场景模板
├── paper.json # 学术论文模板
├── contract.json # 合同模板
├── essay.json # 作文模板
├── government.json # 公文模板
```
---
## 工作流程
你需要按照以下步骤完成文本美化任务:
### 步骤 1: 场景识别与标题生成
分析用户提供的文本内容,识别所属场景并生成文档标题。
**参考规则:** `prompt/scenario_recognition_prompt.txt`
**你必须输出给用户:**
```json
{
"scenario": "场景标识",
"title": "生成的标题(2-25字符)"
}
```
---
### 步骤 2: 样式自定义(可选)
**仅当用户明确提出样式要求时执行此步骤**,例如:
- "标题用初号黑体"
- "正文改成小四"
- "标题居中显示"
**允许样式:** 参考 `templates/{scenario}.json` 中的 `schema.children[].structure` 字段,必须为叶节点的样式。
**参考规则:** `prompt/style_customization_prompt.txt`
**你必须输出给用户(JSON 数组格式):**
```json
[
{
"structureName": "Title",
"fontSize": 42,
"fontFamily": "黑体",
"fontColor": "AE2E19",
"alignment": 2,
"lineSpacing": 1.5
}
]
```
如果用户没有样式要求,此步骤不输出。
---
### 步骤 3: 文本转 XML 结构化
根据识别的场景,加载对应模板,将纯文本转换为结构化 XML。
**模板位置:** `templates/{scenario}.json`
**参考规则:** `prompt/pure_text_system_prompt.txt`
**你必须输出给用户:**
```json
{
"xml": "<root>...</root>"
}
```
---
### 步骤 4: 调用套用 MCP 工具
使用 `tdoc-doc` 服务对应的 MCP 工具 `doc.ai_format_pure_text` 调用套用 API(本包所有 `doc.*` 工具均经 `tdoc-doc` 服务调用),传入前面步骤的结果,生成在线腾讯文档链接。
**MCP 工具参数:**
- `title`: 文档标题(步骤 1 的输出)
- `xml`: 格式套用后的文档 XML 结构(步骤 3 的输出)
- `scenario`: 模板场景(步骤 1 的输出)
- `customStyles`: 对文档的自定义样式(步骤 2 的输出,可选,需序列化为 JSON 字符串)
**最终输出文档链接给用户。**
## 注意事项
### JSON 序列化
文本中的引号必须正确转义:
❌ 错误:
```json
{"text": "合同(以下简称"本合同")"}
```
✅ 正确:
```json
{"text": "合同(以下简称\"本合同\")"}
```
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 |