@acedatacloud/skills 2026.703.7 → 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.7",
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.