socialdatax-skills 0.2.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SocialDataX
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the
8
+ rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,257 @@
1
+ # SocialDataX Skills | 社媒数据助手 Skills
2
+
3
+ This public repository provides the unified skill installer and direct CLI helper for SocialDataX services.
4
+
5
+ The current public tools support 小红书 / Xiaohongshu / XHS / RedNote and 抖音 / Douyin read-only research workflows. The public skill layer is intentionally named by media capability so supported platforms can evolve without changing the installation model.
6
+
7
+ - direct `npx` JSON commands for agents that can run shell commands
8
+ - AgentSkills-compatible installers split by capability for OpenClaw, Hermes Agent, Codex, Claude Code, and general agent skill directories
9
+ - links to platform-specific MCP docs when a client should use MCP directly
10
+
11
+ The business implementation is privately hosted. This repository exposes only the public package, skill, and connection surface for read-only social media intelligence workflows. It is not a unified MCP server and does not include a registry server card; platform MCPs are published separately.
12
+
13
+ ## Search Aliases
14
+
15
+ Common search phrases for this skill package:
16
+
17
+ - `SocialDataX Skills`
18
+ - `social media skills`
19
+ - `AgentSkills social media`
20
+ - `OpenClaw social media skills`
21
+ - `Hermes Agent social media skills`
22
+ - `media search skill`
23
+ - `media comments skill`
24
+ - `creator profile skill`
25
+ - `Xiaohongshu skills`
26
+ - `XHS skills`
27
+ - `RedNote skills`
28
+ - `Douyin skills`
29
+ - `抖音 skills`
30
+
31
+ ## Platform MCPs
32
+
33
+ - XHS hosted MCP endpoint: `https://mcp.52choujiang.com/xhs/mcp`
34
+ - Douyin hosted MCP endpoint: `https://mcp.52choujiang.com/douyin/mcp`
35
+ - Hosted transport: `streamable-http`
36
+ - Authentication: `Authorization: Bearer <SOCIALDATAX_API_KEY>`
37
+ - Website: <https://socialdatax.com>
38
+ - XHS planned platform MCP registry name: `com.socialdatax/xhs-insights`
39
+ - XHS legacy registry name: `com.52choujiang/xhs-insights`
40
+ - Douyin planned platform MCP registry name: `com.socialdatax/douyin-insights`
41
+ - Douyin legacy registry name: `com.52choujiang/douyin-insights`
42
+ - Unified MCP registry name: none; this package installs skills and calls explicit platform services.
43
+ - Current public capability version: `0.2.0`
44
+
45
+ ## Direct CLI
46
+
47
+ For most skill users, no MCP client configuration is required. Install the skills, set `SOCIALDATAX_API_KEY`, and let the agent run the direct `npx` commands.
48
+
49
+ Examples:
50
+
51
+ ```bash
52
+ npx -y socialdatax-skills@latest xhs search --keyword "露营桌" --pretty
53
+ npx -y socialdatax-skills@latest xhs detail --note-id "<note_id>" --pretty
54
+ npx -y socialdatax-skills@latest xhs comments --note-id "<note_id>" --pretty
55
+ npx -y socialdatax-skills@latest xhs sub-comments --note-id "<note_id>" --comment-id "<comment_id>" --pretty
56
+ npx -y socialdatax-skills@latest xhs user-info --user-id "<user_id>" --pretty
57
+ npx -y socialdatax-skills@latest xhs user-posts --user-id "<user_id>" --pretty
58
+ npx -y socialdatax-skills@latest douyin search --keyword "露营桌" --pretty
59
+ npx -y socialdatax-skills@latest douyin detail --aweme-id "<aweme_id>" --pretty
60
+ npx -y socialdatax-skills@latest douyin comments --aweme-id "<aweme_id>" --pretty
61
+ npx -y socialdatax-skills@latest douyin user-info --sec-user-id "<sec_user_id>" --pretty
62
+ npx -y socialdatax-skills@latest douyin user-info --profile-url "<profile_url_or_share_text>" --pretty
63
+ npx -y socialdatax-skills@latest douyin user-posts --sec-user-id "<sec_user_id>" --pretty
64
+ npx -y socialdatax-skills@latest douyin user-posts --profile-url "<profile_url_or_share_text>" --pretty
65
+ ```
66
+
67
+ The direct CLI prints a JSON envelope with `platform`, `tool`, `arguments`, and `data`.
68
+
69
+ Douyin search filters use semantic values: `--sort-type` supports `general`,
70
+ `time_descending`, and `like_count_descending`; `--publish-time-range` supports
71
+ `all`, `day`, `week`, and `half_year`; `--duration-range` supports `all`,
72
+ `under_1_minute`, `one_to_five_minutes`, and `over_5_minutes`; `--content-type`
73
+ supports `all`, `video`, and `image`.
74
+
75
+ ### Runtime Requirements
76
+
77
+ - Recommended: Node.js 22 LTS or newer.
78
+ - Minimum: Node.js 20.18.1.
79
+ - Node.js 18 and older are not supported.
80
+
81
+ ### Environment
82
+
83
+ - `SOCIALDATAX_API_KEY`
84
+ Required for direct CLI data calls and hosted MCP calls. Local inspection commands such as `list`, `doctor`, and `install --dry-run` do not require a key.
85
+ - `SOCIAL_MEDIA_MCP_UPSTREAM_URL`
86
+ Optional generic override for the selected platform MCP endpoint.
87
+ - `SOCIAL_MEDIA_XHS_MCP_UPSTREAM_URL`
88
+ Optional XHS-specific endpoint override. Default: `https://mcp.52choujiang.com/xhs/mcp`
89
+ - `SOCIAL_MEDIA_DOUYIN_MCP_UPSTREAM_URL`
90
+ Optional Douyin-specific endpoint override. Default: `https://mcp.52choujiang.com/douyin/mcp`
91
+
92
+ ## Security & Privacy
93
+
94
+ You can inspect the package safety summary before installing:
95
+
96
+ ```bash
97
+ npx -y socialdatax-skills@latest doctor
98
+ npx -y socialdatax-skills@latest doctor --json
99
+ ```
100
+
101
+ The public package declares no npm lifecycle scripts such as `preinstall`, `install`, or `postinstall`. The installer copies AgentSkills files only, does not save API keys, and does not change MCP server configuration. Data calls are read-only, require `SOCIALDATAX_API_KEY` at runtime, and do not read local browser data.
102
+
103
+ ## Platform Names
104
+
105
+ This project is not affiliated with, endorsed by, or sponsored by Xiaohongshu, RedNote, Douyin, or their affiliates. Platform names are used only to describe supported data sources.
106
+
107
+ ### Local Source Run
108
+
109
+ ```bash
110
+ npm install
111
+ SOCIALDATAX_API_KEY="<SOCIALDATAX_API_KEY>" node cli.mjs xhs search --keyword "露营桌" --pretty
112
+ SOCIALDATAX_API_KEY="<SOCIALDATAX_API_KEY>" node cli.mjs douyin search --keyword "露营桌" --pretty
113
+ ```
114
+
115
+ ### Docker Run
116
+
117
+ ```bash
118
+ docker build -t socialdatax-skills .
119
+ docker run --rm -i -e SOCIALDATAX_API_KEY="<SOCIALDATAX_API_KEY>" socialdatax-skills xhs search --keyword "露营桌" --pretty
120
+ docker run --rm -i -e SOCIALDATAX_API_KEY="<SOCIALDATAX_API_KEY>" socialdatax-skills douyin search --keyword "露营桌" --pretty
121
+ ```
122
+
123
+ If Docker Hub is slow from your network, keep the default image unchanged for normal use and override only during local builds:
124
+
125
+ ```bash
126
+ docker build --build-arg NODE_IMAGE=mirror.gcr.io/library/node:22-alpine -t socialdatax-skills .
127
+ ```
128
+
129
+ ## Skill Installer
130
+
131
+ The npm package also ships separate skills for each major capability. Different clients can install one skill, several skills, or all skills into their expected directory:
132
+
133
+ ```bash
134
+ npx -y socialdatax-skills@latest list
135
+ npx -y socialdatax-skills@latest doctor
136
+ npx -y socialdatax-skills@latest install --target openclaw
137
+ npx -y socialdatax-skills@latest install --target openclaw --dry-run
138
+ npx -y socialdatax-skills@latest install media-search --target openclaw
139
+ npx -y socialdatax-skills@latest install media-search --target openclaw --dry-run
140
+ npx -y socialdatax-skills@latest install media-user-info --target openclaw
141
+ npx -y socialdatax-skills@latest install media-comments media-detail --target openclaw
142
+ npx -y socialdatax-skills@latest install media-search --target openclaw --scope workspace
143
+ npx -y socialdatax-skills@latest install media-search --target hermes
144
+ npx -y socialdatax-skills@latest install media-search --target hermes --scope shared
145
+ npx -y socialdatax-skills@latest install media-search --target agents
146
+ npx -y socialdatax-skills@latest install media-search --target codex
147
+ npx -y socialdatax-skills@latest install media-search --target codex --scope workspace
148
+ npx -y socialdatax-skills@latest install media-search --target claude-code
149
+ npx -y socialdatax-skills@latest install media-search --target claude-code --scope workspace
150
+ npx -y socialdatax-skills@latest xhs search --keyword "露营桌" --pretty
151
+ npx -y socialdatax-skills@latest douyin search --keyword "露营桌" --pretty
152
+ ```
153
+
154
+ Available skills:
155
+
156
+ - `media-search`: search social media content by keyword; supports XHS notes and Douyin works.
157
+ - `media-detail`: read structured content details and metrics; supports XHS notes and Douyin works.
158
+ - `media-comments`: fetch and analyze XHS comments/replies and Douyin first-level comments.
159
+ - `media-user-info`: retrieve creator profile information; supports XHS and Douyin creators.
160
+ - `media-user-posts`: retrieve creator content lists; supports XHS notes and Douyin works.
161
+
162
+ Default install locations:
163
+
164
+ - OpenClaw: `~/.openclaw/workspace/skills/<skill-name>` or `OPENCLAW_SKILLS_DIR/<skill-name>`
165
+ - OpenClaw workspace scope: `./skills/<skill-name>`
166
+ - Hermes Agent: `~/.hermes/skills/<skill-name>`
167
+ - Hermes shared scope: `~/.agents/skills/<skill-name>`
168
+ - Shared AgentSkills directory: `~/.agents/skills/<skill-name>`
169
+ - Codex: `~/.codex/skills/<skill-name>`
170
+ - Codex workspace scope: `./.codex/skills/<skill-name>`
171
+ - Claude Code: `~/.claude/skills/<skill-name>`
172
+ - Claude Code workspace scope: `./.claude/skills/<skill-name>`
173
+
174
+ If no skill name is provided, all skills are installed. If a destination already exists, re-run with `--force` to replace an existing directory for the same skill. Use `--path <directory>` to install one skill to a custom directory, or multiple skills under a custom parent directory. The `shared` scope is only meaningful for `--target hermes`; use `--target agents` for the shared AgentSkills directory directly.
175
+
176
+ ## Read-Only Scope
177
+
178
+ The current platform MCP services are designed for read-only social media intelligence workflows. They do not provide account login, posting, editing, liking, commenting, or other account actions.
179
+
180
+ Current XHS workflows include:
181
+
182
+ - Search related Xiaohongshu notes by keyword, with optional sort, note type, and publish-time filters.
183
+ - Resolve a shared note link, short link, share text, or note ID into structured note details.
184
+ - Read note details when the caller already has a note ID.
185
+ - Fetch paginated first-level comments for comment analysis.
186
+ - Fetch paginated replies under a first-level comment.
187
+ - Read creator profile data from a profile link, short link, share text, or user ID.
188
+ - Fetch paginated creator note lists from a user ID, profile link, short link, or share text for content style and account research.
189
+
190
+ Current Douyin workflows include:
191
+
192
+ - Search related Douyin works by keyword.
193
+ - Resolve a Douyin content page link, short link, share text, or aweme_id into structured work details.
194
+ - Fetch paginated first-level comments for comment analysis.
195
+ - Read creator profile data from a profile link, short link, share text, or sec_user_id.
196
+ - Fetch paginated creator work lists from a sec_user_id, profile link, short link, or share text.
197
+
198
+ ## XHS Tools
199
+
200
+ | Tool | Public purpose |
201
+ | --- | --- |
202
+ | `xhs_search_notes` | Search Xiaohongshu / 小红书 notes by keyword with optional sort, note type, and publish-time filters. |
203
+ | `xhs_get_note_detail_by_note_url` | Resolve a shared XHS link, short link, share text, or note ID into structured note details. |
204
+ | `xhs_get_note_detail_by_note_id` | Fetch structured note details when the caller already has a note ID. |
205
+ | `xhs_get_note_comments_by_note_id` | Fetch paginated first-level comments when the caller already has a note ID. |
206
+ | `xhs_get_note_comments_by_note_url` | Fetch paginated first-level comments directly from a shared note URL, short link, or share text. |
207
+ | `xhs_get_note_sub_comments_by_comment_id` | Fetch paginated replies under a first-level comment by note ID and comment ID. |
208
+ | `xhs_get_user_info_by_user_id` | Fetch creator profile data when the caller already has a user ID. |
209
+ | `xhs_get_user_info_by_profile_url` | Resolve a profile link, short link, or share text into creator profile data. |
210
+ | `xhs_get_user_posted_notes_by_user_id` | Fetch a paginated list of notes published by a creator when the caller already has a user ID. |
211
+ | `xhs_get_user_posted_notes_by_profile_url` | Fetch a paginated list of notes published by a creator from a profile link, short link, or share text. |
212
+
213
+ ## Douyin Tools
214
+
215
+ | Tool | Public purpose |
216
+ | --- | --- |
217
+ | `douyin_search_videos` | Search Douyin works by keyword with optional paging and filters. |
218
+ | `douyin_get_video_detail_by_aweme_id` | Fetch structured Douyin work details when the caller already has an aweme_id. |
219
+ | `douyin_get_video_detail_by_url` | Resolve a Douyin content page link, short link, or share text into structured Douyin work details. |
220
+ | `douyin_get_video_comments_by_aweme_id` | Fetch paginated first-level comments when the caller already has an aweme_id. |
221
+ | `douyin_get_video_comments_by_url` | Fetch paginated first-level comments directly from a Douyin content page URL, short link, or share text. |
222
+ | `douyin_get_user_info_by_sec_user_id` | Fetch creator profile data when the caller already has a sec_user_id. |
223
+ | `douyin_get_user_info_by_profile_url` | Resolve a profile link, short link, or share text into creator profile data. |
224
+ | `douyin_get_user_posted_videos_by_sec_user_id` | Fetch a paginated list of works published by a creator when the caller already has a sec_user_id. |
225
+ | `douyin_get_user_posted_videos_by_profile_url` | Fetch a paginated list of works published by a creator from a profile link, short link, or share text. |
226
+
227
+ ## Quick Start
228
+
229
+ For agents that can execute shell commands, use the direct CLI. This is the recommended default for installed skills:
230
+
231
+ ```bash
232
+ export SOCIALDATAX_API_KEY="<SOCIALDATAX_API_KEY>"
233
+ npx -y socialdatax-skills@latest xhs search --keyword "露营桌" --pretty
234
+ npx -y socialdatax-skills@latest douyin search --keyword "露营桌" --pretty
235
+ ```
236
+
237
+ MCP client configuration belongs to platform MCP listings. For XHS, use the `xhs-insights` docs; for Douyin, use the `douyin-insights` listing.
238
+
239
+ Aily is treated as an OpenClaw / AgentSkills ecosystem channel for this package. Use the OpenClaw skill install flow for now; a dedicated `--target aily` will be added only after its official skill import or package format is confirmed.
240
+
241
+ ## API Key
242
+
243
+ Request or manage API access from the product website:
244
+
245
+ <https://socialdatax.com>
246
+
247
+ Use the key as a Bearer token in the `Authorization` request header. Do not commit real API keys to code, docs, issues, or screenshots.
248
+
249
+ ## Directory Metadata
250
+
251
+ Public metadata files in this repository:
252
+
253
+ - [skills](skills): AgentSkills-compatible skills split by social media capability and currently backed by XHS and Douyin tools.
254
+
255
+ ## License
256
+
257
+ The files in this public repository are released under the MIT License. The license covers the public CLI wrapper, documentation, and skill files in this repository only. It does not cover the managed service implementation, hosted infrastructure, or any private backend code outside this repository.
Binary file