Skip to content

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/文档上云。

FileKindSize
SKILL.mdskill md22.1 KB
aipage_pack.jsscript19.0 KB
doc/doc_format/README.mdmarkdown2.9 KB
doc/doc_format/prompt/pure_text_system_prompt.txtmarkdown2.3 KB
doc/doc_format/prompt/scenario_recognition_prompt.txtmarkdown1.7 KB
doc/doc_format/prompt/style_customization_prompt.txtmarkdown2.5 KB
doc/doc_format/templates/contract.jsonconfig1.0 KB
doc/doc_format/templates/essay.jsonconfig489 B
doc/doc_format/templates/general.jsonconfig2.7 KB
doc/doc_format/templates/government.jsonconfig1019 B
doc/doc_format/templates/paper.jsonconfig4.6 KB
doc/entry.mdmarkdown800 B
references/aipage_references.mdmarkdown5.0 KB
references/auth.mdmarkdown1.2 KB
references/diagram_references.mdmarkdown2.2 KB
references/docengine_references.mdmarkdown87.2 KB
references/manage_references.mdmarkdown31.9 KB
references/ocr_references.mdmarkdown3.3 KB
references/slideengine_references.mdmarkdown76.2 KB
references/smartsheet_references.mdmarkdown31.5 KB
references/space_references.mdmarkdown7.0 KB
references/unsupported_feature_reporting.mdmarkdown1.1 KB
references/workflows.mdmarkdown7.9 KB
sheet/api/mcp-api.mdmarkdown55.2 KB
sheet/entry.mdmarkdown15.5 KB
sidebar-pptx-generator/references/component-box.mdmarkdown4.0 KB
sidebar-pptx-generator/references/component-chart.mdmarkdown10.5 KB
sidebar-pptx-generator/references/component-codeblock.mdmarkdown1.6 KB
sidebar-pptx-generator/references/component-diagram.mdmarkdown2.7 KB
sidebar-pptx-generator/references/component-faicon.mdmarkdown2.9 KB
sidebar-pptx-generator/references/component-image.mdmarkdown5.5 KB
sidebar-pptx-generator/references/component-math.mdmarkdown2.1 KB
sidebar-pptx-generator/references/component-qrcode.mdmarkdown1.1 KB
sidebar-pptx-generator/references/component-slide.mdmarkdown3.9 KB
sidebar-pptx-generator/references/component-svg.mdmarkdown1.3 KB
sidebar-pptx-generator/references/component-table.mdmarkdown3.2 KB
sidebar-pptx-generator/references/component-text.mdmarkdown3.0 KB
sidebar-pptx-generator/references/design-principle.mdmarkdown4.5 KB
sidebar-pptx-generator/scripts/doc_image_extractor.pyscript12.4 KB
sidebar-pptx-generator/scripts/get_slide_info.shexecutablescript4.3 KB
slide/entry.mdmarkdown20.6 KB
smartcanvas/entry.mdmarkdown45.5 KB
smartcanvas/mdx_references.mdmarkdown22.7 KB
smartcanvas/template/12_week_muscle_building_workout_plan.mdxmarkdown16.8 KB
smartcanvas/template/2025_ai_industry_trend_analysis_report.mdxmarkdown16.1 KB
smartcanvas/template/2026_family_annual_budget_plan.mdxmarkdown12.2 KB
smartcanvas/template/2026_personal_annual_goal_plan.mdxmarkdown14.2 KB
smartcanvas/template/annual_holiday_greeting_messages.mdxmarkdown16.4 KB
smartcanvas/template/app_2_project_retrospective.mdxmarkdown6.2 KB
smartcanvas/template/british_shorthair_cat_care_guide.mdxmarkdown17.0 KB
smartcanvas/template/career_growth_books_and_movies_recommendations.mdxmarkdown17.0 KB
smartcanvas/template/chinese_modern_wedding_planning_guide.mdxmarkdown12.6 KB
smartcanvas/template/coffee_shop_location_analysis_report.mdxmarkdown21.6 KB
smartcanvas/template/community_fresh_delivery_feasibility_report.mdxmarkdown21.1 KB
smartcanvas/template/community_group_buying_annual_operation_plan.mdxmarkdown10.3 KB
smartcanvas/template/company_5th_anniversary_event_plan.mdxmarkdown8.8 KB
smartcanvas/template/ecommerce_membership_points_prd.mdxmarkdown12.2 KB
smartcanvas/template/english_self_introduction_for_interview.mdxmarkdown7.0 KB
smartcanvas/template/family_weekly_healthy_meal_plan.mdxmarkdown10.9 KB
smartcanvas/template/finance_graduate_career_plan.mdxmarkdown12.7 KB
smartcanvas/template/food_review_self_media_operation_plan.mdxmarkdown10.9 KB
smartcanvas/template/graduate_admission_recommendation_letter.mdxmarkdown3.8 KB
smartcanvas/template/internet_product_manager_cover_letter.mdxmarkdown4.0 KB
smartcanvas/template/internet_product_manager_interview_checklist.mdxmarkdown7.2 KB
smartcanvas/template/maternity_ecommerce_user_persona_report.mdxmarkdown20.8 KB
smartcanvas/template/new_tea_brand_annual_promotion_plan.mdxmarkdown20.9 KB
smartcanvas/template/office_worker_knowledge_side_business_plan.mdxmarkdown16.0 KB
smartcanvas/template/online_education_summer_marketing_plan.mdxmarkdown16.2 KB
smartcanvas/template/online_office_tool_user_research_report.mdxmarkdown16.4 KB
smartcanvas/template/p6_to_p7_promotion_report.mdxmarkdown9.0 KB
smartcanvas/template/principles_ray_dalio_book_notes.mdxmarkdown15.9 KB
smartcanvas/template/q1_quarterly_marketing_operations_summary.mdxmarkdown6.8 KB
smartcanvas/template/quanzhou_3_day_travel_guide.mdxmarkdown7.9 KB
smartcanvas/template/shared_apartment_moving_checklist.mdxmarkdown7.1 KB
smartcanvas/template/shared_powerbank_business_model_report.mdxmarkdown16.8 KB
smartcanvas/template/short_video_platform_competitive_analysis_2026.mdxmarkdown31.2 KB
smartcanvas/template/smart_home_iot_business_plan.mdxmarkdown20.3 KB
smartcanvas/template/smartwatch_comparison_apple_watch_vs_huawei_gt.mdxmarkdown12.7 KB
smartcanvas/template/space_theme_6th_birthday_party_plan.mdxmarkdown9.2 KB
smartcanvas/template/summer_internship_report_data_analyst.mdxmarkdown6.6 KB
smartcanvas/template/ui_designer_probation_summary.mdxmarkdown5.1 KB

