@acedatacloud/skills 2026.703.6 → 2026.703.8

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.703.6",
3
+ "version": "2026.703.8",
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,110 @@
1
+ ---
2
+ name: tgstat
3
+ description: Search Telegram channels/chats and pull audience + engagement stats (subscribers, reach, ER/ERR) from TGStat via its Stat API. Use when the user wants to find Telegram channels to advertise in (esp. Russian-language / RU market), research competitor channels, or check a channel's reach/engagement before buying an ad placement.
4
+ when_to_use: |
5
+ Trigger when the user wants to discover Telegram channels by keyword /
6
+ category / country / language, inspect a specific channel's subscriber
7
+ count, average post reach and engagement (ER / ERR) to judge ad value,
8
+ or check their TGStat API quota. This is a marketing-research /
9
+ ad-channel-selection tool — it does NOT post to Telegram (use the
10
+ `telegram` connector for reading/sending messages).
11
+ connections: [tgstat]
12
+ allowed_tools: [Bash]
13
+ license: Apache-2.0
14
+ metadata:
15
+ author: acedatacloud
16
+ version: "1.0"
17
+ ---
18
+
19
+ Call the **TGStat Stat API** with `curl + jq`. The user's token is in
20
+ `$TGSTAT_TOKEN` and is passed as the `token` query parameter on every request.
21
+ Base URL: `https://api.tgstat.ru`.
22
+
23
+ Responses are JSON shaped `{"status":"ok","response": ...}`. Errors come back as
24
+ `{"status":"error","error":"<message>"}` — show the `error` verbatim. An invalid
25
+ token or an inactive/expired API plan will surface here; tell the user to check
26
+ their token / plan in the TGStat 个人中心 and re-connect the connector.
27
+
28
+ **Always confirm the token + remaining quota first** (`usage/stat` is free and
29
+ does not count against tariff quota):
30
+
31
+ ```bash
32
+ curl -sS "https://api.tgstat.ru/usage/stat?token=$TGSTAT_TOKEN" \
33
+ | jq '.status, (.response[]? | {serviceKey, title, spentChannels, spentRequests, expiredAt})'
34
+ ```
35
+
36
+ ## Find channels to advertise in (the main workflow)
37
+
38
+ `GET /channels/search` — at least one of `q` (keyword, min 3 chars) or
39
+ `category` is required.
40
+
41
+ Params: `q`, `category`, `country`, `language` (default `russian`),
42
+ `peer_type` (`channel` | `chat` | `all`, default `channel`),
43
+ `search_by_description` (`0`/`1`), `limit` (max 100).
44
+
45
+ ```bash
46
+ # Russian-language AI/ChatGPT channels, biggest first.
47
+ curl -sS "https://api.tgstat.ru/channels/search" \
48
+ --data-urlencode "token=$TGSTAT_TOKEN" \
49
+ --data-urlencode "q=нейросети" \
50
+ --data-urlencode "language=russian" \
51
+ --data-urlencode "peer_type=channel" \
52
+ --data-urlencode "limit=50" -G \
53
+ | jq '.response.items | sort_by(-.participants_count)
54
+ | .[] | {username, title, subs: .participants_count, ci_index, link}'
55
+ ```
56
+
57
+ - Use `--data-urlencode ... -G` so Cyrillic / spaces in `q` are encoded correctly.
58
+ - `ci_index` (индекс цитирования) is TGStat's citation/authority score — higher =
59
+ more reposted/mentioned elsewhere, a useful quality signal beyond raw subs.
60
+ - Try several keywords (`ChatGPT`, `нейросети`, `AI`, `разработка`, `API`) and
61
+ merge results; TGStat matches title/username (add `search_by_description=1` to
62
+ also match the channel description).
63
+
64
+ ## Judge a channel's ad value
65
+
66
+ `GET /channels/stat?channelId=<@username | t.me/username | tgstat id>` returns
67
+ the numbers that actually matter for ad pricing:
68
+
69
+ ```bash
70
+ curl -sS "https://api.tgstat.ru/channels/stat?token=$TGSTAT_TOKEN&channelId=@durov" \
71
+ | jq '.response | {
72
+ subs: .participants_count,
73
+ avg_post_reach, # средний охват публикации
74
+ adv_reach_24h: .adv_post_reach_24h, # рекламный охват за 24ч — key for CPM
75
+ er_percent, err_percent, err24_percent,
76
+ daily_reach, ci_index, posts_count
77
+ }'
78
+ ```
79
+
80
+ - For **ad CPM estimation** use `adv_post_reach_24h` (average *advertising* reach
81
+ of a post over 24h), not raw subscriber count — subs are vanity, reach is what
82
+ the ad actually gets seen by.
83
+ - Low `err_percent` / `err24_percent` relative to subs = inflated/dead audience →
84
+ skip it.
85
+ - For a **chat** (not channel) the response instead has `dau`/`wau`/`mau` and
86
+ `messages_count_*` fields.
87
+
88
+ `GET /channels/get?channelId=...` returns descriptive info (title, about,
89
+ `category`, `country`, `language`, `participants_count`, `ci_index`) when you
90
+ just need to identify/verify a channel rather than full stats.
91
+
92
+ ## Reference data
93
+
94
+ `GET /database/categories?token=$TGSTAT_TOKEN` lists valid `category` values you
95
+ can pass to `channels/search`. There are also `/database/countries` and
96
+ `/database/languages`. (See the docs for the full parameter/response shape.)
97
+
98
+ ## Gotchas
99
+
100
+ - **Plan gating:** `channels/search` needs a **Stat API tariff S or higher**;
101
+ `channels/stat` / `channels/get` work on all Stat tariffs. If a call returns an
102
+ access error, the user's plan doesn't cover that method.
103
+ - **Quota:** each unique channel and each request counts against the monthly
104
+ tariff (visible via `usage/stat`). Don't loop over hundreds of channels
105
+ blindly — search, shortlist, then `stat` only the shortlist.
106
+ - **`q` min length is 3 chars** → `{"error":"param q is too short"}`.
107
+ - **Cyrillic:** always send `q` via `--data-urlencode` (or pre-URL-encode) so the
108
+ keyword isn't mangled.
109
+ - TGStat is a Russian service; the API and billing are RU-side — availability and
110
+ payment are the account owner's responsibility.
@@ -0,0 +1,143 @@
1
+ ---
2
+ name: wordpress
3
+ description: Publish and manage posts on a self-hosted WordPress site via the WordPress REST API. Use when the user mentions WordPress, wp-admin, publishing / updating a blog post, managing categories or tags, or uploading media to their own WordPress site.
4
+ when_to_use: |
5
+ Trigger when the user wants to do anything with their self-hosted
6
+ WordPress site: turn a chat conversation into a published or draft
7
+ post, update an existing post, list recent posts, create / list
8
+ categories and tags, or upload a media file for use inside a post.
9
+ This skill is for self-hosted WordPress (Application Password auth),
10
+ not WordPress.com.
11
+ connections: [wordpress]
12
+ allowed_tools: [Bash]
13
+ license: Apache-2.0
14
+ metadata:
15
+ author: acedatacloud
16
+ version: "1.0"
17
+ ---
18
+
19
+ Drive the **WordPress REST API** (`/wp-json/wp/v2`) with `curl + jq`.
20
+
21
+ The user's self-hosted WordPress credentials are injected as env vars:
22
+
23
+ - `$WORDPRESS_SITE_URL` — site root, e.g. `https://blog.example.com`
24
+ - `$WORDPRESS_USERNAME` — the WordPress login username
25
+ - `$WORDPRESS_APP_PASSWORD` — an **Application Password** (WP 5.6+ core), NOT the
26
+ login password. Treat it like a secret — **never log or echo it.**
27
+
28
+ Auth is HTTP Basic (`username:app_password`) over HTTPS. Set up a reusable base
29
+ once, then every call reuses it:
30
+
31
+ ```bash
32
+ # Normalize the site URL (strip a trailing slash) and build the API base.
33
+ SITE="${WORDPRESS_SITE_URL%/}"
34
+ API="$SITE/wp-json/wp/v2"
35
+ # -u sends HTTP Basic auth; --fail-with-body surfaces the JSON error body on 4xx/5xx.
36
+ WP=(curl -sS --fail-with-body -u "$WORDPRESS_USERNAME:$WORDPRESS_APP_PASSWORD")
37
+ ```
38
+
39
+ Errors come back as `{"code": "...", "message": "...", "data": {"status": 401}}` —
40
+ show `message` verbatim. Common codes:
41
+
42
+ | HTTP | Meaning | What to tell the user |
43
+ |------|---------|-----------------------|
44
+ | 401 | `incorrect_password` / bad Basic auth | Application Password wrong or revoked → regenerate it and reconnect the WordPress connector |
45
+ | 403 | `rest_cannot_create` / insufficient role | The user's role can't publish; needs Author/Editor/Admin, or Application Passwords are disabled on the site |
46
+ | 404 | `rest_no_route` | REST API disabled or a security plugin blocks `/wp-json` → the user must re-enable it |
47
+ | 400 | `rest_invalid_param` | Bad field (e.g. unknown category id) → fix and retry |
48
+
49
+ > **`content` is HTML, not Markdown.** Convert Markdown to HTML first
50
+ > (`pandoc -f markdown -t html`, or a simple converter). Raw Markdown renders literally.
51
+
52
+ ## Step 0 — verify the connection first
53
+
54
+ ```bash
55
+ "${WP[@]}" "$API/users/me" | jq '{id, name, slug, roles: (.roles // [])}'
56
+ ```
57
+
58
+ A 200 with your user object confirms the site URL, username, and Application
59
+ Password all work. If this fails, stop and surface the error — don't attempt writes.
60
+
61
+ ## Publish or draft a post
62
+
63
+ **Publishing is public and hard to undo — confirm with the user before using
64
+ `status=publish`.** Default to `status=draft` and hand back the edit link.
65
+
66
+ ```bash
67
+ jq -n --arg t "国内如何稳定调用 Claude API" \
68
+ --arg c "<p>正文 HTML……</p>" \
69
+ --arg s "draft" \
70
+ '{title:$t, content:$c, status:$s}' \
71
+ | "${WP[@]}" -X POST "$API/posts" \
72
+ -H "Content-Type: application/json" -d @- \
73
+ | jq '{id, status, link, edit: "\(env.WORDPRESS_SITE_URL)/wp-admin/post.php?action=edit&post=\(.id)"}'
74
+ ```
75
+
76
+ With categories / tags / excerpt (ids come from the endpoints below):
77
+
78
+ ```bash
79
+ jq -n --arg t "标题" --arg c "<p>正文</p>" --arg e "一句话摘要" \
80
+ '{title:$t, content:$c, excerpt:$e, status:"draft",
81
+ categories:[5], tags:[12,34]}' \
82
+ | "${WP[@]}" -X POST "$API/posts" -H "Content-Type: application/json" -d @- \
83
+ | jq '{id, status, link}'
84
+ ```
85
+
86
+ - Publish an existing draft: `POST $API/posts/<id>` body `{"status":"publish"}`.
87
+ - Update a post: `POST $API/posts/<id>` with any subset of fields (WP REST uses
88
+ POST, not PUT, for updates).
89
+ - Delete (trash) a post: `"${WP[@]}" -X DELETE "$API/posts/<id>"`.
90
+
91
+ ## List / read posts
92
+
93
+ ```bash
94
+ "${WP[@]}" "$API/posts?per_page=10&status=publish,draft&_fields=id,title,status,link,date" \
95
+ | jq '.[] | {id, title: .title.rendered, status, link, date}'
96
+ ```
97
+
98
+ Paginate with `&page=2`; the total page count is in the `X-WP-TotalPages`
99
+ response header (add `-D -` to see headers).
100
+
101
+ ## Categories & tags (get or create ids)
102
+
103
+ ```bash
104
+ # List existing
105
+ "${WP[@]}" "$API/categories?per_page=100&_fields=id,name,slug" | jq '.[] | {id, name}'
106
+ "${WP[@]}" "$API/tags?per_page=100&_fields=id,name,slug" | jq '.[] | {id, name}'
107
+
108
+ # Create one (returns its id)
109
+ jq -n --arg n "AI 教程" '{name:$n}' \
110
+ | "${WP[@]}" -X POST "$API/categories" -H "Content-Type: application/json" -d @- \
111
+ | jq '{id, name}'
112
+ ```
113
+
114
+ Creating a term that already exists returns
115
+ `{"code":"term_exists", ... "data":{"status":400,"term_id":<id>}}` — reuse
116
+ `.data.term_id` instead of failing.
117
+
118
+ ## Upload media (featured image / in-body image)
119
+
120
+ ```bash
121
+ FILE="./cover.png"
122
+ NAME="$(basename "$FILE")"
123
+ MEDIA_ID=$("${WP[@]}" -X POST "$API/media" \
124
+ -H "Content-Disposition: attachment; filename=\"$NAME\"" \
125
+ -H "Content-Type: image/png" \
126
+ --data-binary @"$FILE" | jq -r '.id')
127
+ echo "media id=$MEDIA_ID"
128
+ # Attach as the post's featured image:
129
+ # add "featured_media": <MEDIA_ID> to the post body.
130
+ ```
131
+
132
+ ## Gotchas
133
+
134
+ - **HTTPS + Application Passwords are required.** On plain `http://`, WordPress
135
+ disables Application Passwords → every call 401s. Tell the user to enable HTTPS.
136
+ - **A security plugin / host may block `/wp-json`** (Wordfence, "disable REST
137
+ API" plugins, some managed hosts). Symptom: 404 `rest_no_route` or an HTML
138
+ login page instead of JSON. The user must allow REST API access.
139
+ - **The Application Password contains spaces** (e.g. `abcd efgh ijkl mnop`).
140
+ Keep them — `curl -u` handles the spaces fine; don't strip them.
141
+ - **Never publish silently.** Even if the user says "post it", prefer creating a
142
+ draft and returning the `wp-admin` edit link unless they explicitly asked to
143
+ go live.