@acedatacloud/skills 2026.629.2 → 2026.630.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@acedatacloud/skills",
3
- "version": "2026.629.2",
3
+ "version": "2026.630.0",
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,239 @@
1
+ ---
2
+ name: feishu
3
+ description: Read and write Feishu (飞书) docs, sheets, Base (bitable), Drive files, calendar events, tasks, wiki, and IM messages via the Feishu Open Platform REST API. Use when the user mentions 飞书 / Feishu / Lark, a Feishu document or sheet link, their Feishu calendar, or wants to send a Feishu message.
4
+ when_to_use: |
5
+ Trigger when the user wants to read or write something in Feishu (飞书) —
6
+ summarize / create / edit a doc, read or append to a spreadsheet, query
7
+ or add Base (bitable) records, browse Drive files, look at or create
8
+ calendar events, manage tasks, read wiki nodes, or send an IM message.
9
+ connections: [feishu]
10
+ allowed_tools: [Bash]
11
+ license: Apache-2.0
12
+ metadata:
13
+ author: acedatacloud
14
+ version: "1.0"
15
+ ---
16
+
17
+ We drive the [Feishu Open Platform API](https://open.feishu.cn/document)
18
+ with `curl + jq`. The user's OAuth `user_access_token` is in
19
+ `$FEISHU_TOKEN`; every call sends it as `Authorization: Bearer
20
+ $FEISHU_TOKEN`. All endpoints live under `https://open.feishu.cn/open-apis`.
21
+
22
+ Calls run **in the user's context** (their docs, calendar, messages) — only
23
+ data the user can access and only the scopes they granted at connect time
24
+ (docs / sheets / base / drive / calendar / IM / wiki / task / contacts).
25
+
26
+ ## Response shape & error handling
27
+
28
+ Every Feishu response is `{"code": 0, "msg": "success", "data": {…}}`.
29
+ **`code == 0` means success**; any non-zero `code` is an error — surface
30
+ `msg` to the user. Always check it:
31
+
32
+ ```sh
33
+ resp=$(curl -sS … )
34
+ echo "$resp" | jq 'if .code == 0 then .data else error("Feishu \(.code): \(.msg)") end'
35
+ ```
36
+
37
+ Common error codes:
38
+
39
+ | code | meaning | what to do |
40
+ |---|---|---|
41
+ | `99991663` / `99991668` | access token invalid / expired | tell the user to reconnect Feishu in 连接 settings |
42
+ | `99991661` | no permission (scope not granted) | the connect-time scope is missing — reconnect and grant it |
43
+ | `1254xxx` | resource not found / no access | the user can't see that doc / sheet / app — double-check the token/id |
44
+
45
+ ## Recipes
46
+
47
+ ### Verify auth (always run first)
48
+
49
+ ```sh
50
+ curl -sS https://open.feishu.cn/open-apis/authen/v1/user_info \
51
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
52
+ | jq 'if .code == 0 then {name: .data.name, open_id: .data.open_id, email: .data.email} else . end'
53
+ ```
54
+
55
+ ### Docs (docx)
56
+
57
+ A Feishu doc URL looks like `https://…feishu.cn/docx/<document_id>`. The
58
+ `document_id` is the last path segment.
59
+
60
+ Read a document's plain text:
61
+
62
+ ```sh
63
+ curl -sS "https://open.feishu.cn/open-apis/docx/v1/documents/DOCUMENT_ID/raw_content" \
64
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
65
+ | jq -r 'if .code == 0 then .data.content else "ERR \(.code): \(.msg)" end'
66
+ ```
67
+
68
+ List a document's blocks (structured content):
69
+
70
+ ```sh
71
+ curl -sS "https://open.feishu.cn/open-apis/docx/v1/documents/DOCUMENT_ID/blocks?page_size=500" \
72
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
73
+ | jq 'if .code == 0 then [.data.items[] | {block_id, block_type}] else . end'
74
+ ```
75
+
76
+ Create a new empty document (optionally inside a folder):
77
+
78
+ ```sh
79
+ curl -sS -X POST "https://open.feishu.cn/open-apis/docx/v1/documents" \
80
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
81
+ -H "Content-Type: application/json" \
82
+ -d "$(jq -nc --arg title "会议纪要 2026-07-01" '{title: $title}')" \
83
+ | jq 'if .code == 0 then {document_id: .data.document.document_id} else . end'
84
+ ```
85
+
86
+ Append a text block to a document (insert at the end of the document body —
87
+ `DOCUMENT_ID` is also the root block id):
88
+
89
+ ```sh
90
+ curl -sS -X POST "https://open.feishu.cn/open-apis/docx/v1/documents/DOCUMENT_ID/blocks/DOCUMENT_ID/children" \
91
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
92
+ -H "Content-Type: application/json" \
93
+ -d "$(jq -nc --arg text "由助手追加的一段内容。" '
94
+ {children: [{block_type: 2, text: {elements: [{text_run: {content: $text}}]}}]}')" \
95
+ | jq 'if .code == 0 then "appended" else . end'
96
+ ```
97
+
98
+ ### Spreadsheets (sheets v2)
99
+
100
+ A sheet URL looks like `https://…feishu.cn/sheets/<spreadsheet_token>`.
101
+ A range is `<sheetId>!<A1:range>`, e.g. `abc123!A1:D10`. List sheet ids via
102
+ the metainfo endpoint first if you don't have one.
103
+
104
+ Read a range:
105
+
106
+ ```sh
107
+ curl -sS "https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/SPREADSHEET_TOKEN/values/RANGE" \
108
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
109
+ | jq 'if .code == 0 then .data.valueRange.values else . end'
110
+ ```
111
+
112
+ Append rows after the last non-empty row:
113
+
114
+ ```sh
115
+ curl -sS -X POST "https://open.feishu.cn/open-apis/sheets/v2/spreadsheets/SPREADSHEET_TOKEN/values_append" \
116
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
117
+ -H "Content-Type: application/json" \
118
+ -d "$(jq -nc '{valueRange: {range: "SHEET_ID!A1:B1", values: [["张三", 100], ["李四", 200]]}}')" \
119
+ | jq 'if .code == 0 then .data.updates else . end'
120
+ ```
121
+
122
+ ### Base / 多维表格 (bitable v1)
123
+
124
+ A Base URL looks like `https://…feishu.cn/base/<app_token>`. Get `table_id`
125
+ from `…/bitable/v1/apps/APP_TOKEN/tables`.
126
+
127
+ List records:
128
+
129
+ ```sh
130
+ curl -sS "https://open.feishu.cn/open-apis/bitable/v1/apps/APP_TOKEN/tables/TABLE_ID/records?page_size=100" \
131
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
132
+ | jq 'if .code == 0 then [.data.items[] | {record_id, fields}] else . end'
133
+ ```
134
+
135
+ Create a record:
136
+
137
+ ```sh
138
+ curl -sS -X POST "https://open.feishu.cn/open-apis/bitable/v1/apps/APP_TOKEN/tables/TABLE_ID/records" \
139
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
140
+ -H "Content-Type: application/json" \
141
+ -d "$(jq -nc '{fields: {"标题": "新任务", "状态": "待办"}}')" \
142
+ | jq 'if .code == 0 then {record_id: .data.record.record_id} else . end'
143
+ ```
144
+
145
+ ### Drive files
146
+
147
+ List files in a folder (omit `folder_token` for the root):
148
+
149
+ ```sh
150
+ curl -sS "https://open.feishu.cn/open-apis/drive/v1/files?folder_token=FOLDER_TOKEN&page_size=50" \
151
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
152
+ | jq 'if .code == 0 then [.data.files[] | {name, type, token, url}] else . end'
153
+ ```
154
+
155
+ ### Calendar (v4)
156
+
157
+ List the user's calendars (the primary one has `type: "primary"`):
158
+
159
+ ```sh
160
+ curl -sS "https://open.feishu.cn/open-apis/calendar/v4/calendars?page_size=50" \
161
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
162
+ | jq 'if .code == 0 then [.data.calendar_list[] | {calendar_id, summary, type}] else . end'
163
+ ```
164
+
165
+ List events in a time window (epoch-seconds strings):
166
+
167
+ ```sh
168
+ curl -sS "https://open.feishu.cn/open-apis/calendar/v4/calendars/CALENDAR_ID/events?start_time=1751299200&end_time=1751385600&page_size=100" \
169
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
170
+ | jq 'if .code == 0 then [.data.items[] | {summary, start: .start_time, end: .end_time, event_id}] else . end'
171
+ ```
172
+
173
+ Create an event (times are epoch-seconds strings):
174
+
175
+ ```sh
176
+ curl -sS -X POST "https://open.feishu.cn/open-apis/calendar/v4/calendars/CALENDAR_ID/events" \
177
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
178
+ -H "Content-Type: application/json" \
179
+ -d "$(jq -nc '{summary: "项目评审", start_time: {timestamp: "1751302800"}, end_time: {timestamp: "1751306400"}}')" \
180
+ | jq 'if .code == 0 then {event_id: .data.event.event_id} else . end'
181
+ ```
182
+
183
+ ### Tasks (v2)
184
+
185
+ List the user's tasks:
186
+
187
+ ```sh
188
+ curl -sS "https://open.feishu.cn/open-apis/task/v2/tasks?page_size=50" \
189
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
190
+ | jq 'if .code == 0 then [.data.items[] | {summary, completed_at, task_guid: .guid}] else . end'
191
+ ```
192
+
193
+ Create a task:
194
+
195
+ ```sh
196
+ curl -sS -X POST "https://open.feishu.cn/open-apis/task/v2/tasks" \
197
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
198
+ -H "Content-Type: application/json" \
199
+ -d "$(jq -nc '{summary: "准备周会材料"}')" \
200
+ | jq 'if .code == 0 then {task_guid: .data.task.guid} else . end'
201
+ ```
202
+
203
+ ### Wiki
204
+
205
+ List wiki spaces, then nodes within a space:
206
+
207
+ ```sh
208
+ curl -sS "https://open.feishu.cn/open-apis/wiki/v2/spaces?page_size=50" \
209
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
210
+ | jq 'if .code == 0 then [.data.items[] | {space_id, name}] else . end'
211
+
212
+ curl -sS "https://open.feishu.cn/open-apis/wiki/v2/spaces/SPACE_ID/nodes?page_size=50" \
213
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
214
+ | jq 'if .code == 0 then [.data.items[] | {title, node_token, obj_type}] else . end'
215
+ ```
216
+
217
+ ### Send an IM message
218
+
219
+ Send to a user by `open_id` (use `receive_id_type=chat_id` for a group
220
+ chat). `content` must be a JSON **string**, so it's double-encoded:
221
+
222
+ ```sh
223
+ curl -sS -X POST "https://open.feishu.cn/open-apis/im/v1/messages?receive_id_type=open_id" \
224
+ -H "Authorization: Bearer $FEISHU_TOKEN" \
225
+ -H "Content-Type: application/json" \
226
+ -d "$(jq -nc --arg rid "ou_xxx" --arg text "你好,这是助手发送的消息。" '
227
+ {receive_id: $rid, msg_type: "text", content: ({text: $text} | tostring)}')" \
228
+ | jq 'if .code == 0 then {message_id: .data.message_id} else . end'
229
+ ```
230
+
231
+ ## Notes
232
+
233
+ - Confirm destructive or outward-facing actions (sending a message,
234
+ creating a calendar invite, posting to a shared doc) with the user
235
+ before running them.
236
+ - Pagination: list endpoints return `data.page_token` / `data.has_more`;
237
+ pass `page_token=…` to fetch the next page.
238
+ - When the user pastes a Feishu link, extract the token/id from the URL
239
+ path rather than asking them for it.
@@ -0,0 +1,139 @@
1
+ ---
2
+ name: webextrator
3
+ description: Render and extract web page content via AceDataCloud's WebExtrator API. Use when scraping a page's final rendered HTML, or extracting typed structured data (Article, Product, Recipe, Video, Discussion, Job) plus clean markdown/text from any URL. Real headless Chromium with schema.org + LLM extraction.
4
+ license: Apache-2.0
5
+ metadata:
6
+ author: acedatacloud
7
+ version: "1.0"
8
+ compatibility: Requires ACEDATACLOUD_API_TOKEN in .env file (see _shared/authentication.md). Optionally pair with mcp-webextrator for tool-use.
9
+ ---
10
+
11
+ # WebExtrator Web Render & Extract
12
+
13
+ Render and extract web content through AceDataCloud's WebExtrator API — real headless Chromium plus a three-tier extraction pipeline (schema.org JSON-LD mapper → LLM typed extractor → Readability/markdown fallback).
14
+
15
+ > **Setup:** See [authentication](../_shared/authentication.md) for token setup.
16
+
17
+ ## Quick Start
18
+
19
+ ```bash
20
+ curl -X POST https://api.acedata.cloud/webextrator/extract \
21
+ -H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
22
+ -H "Content-Type: application/json" \
23
+ -d '{"url": "https://example.com", "expected_type": "general"}'
24
+ ```
25
+
26
+ Returns synchronously in seconds — no task polling needed.
27
+
28
+ ## Endpoints
29
+
30
+ | Path | Purpose |
31
+ |------|---------|
32
+ | `POST /webextrator/render` | Headless Chromium render → raw HTML + clean text + title |
33
+ | `POST /webextrator/extract` | Render + structured extraction (schema.org + LLM types) + markdown |
34
+ | `POST /webextrator/tasks` | Look up historical render/extract task envelopes (7-day retention, free) |
35
+
36
+ ## Workflows
37
+
38
+ ### 1. Extract typed content
39
+
40
+ ```json
41
+ POST /webextrator/extract
42
+ {
43
+ "url": "https://example.com",
44
+ "expected_type": "general"
45
+ }
46
+ ```
47
+
48
+ Real response (trimmed):
49
+
50
+ ```json
51
+ {
52
+ "success": true,
53
+ "task_id": "604b1cfb-6c5a-42c9-b900-a281e1b9c3c5",
54
+ "trace_id": "f2a7c0b0-c17c-4bc9-b6e7-9c59746dd366",
55
+ "elapsed": 0.003,
56
+ "data": {
57
+ "kind": "extract",
58
+ "url": "https://example.com",
59
+ "finalUrl": "https://example.com/",
60
+ "contentType": "general",
61
+ "title": "Example Domain",
62
+ "description": "This domain is for use in documentation examples without needing permission. Avoid use in operations.",
63
+ "language": "en",
64
+ "images": [],
65
+ "links": [],
66
+ "markdown": "...",
67
+ "text": "...",
68
+ "structured": { "schemaOrg": {}, "openGraph": {}, "jsonLd": [] }
69
+ }
70
+ }
71
+ ```
72
+
73
+ ### 2. Render raw HTML
74
+
75
+ ```json
76
+ POST /webextrator/render
77
+ {
78
+ "url": "https://example.com",
79
+ "wait_until": "networkidle",
80
+ "block_resources": ["image", "media", "font"]
81
+ }
82
+ ```
83
+
84
+ Returns `data.html`, `data.text`, `data.title`, `data.status`, `data.finalUrl`.
85
+
86
+ ### 3. Look up a task
87
+
88
+ ```json
89
+ POST /webextrator/tasks
90
+ {
91
+ "action": "retrieve",
92
+ "id": "604b1cfb-6c5a-42c9-b900-a281e1b9c3c5"
93
+ }
94
+ ```
95
+
96
+ ## Parameters
97
+
98
+ ### Render & Extract (shared)
99
+
100
+ | Parameter | Required | Description |
101
+ |-----------|----------|-------------|
102
+ | `url` | Yes | Page URL to render (`http(s)://`) |
103
+ | `wait_until` | No | `load` / `domcontentloaded` / `networkidle` / `commit` (default `networkidle`) |
104
+ | `timeout` | No | Navigation timeout in seconds (default 30) |
105
+ | `delay` | No | Extra wait in seconds after `wait_until` (for SPAs) |
106
+ | `wait_for_selector` | No | CSS selector to wait for before ready |
107
+ | `block_resources` | No | Drop `image`/`font`/`media`/`stylesheet`/`xhr`/`fetch` |
108
+ | `headers` | No | Extra request headers for the target site |
109
+ | `cookies` | No | Cookies to install before navigation |
110
+ | `mode` | No | `sync` (default) or `async` (returns job id) |
111
+ | `callback_url` | No | Posted the final envelope when `mode=async` |
112
+ | `bypass_cache` | No | Skip the Redis result cache for this request |
113
+ | `cache_ttl_seconds` | No | Override cache TTL; `0` disables caching |
114
+
115
+ ### Extract-only
116
+
117
+ | Parameter | Required | Description |
118
+ |-----------|----------|-------------|
119
+ | `expected_type` | No | `product` / `article` / `general` — skips the heuristic |
120
+ | `enable_llm` | No | Allow LLM extractor when schema.org found nothing (default false) |
121
+
122
+ ### Tasks
123
+
124
+ | Parameter | Required | Description |
125
+ |-----------|----------|-------------|
126
+ | `action` | Yes | `retrieve` (single) or `retrieve_batch` (many) |
127
+ | `id` / `trace_id` | one of | For `retrieve` |
128
+ | `ids` / `trace_ids` | one of | For `retrieve_batch` |
129
+
130
+ ## Gotchas
131
+
132
+ - Parameters use **snake_case** (`wait_until`, `block_resources`), not camelCase
133
+ - Cache hits are still billed; identical URLs return in ~0.003s
134
+ - `expected_type` only allows `product`/`article`/`general` — typed kinds (recipe/video/job) are detected automatically from schema.org
135
+ - `enable_llm` has no effect when the page ships schema.org JSON-LD — the deterministic mapper wins for free
136
+ - Tasks API is free and retains records for 7 days only
137
+ - `cache_ttl_seconds: 0` means "do not cache" — use `bypass_cache` to skip read
138
+
139
+ > **MCP:** `pip install mcp-webextrator` | Hosted: `https://webextrator.mcp.acedata.cloud/mcp` | See [all MCP servers](../_shared/mcp-servers.md)