references/aipage_references.md

View on GitHub
# 本地 HTML 一键上云(.aipage 导入)

本文档定义「把本地 HTML 打包成 `.aipage` 并上传到腾讯文档」的标准工作流,
适用场景:

- 上游 skill(如 `smart-page`)只产出 HTML 目录 / 单文件,**打包与导入由本 skill 接手完成**。
- 用户直接给出本地 `.html` 路径并要求「上传 / 导入 / 上云 / 发布到腾讯文档」。

> ⚠️ 上游 skill **禁止**自行实现 `prepare-pack` / `pack` / 拼接 `pre_import + async_import`
> 的逻辑;必须改为调用本工作流。

---

## 触发条件

任一满足即触发:

1. 用户输入包含本地 `.html` 文件路径,且语义包含「上传 / 导入 / 上云 / 发布 / 同步到腾讯文档」。
2. 上游 skill(典型为 `smart-page`)显式声明「HTML 已生成,请用 tencent-docs 打包并导入」,
   并提供:
   - 单文件入口:`html_path`(推荐)
   - 或目录入口:`html_dir`(目录内必须有 `index.html`,或唯一一个 `*.html`)
   - 可选:`title`(缺省时自动从 `<title>` 标签或文件名推导)

---

## 标准链路(4 步)

### Step 1:本地打包成 `.aipage`

调用本 skill 自带的脚本 `aipage_pack.js`(**纯 Node.js,零 npm 依赖,跨平台**:macOS / Linux / Windows 原生 cmd / PowerShell 直接可用,不需要 bash / Git Bash / WSL):

```bash
# 单文件模式(最常见)
node scripts_path/aipage_pack.js --html "<html_path>" [--title "<title>"]

# 目录模式(含 assets/ 等附属资源时)
node scripts_path/aipage_pack.js --dir  "<html_dir>"  [--title "<title>"]
```

> `scripts_path` 为本 SKILL 文件所在目录,即包内相对路径 `aipage_pack.js`。
>
> 运行环境要求:Node.js >= 14。Windows 上可直接 `node aipage_pack.js ...`。

