@tikomni/skills 1.0.5 → 1.0.7
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 +3 -3
- package/README.zh-CN.md +3 -3
- package/env.example +2 -2
- package/package.json +2 -2
- package/skills/social-media-crawl/SKILL.md +20 -16
- package/skills/social-media-crawl/agents/openai.yaml +2 -2
- package/skills/social-media-crawl/references/api-catalog/aliases.json +237 -0
- package/skills/social-media-crawl/references/api-catalog/capabilities.json +362 -0
- package/skills/social-media-crawl/references/api-catalog/metadata.json +11 -0
- package/skills/social-media-crawl/references/api-catalog/operations.json +100875 -0
- package/skills/social-media-crawl/references/api-catalog/overrides.json +10 -0
- package/skills/social-media-crawl/references/api-catalog/platforms.json +463 -0
- package/skills/social-media-crawl/references/api-routing-contract.md +73 -0
- package/skills/social-media-crawl/references/contracts/output-envelope.md +1 -1
- package/skills/social-media-crawl/scripts/core/api_catalog.py +104 -0
- package/skills/social-media-crawl/scripts/core/call_tikomni_api.py +269 -0
- package/skills/social-media-crawl/scripts/core/config_loader.py +0 -2
- package/skills/social-media-crawl/scripts/core/resolve_api_endpoint.py +176 -0
- package/skills/social-media-crawl/scripts/pipelines/run_douyin_single_work.py +16 -17
- package/skills/social-media-crawl/scripts/pipelines/run_xiaohongshu_single_work.py +16 -16
- package/skills/social-media-crawl/scripts/run_task.py +96 -0
- package/skills/social-media-crawl/tests/test_api_only_routing.py +130 -0
- package/skills/social-media-crawl/tests/test_fixed_pipeline_fallback.py +50 -0
- package/skills/social-media-crawl/references/guides/generic-mcp-objects.md +0 -40
- package/skills/social-media-crawl/references/mcp-usage-contract.md +0 -40
- package/skills/social-media-crawl/scripts/core/mcp_dispatch.py +0 -161
package/README.md
CHANGED
|
@@ -67,7 +67,7 @@ The npm package currently exposes:
|
|
|
67
67
|
|
|
68
68
|
| Skill | Role |
|
|
69
69
|
| --- | --- |
|
|
70
|
-
| `social-media-crawl` |
|
|
70
|
+
| `social-media-crawl` | TikOmni API-only social-media retrieval, fixed pipelines, ASR support, and fact-card persistence |
|
|
71
71
|
|
|
72
72
|
## 30-Second Quick Start
|
|
73
73
|
|
|
@@ -214,8 +214,8 @@ Once configured, you can trigger tasks in natural language, for example:
|
|
|
214
214
|
- "Extract the structured fields and primary text from this Douyin video."
|
|
215
215
|
- "Fetch this Xiaohongshu note and write a fact card."
|
|
216
216
|
- "Collect works from this creator home and persist them into the author archive."
|
|
217
|
-
- "
|
|
218
|
-
- "
|
|
217
|
+
- "Fetch a comment thread through TikOmni API and return normalized JSON."
|
|
218
|
+
- "Fetch search or ranking results through TikOmni API and keep the output structured."
|
|
219
219
|
|
|
220
220
|
## Versioning and Releases
|
|
221
221
|
|
package/README.zh-CN.md
CHANGED
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
| Skill | 作用 |
|
|
69
69
|
| --- | --- |
|
|
70
|
-
| `social-media-crawl` |
|
|
70
|
+
| `social-media-crawl` | TikOmni API-only 社媒数据获取、固定 pipeline、ASR 支持和事实卡入库 |
|
|
71
71
|
|
|
72
72
|
## 30 秒快速开始
|
|
73
73
|
|
|
@@ -214,8 +214,8 @@ TIKOMNI_CARD_ROOT="/absolute/path/to/tikomni-cards"
|
|
|
214
214
|
- “提取这个抖音视频的结构化字段和主文本。”
|
|
215
215
|
- “抓取这个小红书作品并写入事实卡。”
|
|
216
216
|
- “抓取这个主页的作品并持续入库到作者目录。”
|
|
217
|
-
- “通过 TikOmni
|
|
218
|
-
- “通过 TikOmni
|
|
217
|
+
- “通过 TikOmni API 获取这个评论线程并输出标准 JSON。”
|
|
218
|
+
- “通过 TikOmni API 获取搜索或榜单结果,并保持结构化返回。”
|
|
219
219
|
|
|
220
220
|
## 版本与发布
|
|
221
221
|
|
package/env.example
CHANGED
|
@@ -52,8 +52,8 @@ TIKOMNI_TIMEOUT_RETRY_MAX="3"
|
|
|
52
52
|
# [EN] Base backoff for timeout retries in milliseconds. Default: 300
|
|
53
53
|
TIKOMNI_TIMEOUT_RETRY_BACKOFF_MS="300"
|
|
54
54
|
|
|
55
|
-
# [ZH] 自定义 HTTP User-Agent
|
|
56
|
-
# [EN] Custom HTTP User-Agent. Default: built-in
|
|
55
|
+
# [ZH] 自定义 HTTP User-Agent。默认值:内置标准 HTTP UA。通常不需要修改。
|
|
56
|
+
# [EN] Custom HTTP User-Agent. Default: built-in standard HTTP UA. Usually no need to change.
|
|
57
57
|
# TIKOMNI_HTTP_USER_AGENT="Mozilla/5.0 ..."
|
|
58
58
|
|
|
59
59
|
# [ZH] 自定义 Accept-Language 请求头。默认值:zh-CN,zh;q=0.9,en;q=0.8
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tikomni/skills",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "TikOmni skill installer CLI for structured social media crawling in Codex, Claude Code, and OpenClaw",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://github.com/mark-ly-wang/TikOmni-Skills#readme",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"node": ">=18"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
|
-
"test": "node --test",
|
|
30
|
+
"test": "node --test && python3 -m unittest discover -s skills/social-media-crawl/tests -p 'test_*.py'",
|
|
31
31
|
"pack:dry-run": "npm pack --dry-run"
|
|
32
32
|
},
|
|
33
33
|
"publishConfig": {
|
|
@@ -1,45 +1,49 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: social-media-crawl
|
|
3
|
-
description: Use this skill when the user asks
|
|
3
|
+
description: Use this skill when the user asks to fetch social-media data through TikOmni API, including links, posts, creator homepages, comments, search results, rankings, livestreams, products, subtitles, transcripts, or structured fields; also trigger on 抓取 / 采集 / 获取 / 主页 / 评论 / 搜索 / 榜单 / 直播 / 商品 / 社交媒体.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Social Media Crawl
|
|
7
7
|
|
|
8
8
|
## When To Use
|
|
9
9
|
|
|
10
|
-
- Use this skill when the user needs
|
|
10
|
+
- Use this skill when the user needs TikOmni API data for a social-media object such as a work link, post, thread, long-form post, creator homepage, comment section, search result, ranking page, livestream room, or product page.
|
|
11
11
|
- Use this skill when the input is a share short link, work URL, post URL, thread URL, homepage URL, platform ID, keyword, or entry page.
|
|
12
|
-
- Route social-media retrieval requests through this skill first.
|
|
12
|
+
- Route social-media retrieval requests through this skill first and call TikOmni API only.
|
|
13
13
|
|
|
14
14
|
## Supported Platforms
|
|
15
15
|
|
|
16
16
|
- The currently supported platforms include Douyin, Xiaohongshu, Kuaishou, Bilibili, Weibo, TikTok, YouTube, Instagram, Threads, Twitter/X, Reddit, LinkedIn, WeChat Channels, Official Accounts, Toutiao, Xigua, Zhihu, Lemon8, and Pipixia.
|
|
17
17
|
- Only four fixed pipelines are currently frozen: Douyin single work, Douyin creator home, Xiaohongshu single work, and Xiaohongshu creator home.
|
|
18
|
-
- All other supported platform and object combinations should use the
|
|
18
|
+
- All other supported platform and object combinations should use the API-only resolver and caller bundled with this skill.
|
|
19
19
|
- See the official documentation for the full platform catalog and update policy: https://docs.tikomni.com
|
|
20
20
|
|
|
21
21
|
## What To Help With
|
|
22
22
|
|
|
23
|
-
- Detect the platform and object type.
|
|
23
|
+
- Detect the platform, capability, and object type.
|
|
24
|
+
- Resolve a TikOmni API `endpoint_id` before making any request.
|
|
25
|
+
- Show the recommended endpoint and available API alternatives.
|
|
24
26
|
- Prefer single work, single post, thread, creator homepage, and content collection tasks.
|
|
25
27
|
- Collect factual fields, platform text, subtitles, or transcript text.
|
|
26
28
|
- Return structured JSON and write fact cards when required.
|
|
27
29
|
|
|
28
30
|
## Preferred Routing
|
|
29
31
|
|
|
30
|
-
- Route all social-media objects into this skill first
|
|
32
|
+
- Route all social-media objects into this skill first.
|
|
33
|
+
- Do not construct TikOmni API paths manually.
|
|
34
|
+
- Do not pass arbitrary `path` or `method` values to API callers.
|
|
31
35
|
- If the object is one of the following four cases, prefer the fixed pipeline:
|
|
32
36
|
1. Douyin single work
|
|
33
37
|
2. Xiaohongshu single work
|
|
34
38
|
3. Douyin creator home
|
|
35
39
|
4. Xiaohongshu creator home
|
|
36
|
-
- If no fixed pipeline matches,
|
|
37
|
-
-
|
|
40
|
+
- If no fixed pipeline matches, run `scripts/core/resolve_api_endpoint.py` first, then call `scripts/core/call_tikomni_api.py` with the returned `endpoint_id`.
|
|
41
|
+
- For common deterministic tasks, prefer `scripts/run_task.py`.
|
|
42
|
+
- If the resolver cannot determine a platform or capability, return a structured clarification request instead of guessing an endpoint.
|
|
38
43
|
|
|
39
44
|
## Working Style
|
|
40
45
|
|
|
41
|
-
- Detect the platform and object type first, then choose between a fixed pipeline and
|
|
42
|
-
- Treat browser/CDP as a fallback, not the default option.
|
|
46
|
+
- Detect the platform and object type first, then choose between a fixed pipeline and API-only resolver/caller.
|
|
43
47
|
- Prioritize factual fields and avoid subjective analysis.
|
|
44
48
|
- Prefer native subtitles for video text; use ASR only when subtitles are unavailable.
|
|
45
49
|
- Default to structured JSON plus Markdown and persist outputs proactively.
|
|
@@ -57,16 +61,16 @@ description: Use this skill when the user asks about social media links, posts,
|
|
|
57
61
|
|
|
58
62
|
1. Detect the platform and object type.
|
|
59
63
|
2. If a fixed pipeline matches, run the fixed script directly.
|
|
60
|
-
3. If no fixed pipeline matches,
|
|
61
|
-
4.
|
|
62
|
-
5.
|
|
63
|
-
6.
|
|
64
|
+
3. If no fixed pipeline matches, resolve platform + capability to an `endpoint_id` with `scripts/core/resolve_api_endpoint.py`.
|
|
65
|
+
4. Call TikOmni API with `scripts/core/call_tikomni_api.py`; never pass arbitrary API paths.
|
|
66
|
+
5. If video text is required, use U2 ASR; use U3 media upload only to support video-to-text when media URLs are not directly usable.
|
|
67
|
+
6. Normalize the result into a structured payload.
|
|
68
|
+
7. If the object is a work, write `work_fact_card`.
|
|
64
69
|
|
|
65
70
|
## References
|
|
66
71
|
|
|
67
|
-
-
|
|
72
|
+
- API routing contract: `references/api-routing-contract.md`
|
|
68
73
|
- Output envelope: `references/contracts/output-envelope.md`
|
|
69
74
|
- Work fact card fields: `references/contracts/work-fact-card-fields.md`
|
|
70
|
-
- Generic MCP object guide: `references/guides/generic-mcp-objects.md`
|
|
71
75
|
- U2/U3 rules: `references/service-guides/u2-u3-mandatory-fallback.md`
|
|
72
76
|
- Fixed pipeline guides: `references/pipelines/`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Social Media Crawl"
|
|
3
|
-
short_description: "
|
|
4
|
-
default_prompt: "Use $social-media-crawl to fetch, transcribe, normalize, and archive social-media objects
|
|
3
|
+
short_description: "TikOmni API-only social-media retrieval, transcription, and archival"
|
|
4
|
+
default_prompt: "Use $social-media-crawl to fetch, transcribe, normalize, and archive social-media objects through TikOmni API. Supported platforms include Douyin, Xiaohongshu, Kuaishou, Bilibili, Weibo, TikTok, YouTube, Instagram, Threads, Twitter/X, Reddit, LinkedIn, WeChat Channels, WeChat Official Accounts, Toutiao, Xigua, Zhihu, Lemon8, and Pipixia. Resolve an endpoint_id before calling TikOmni API; use fixed pipelines for Douyin/Xiaohongshu single-work and creator-home requests."
|
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
{
|
|
2
|
+
"capabilities": {
|
|
3
|
+
"article_detail": [
|
|
4
|
+
"article",
|
|
5
|
+
"article_detail",
|
|
6
|
+
"公众号文章",
|
|
7
|
+
"文章内容",
|
|
8
|
+
"文章详情"
|
|
9
|
+
],
|
|
10
|
+
"article_list": [
|
|
11
|
+
"article_list",
|
|
12
|
+
"文章列表"
|
|
13
|
+
],
|
|
14
|
+
"article_url": [
|
|
15
|
+
"article_url",
|
|
16
|
+
"公众号链接",
|
|
17
|
+
"文章链接"
|
|
18
|
+
],
|
|
19
|
+
"comments": [
|
|
20
|
+
"comment",
|
|
21
|
+
"comments",
|
|
22
|
+
"评论",
|
|
23
|
+
"评论列表"
|
|
24
|
+
],
|
|
25
|
+
"general": [
|
|
26
|
+
"general"
|
|
27
|
+
],
|
|
28
|
+
"hot_search": [
|
|
29
|
+
"hot search",
|
|
30
|
+
"hot words",
|
|
31
|
+
"hot_search",
|
|
32
|
+
"热搜",
|
|
33
|
+
"热榜"
|
|
34
|
+
],
|
|
35
|
+
"livestream": [
|
|
36
|
+
"live",
|
|
37
|
+
"livestream",
|
|
38
|
+
"直播"
|
|
39
|
+
],
|
|
40
|
+
"media_upload": [
|
|
41
|
+
"media_upload",
|
|
42
|
+
"upload",
|
|
43
|
+
"上传",
|
|
44
|
+
"媒体中转"
|
|
45
|
+
],
|
|
46
|
+
"music": [
|
|
47
|
+
"music",
|
|
48
|
+
"音乐"
|
|
49
|
+
],
|
|
50
|
+
"note_detail": [
|
|
51
|
+
"note",
|
|
52
|
+
"note_detail",
|
|
53
|
+
"小红书笔记",
|
|
54
|
+
"笔记",
|
|
55
|
+
"笔记详情"
|
|
56
|
+
],
|
|
57
|
+
"product_detail": [
|
|
58
|
+
"goods",
|
|
59
|
+
"product",
|
|
60
|
+
"product_detail",
|
|
61
|
+
"商品",
|
|
62
|
+
"商品详情"
|
|
63
|
+
],
|
|
64
|
+
"ranking": [
|
|
65
|
+
"rank",
|
|
66
|
+
"ranking",
|
|
67
|
+
"排行",
|
|
68
|
+
"榜单"
|
|
69
|
+
],
|
|
70
|
+
"search": [
|
|
71
|
+
"search",
|
|
72
|
+
"搜索",
|
|
73
|
+
"检索"
|
|
74
|
+
],
|
|
75
|
+
"transcription": [
|
|
76
|
+
"asr",
|
|
77
|
+
"transcription",
|
|
78
|
+
"字幕",
|
|
79
|
+
"语音识别",
|
|
80
|
+
"转写",
|
|
81
|
+
"转文案"
|
|
82
|
+
],
|
|
83
|
+
"user_posts": [
|
|
84
|
+
"posts",
|
|
85
|
+
"user_posts",
|
|
86
|
+
"主页作品",
|
|
87
|
+
"作品列表"
|
|
88
|
+
],
|
|
89
|
+
"user_profile": [
|
|
90
|
+
"author",
|
|
91
|
+
"creator",
|
|
92
|
+
"profile",
|
|
93
|
+
"user_profile",
|
|
94
|
+
"主页",
|
|
95
|
+
"用户信息"
|
|
96
|
+
],
|
|
97
|
+
"video_detail": [
|
|
98
|
+
"video",
|
|
99
|
+
"video_detail",
|
|
100
|
+
"作品详情",
|
|
101
|
+
"单个视频",
|
|
102
|
+
"视频详情"
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"platforms": {
|
|
106
|
+
"bilibili": [
|
|
107
|
+
"b23.tv",
|
|
108
|
+
"bilibili",
|
|
109
|
+
"b站",
|
|
110
|
+
"哔哩哔哩"
|
|
111
|
+
],
|
|
112
|
+
"demo": [
|
|
113
|
+
"demo"
|
|
114
|
+
],
|
|
115
|
+
"douyin": [
|
|
116
|
+
"douyin",
|
|
117
|
+
"dy",
|
|
118
|
+
"iesdouyin.com",
|
|
119
|
+
"v.douyin.com",
|
|
120
|
+
"抖音"
|
|
121
|
+
],
|
|
122
|
+
"douyin_search": [
|
|
123
|
+
"douyin_search"
|
|
124
|
+
],
|
|
125
|
+
"health": [
|
|
126
|
+
"health"
|
|
127
|
+
],
|
|
128
|
+
"hybrid": [
|
|
129
|
+
"hybrid"
|
|
130
|
+
],
|
|
131
|
+
"instagram": [
|
|
132
|
+
"ig",
|
|
133
|
+
"ins",
|
|
134
|
+
"instagram"
|
|
135
|
+
],
|
|
136
|
+
"ios_shortcut": [
|
|
137
|
+
"ios_shortcut"
|
|
138
|
+
],
|
|
139
|
+
"kuaishou": [
|
|
140
|
+
"ks",
|
|
141
|
+
"kuaishou",
|
|
142
|
+
"快手"
|
|
143
|
+
],
|
|
144
|
+
"lemon8": [
|
|
145
|
+
"lemon8"
|
|
146
|
+
],
|
|
147
|
+
"linkedin": [
|
|
148
|
+
"linkedin",
|
|
149
|
+
"领英"
|
|
150
|
+
],
|
|
151
|
+
"pipixia": [
|
|
152
|
+
"pipixia",
|
|
153
|
+
"皮皮虾"
|
|
154
|
+
],
|
|
155
|
+
"reddit": [
|
|
156
|
+
"reddit"
|
|
157
|
+
],
|
|
158
|
+
"sora2": [
|
|
159
|
+
"sora2"
|
|
160
|
+
],
|
|
161
|
+
"temp_mail": [
|
|
162
|
+
"temp_mail"
|
|
163
|
+
],
|
|
164
|
+
"threads": [
|
|
165
|
+
"threads"
|
|
166
|
+
],
|
|
167
|
+
"tiktok": [
|
|
168
|
+
"tik tok",
|
|
169
|
+
"tiktok"
|
|
170
|
+
],
|
|
171
|
+
"toutiao": [
|
|
172
|
+
"toutiao",
|
|
173
|
+
"今日头条",
|
|
174
|
+
"头条"
|
|
175
|
+
],
|
|
176
|
+
"twitter": [
|
|
177
|
+
"twitter",
|
|
178
|
+
"x",
|
|
179
|
+
"x.com",
|
|
180
|
+
"推特"
|
|
181
|
+
],
|
|
182
|
+
"u2": [
|
|
183
|
+
"asr",
|
|
184
|
+
"transcription",
|
|
185
|
+
"u2",
|
|
186
|
+
"语音转写",
|
|
187
|
+
"转文案"
|
|
188
|
+
],
|
|
189
|
+
"u3": [
|
|
190
|
+
"media upload",
|
|
191
|
+
"u3",
|
|
192
|
+
"upload",
|
|
193
|
+
"中转",
|
|
194
|
+
"媒体上传"
|
|
195
|
+
],
|
|
196
|
+
"wechat": [
|
|
197
|
+
"wechat"
|
|
198
|
+
],
|
|
199
|
+
"wechat_channels": [
|
|
200
|
+
"wechat channels",
|
|
201
|
+
"wechat_channels",
|
|
202
|
+
"微信视频号",
|
|
203
|
+
"视频号"
|
|
204
|
+
],
|
|
205
|
+
"wechat_mp": [
|
|
206
|
+
"mp.weixin.qq.com",
|
|
207
|
+
"wechat official accounts",
|
|
208
|
+
"wechat_mp",
|
|
209
|
+
"公众号",
|
|
210
|
+
"微信公众号"
|
|
211
|
+
],
|
|
212
|
+
"weibo": [
|
|
213
|
+
"weibo",
|
|
214
|
+
"微博"
|
|
215
|
+
],
|
|
216
|
+
"xiaohongshu": [
|
|
217
|
+
"xhs",
|
|
218
|
+
"xhslink.com",
|
|
219
|
+
"xiaohongshu",
|
|
220
|
+
"xiaohongshu.com",
|
|
221
|
+
"小红书"
|
|
222
|
+
],
|
|
223
|
+
"xigua": [
|
|
224
|
+
"xigua",
|
|
225
|
+
"西瓜视频"
|
|
226
|
+
],
|
|
227
|
+
"youtube": [
|
|
228
|
+
"youtu.be",
|
|
229
|
+
"youtube",
|
|
230
|
+
"yt"
|
|
231
|
+
],
|
|
232
|
+
"zhihu": [
|
|
233
|
+
"zhihu",
|
|
234
|
+
"知乎"
|
|
235
|
+
]
|
|
236
|
+
}
|
|
237
|
+
}
|