@acedatacloud/skills 2026.703.1 → 2026.703.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -71,6 +71,7 @@ These skills drive third-party connectors users wire up at [auth.acedata.cloud/u
71
71
  | [wechat-official-account](skills/wechat-official-account/) | Manage WeChat MP — drafts, publishing, materials, user tags | `wechat` (BYOC) |
72
72
  | [personal-wechat](skills/personal-wechat/) | Operate a personal WeChat account through a self-hosted Wisdom service | `personalwechat` (BYOC) |
73
73
  | [wecom](skills/wecom/) | WeCom (企业微信) self-built app — contacts, app messages, WeDoc, schedules, meetings | `wecom` (BYOC) |
74
+ | [tencent-docs](skills/tencent-docs/) | Create / read / list / search / manage Tencent Docs — docs, sheets, slides, mind maps, flowcharts | `tencentdocs` (BYOC) |
74
75
 
75
76
  ## Prerequisites
76
77
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/skills",
3
- "version": "2026.703.1",
3
+ "version": "2026.703.2",
4
4
  "description": "Agent Skills for AceDataCloud AI services — music, image, video generation, LLM chat, web search. Compatible with Claude Code, GitHub Copilot, Gemini CLI, OpenAI Codex, and 30+ AI coding agents.",
5
5
  "keywords": [
6
6
  "agent-skills",
@@ -0,0 +1,224 @@
1
+ ---
2
+ name: tencent-docs
3
+ description: Create, read, list, search, and manage Tencent Docs (腾讯文档) — online documents, sheets, slides, mind maps, flowcharts, smart tables, and forms — via the Tencent Docs Open API. Use when the user mentions 腾讯文档 / Tencent Docs / docs.qq.com, a docs.qq.com link, or wants to create / read / organize a doc, sheet, slide, mind map, or flowchart in their Tencent Docs space.
4
+ when_to_use: |
5
+ Trigger when the user wants to work with their Tencent Docs (腾讯文档) space —
6
+ create a new document / sheet / slide / mind map / flowchart / smart table /
7
+ form, read a doc or sheet's content, list a folder, search files by keyword,
8
+ or rename / move / copy / delete a file. Acts in the user's own Tencent Docs
9
+ account, so destructive or outward-facing writes are gated behind confirmation.
10
+ connections: [tencentdocs]
11
+ allowed_tools: [Bash]
12
+ license: Apache-2.0
13
+ metadata:
14
+ author: acedatacloud
15
+ version: "1.0"
16
+ ---
17
+
18
+ # Tencent Docs (腾讯文档)
19
+
20
+ Drive the [Tencent Docs Open API](https://docs.qq.com/open/document/app/) with
21
+ `curl + jq`. Everything runs **in the user's own Tencent Docs account** — only
22
+ files they can access, only the scopes they granted at connect time.
23
+
24
+ ## Auth — three headers (NOT a single Bearer)
25
+
26
+ The `tencentdocs` BYOC connector injects three env vars; every call sends **all
27
+ three** headers:
28
+
29
+ - `TENCENTDOCS_ACCESS_TOKEN` → `Access-Token` header (OAuth2 access token). **Secret.**
30
+ - `TENCENTDOCS_CLIENT_ID` → `Client-Id` header (the developer app's Client ID).
31
+ - `TENCENTDOCS_OPEN_ID` → `Open-Id` header (the user id returned with the token).
32
+
33
+ All endpoints live under `https://docs.qq.com/openapi`. Define a reusable header
34
+ set once per session:
35
+
36
+ ```sh
37
+ AUTH=(-H "Access-Token: $TENCENTDOCS_ACCESS_TOKEN" \
38
+ -H "Client-Id: $TENCENTDOCS_CLIENT_ID" \
39
+ -H "Open-Id: $TENCENTDOCS_OPEN_ID")
40
+ ```
41
+
42
+ Never echo, print, or log `TENCENTDOCS_ACCESS_TOKEN` — it is full account access.
43
+
44
+ ## Response shape & error handling
45
+
46
+ Every response is `{"ret": 0, "msg": "Succeed", "data": {…}}`. **`ret == 0`
47
+ means success**; any non-zero `ret` is an error — surface `msg` to the user.
48
+ Always check it:
49
+
50
+ ```sh
51
+ resp=$(curl -sS "${AUTH[@]}" … )
52
+ echo "$resp" | jq 'if .ret == 0 then .data else error("Tencent Docs \(.ret): \(.msg)") end'
53
+ ```
54
+
55
+ Common error codes:
56
+
57
+ | code | meaning | what to do |
58
+ |---|---|---|
59
+ | `400006` | access token invalid / expired | tell the user to reconnect 腾讯文档 at <https://auth.acedata.cloud/user/connections> — do **not** loop-retry |
60
+ | `400007` | VIP (超级会员) privilege required | the requested capability needs a Tencent Docs 超级会员; tell the user, link <https://docs.qq.com/vip> |
61
+ | `400008` | 积分 (credits) insufficient | AI-generation quota is exhausted; tell the user to top up |
62
+ | `11607` / `-32603` | bad request params | recheck `fileID` / `type` / body fields against the recipe below |
63
+
64
+ ## Doc types (`type` when creating)
65
+
66
+ | type | Product | Notes |
67
+ |---|---|---|
68
+ | `doc` | 在线文档 (Word-style) | classic rich-text document |
69
+ | `sheet` | 在线表格 (Excel) | data tables |
70
+ | `slide` | 幻灯片 (PPT) | presentations |
71
+ | `mind` | 思维导图 | mind map |
72
+ | `flowchart` | 流程图 | flowchart |
73
+ | `smartsheet` | 智能表格 | structured multi-view table |
74
+ | `form` | 收集表 | form / survey |
75
+
76
+ ## Recipes
77
+
78
+ ### Verify auth (always run first)
79
+
80
+ Cheap sanity check — read the app's OpenAPI usage counter:
81
+
82
+ ```sh
83
+ curl -sS "${AUTH[@]}" "https://docs.qq.com/openapi/drive/v2/util/resource-use" \
84
+ | jq 'if .ret == 0 then .data else "ERR \(.ret): \(.msg)" end'
85
+ ```
86
+
87
+ If this returns `400006`, the connection is expired — have the user reconnect.
88
+
89
+ ### List a folder (root = `/`)
90
+
91
+ ```sh
92
+ curl -sS "${AUTH[@]}" \
93
+ "https://docs.qq.com/openapi/drive/v2/folders/%2F?listType=folder&sortType=browse&asc=0" \
94
+ | jq 'if .ret == 0 then [.data.list[]? | {ID, title, type, url}] else . end'
95
+ ```
96
+
97
+ `%2F` is the URL-encoded root folder id. For a sub-folder use its folder id in
98
+ the path.
99
+
100
+ ### Search files by keyword
101
+
102
+ ```sh
103
+ curl -sS -G "${AUTH[@]}" \
104
+ "https://docs.qq.com/openapi/drive/v2/search" \
105
+ --data-urlencode "searchName=Q1 预算" \
106
+ | jq 'if .ret == 0 then [.data.list[]? | {ID, title, type, url}] else . end'
107
+ ```
108
+
109
+ ### Read a file's metadata
110
+
111
+ The `fileID` is the last path segment of a `https://docs.qq.com/doc/<id>` (or
112
+ `/sheet/`, `/slide/`, …) URL.
113
+
114
+ ```sh
115
+ curl -sS "${AUTH[@]}" \
116
+ "https://docs.qq.com/openapi/drive/v2/files/FILE_ID/metadata" \
117
+ | jq 'if .ret == 0 then .data else . end'
118
+ ```
119
+
120
+ ### Read an online document's content
121
+
122
+ ```sh
123
+ curl -sS "${AUTH[@]}" \
124
+ "https://docs.qq.com/openapi/document/v3/files/FILE_ID/export?exportType=text" \
125
+ | jq 'if .ret == 0 then .data else . end'
126
+ ```
127
+
128
+ ### Read a sheet's cell range
129
+
130
+ Get the sheet's `sheetId` list from the metadata first, then read a range
131
+ (`A1:D10`):
132
+
133
+ ```sh
134
+ curl -sS "${AUTH[@]}" \
135
+ "https://docs.qq.com/openapi/spreadsheet/v2/files/FILE_ID/sheets/SHEET_ID/values?range=A1:D10" \
136
+ | jq 'if .ret == 0 then .data.values else . end'
137
+ ```
138
+
139
+ ### Create a file
140
+
141
+ `POST /openapi/drive/v2/files` with form-urlencoded `title` + `type`. Returns the
142
+ new file's `ID` and `url`.
143
+
144
+ ```sh
145
+ curl -sS -X POST "${AUTH[@]}" \
146
+ "https://docs.qq.com/openapi/drive/v2/files" \
147
+ --data-urlencode "title=会议纪要 2026-07-03" \
148
+ --data-urlencode "type=doc" \
149
+ | jq 'if .ret == 0 then {ID: .data.ID, url: .data.url} else . end'
150
+ ```
151
+
152
+ Swap `type=sheet` / `slide` / `mind` / `flowchart` / `smartsheet` / `form` for
153
+ other doc types. Pass `--data-urlencode "folderID=<id>"` to create inside a
154
+ folder instead of the root.
155
+
156
+ ### Upload an image (for embedding in docs)
157
+
158
+ ```sh
159
+ curl -sS -X POST "${AUTH[@]}" \
160
+ "https://docs.qq.com/openapi/resources/v2/images" \
161
+ -F "file=@./cover.png" \
162
+ | jq 'if .ret == 0 then .data else . end'
163
+ ```
164
+
165
+ ### Rename a file — GATED, confirm first
166
+
167
+ Show the user the current `title` + `url` and the new title, get an explicit
168
+ "yes", then run:
169
+
170
+ ```sh
171
+ curl -sS -X PATCH "${AUTH[@]}" \
172
+ "https://docs.qq.com/openapi/drive/v2/files/FILE_ID" \
173
+ --data-urlencode "title=新的标题" \
174
+ | jq 'if .ret == 0 then "renamed" else . end'
175
+ ```
176
+
177
+ ### Move a file — GATED, confirm first
178
+
179
+ Show the user the file's current `title` + location and the destination folder,
180
+ get an explicit "yes", then run. `folderID=/` moves it back to the root.
181
+
182
+ ```sh
183
+ curl -sS -X PATCH "${AUTH[@]}" \
184
+ "https://docs.qq.com/openapi/drive/v2/files/FILE_ID/move" \
185
+ --data-urlencode "folderID=DEST_FOLDER_ID" \
186
+ | jq 'if .ret == 0 then "moved" else . end'
187
+ ```
188
+
189
+ ### Copy a file
190
+
191
+ ```sh
192
+ curl -sS -X POST "${AUTH[@]}" \
193
+ "https://docs.qq.com/openapi/drive/v2/files/FILE_ID/copy" \
194
+ --data-urlencode "title=副本 - 项目计划" \
195
+ | jq 'if .ret == 0 then {ID: .data.ID, url: .data.url} else . end'
196
+ ```
197
+
198
+ ### Delete a file — GATED, confirm first
199
+
200
+ Deletion moves the file to the recycle bin but is still destructive. **Show the
201
+ user the exact `title` + `url`, get an explicit "yes", then run:**
202
+
203
+ ```sh
204
+ curl -sS -X DELETE "${AUTH[@]}" \
205
+ "https://docs.qq.com/openapi/drive/v2/files/FILE_ID" \
206
+ | jq 'if .ret == 0 then "deleted" else . end'
207
+ ```
208
+
209
+ ## Notes
210
+
211
+ - **Gate writes.** Rename / move / delete / copy and any share-permission change
212
+ act on the user's real files — confirm the exact target before running.
213
+ - **Extract ids from links.** When the user pastes a `docs.qq.com/doc/<id>` (or
214
+ `/sheet/`, `/slide/`, `/mind/`, `/flowchart/`, `/form/`, `/smartsheet/`) URL,
215
+ take the id from the path rather than asking for it.
216
+ - **Pagination.** List / search endpoints return a cursor / `next` marker in
217
+ `data`; pass it back to fetch the next page. Stop when the marker is empty.
218
+ - **Rate / quota.** Free apps get 20,000 API calls/month (超级会员 20,000/day,
219
+ Plus 40,000/day). AI-generation features additionally consume 积分 and may
220
+ require 超级会员 — a `400007` / `400008` means the account tier / credits, not a
221
+ bug in the request.
222
+ - **Full API index.** Beyond the recipes above, the Open API also covers
223
+ smart-table records, form collection, folder CRUD, permissions, and
224
+ import/export — see the [接口索引](https://docs.qq.com/open/document/app/openapi/v2/file/).