脚本以稳定格式输出,可直接 `grep` / 正则解析:

```
AIPAGE_PATH=/tmp/xxx.aipage
AIPAGE_SIZE=123456
AIPAGE_MD5=abcd1234...
AIPAGE_TITLE=立项方案
```

退出码:`0` 成功;`1` 参数错;`2` 源 HTML 不合法;`3` 打包失败 / 工具缺失。

### Step 2:调用 `manage.pre_import` 获取 COS 上传链接

```bash
`mcp_tencent-docs_manage.pre_import` 调用参数:\
  '{"file_name": "<basename(AIPAGE_PATH)>", "file_size": <AIPAGE_SIZE>, "file_md5": "<AIPAGE_MD5>"}'
```

返回字段中需要:`upload_url`、`file_key`、`task_id`。

> Step 2 的 `manage.pre_import` 与 Step 3 的 `curl -X PUT` 上传 COS 均由模型直接
> 调用 MCP 工具与 shell 基础命令完成,无需额外脚本。

### Step 3:PUT 上传到 COS

```bash
curl -sS -X PUT \
  -H "Content-Type: application/octet-stream" \
  --data-binary "@<AIPAGE_PATH>" \
  "<upload_url>"
```

HTTP 2xx 视为上传成功。

### Step 4:触发异步导入并轮询

```bash
# 触发
`mcp_tencent-docs_manage.async_import` 调用参数:\
  '{"task_id":"<task_id>","file_key":"<file_key>","file_name":"<file_name>","file_md5":"<AIPAGE_MD5>","file_size":<AIPAGE_SIZE>}'

# 轮询(建议每 3s 一次,最多 60s)
`mcp_tencent-docs_manage.import_progress` 调用参数:'{"task_id":"<task_id>"}'
```

`progress=100` 时视为成功,从返回中拿 `file_id` / `file_url`,必要时用
`?_fid=<file_id>` 拼接到 `file_url`。

---

## 推荐执行模板(agent 内复用)

```bash
# ① 打包(跨平台:macOS / Linux / Windows 通用,零依赖)
PACK_OUT=$(node <skill_dir>/aipage_pack.js --html "$HTML_PATH" --title "$TITLE")
AIPAGE_PATH=$(echo "$PACK_OUT" | awk -F= '/^AIPAGE_PATH=/{print $2}')
AIPAGE_SIZE=$(echo "$PACK_OUT" | awk -F= '/^AIPAGE_SIZE=/{print $2}')
AIPAGE_MD5=$( echo "$PACK_OUT" | awk -F= '/^AIPAGE_MD5=/{print $2}')

# ② 调用 mcp_tencent-docs_manage.pre_import 获取 upload_url / file_key / task_id
#    参数:{"file_name": "<basename(AIPAGE_PATH)>", "file_size": <AIPAGE_SIZE>, "file_md5": "<AIPAGE_MD5>"}

# ③ PUT 上传到 COS
curl -sS -X PUT -H "Content-Type: application/octet-stream" \
  --data-binary "@$AIPAGE_PATH" "<upload_url>"

# ④ async_import + 轮询(task_id / file_key / file_name 取自 ② pre_import 的返回)
`mcp_tencent-docs_manage.async_import` 调用参数:\
  '{"task_id":"<task_id>","file_key":"<file_key>","file_name":"<file_name>","file_md5":"<AIPAGE_MD5>","file_size":<AIPAGE_SIZE>}'
# 然后轮询 manage.import_progress 至 progress=100
```

---

## 行为约束

- **必须用 `aipage_pack.js` 打包**:禁止 agent 自己 `zip` / 写 `manifest.json` / 写 `janus.manifest.json`;
  打包脚本是唯一真相源,避免与 aicanvas 后端结构契约漂移。Windows 等无 bash 环境必须使用本 `node aipage_pack.js`,**不要**回退到手写 zip。
- **失败重试**:`pre_import` / `async_import` / 轮询失败时最多重试 2 次(间隔 5s),
  仍失败则把 stderr 与 `trace_id`(如有)回报用户,不要静默吞掉错误。
- **成功输出**:拿到 `file_url` 后,独立发起一次 `preview_url` 工具调用,
  然后告知用户「已完成,在线地址如下 ↓」。
- **常见错误码** 参见主 SKILL 的「问题定位指南」,鉴权失败优先看 `references/auth.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