socialdatax-skills 0.2.15 → 0.2.16
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 +8 -3
- package/cli.mjs +49 -6
- package/package.json +1 -1
- package/skills/media-comments/SKILL.md +1 -1
- package/skills/media-detail/SKILL.md +1 -1
- package/skills/media-search/SKILL.md +1 -1
- package/skills/media-transcript/SKILL.md +1 -1
- package/skills/media-user-info/SKILL.md +1 -1
- package/skills/media-user-posts/SKILL.md +1 -1
- package/skills/sensitive-check/SKILL.md +6 -2
- package/skills/socialdatax-content-research-assistant/SKILL.md +1 -1
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ Common search phrases for this skill package:
|
|
|
68
68
|
- Sensitive Check MCP server name: `sensitive-check`
|
|
69
69
|
- Sensitive Check future MCP registry name: `com.socialdatax/sensitive-check`
|
|
70
70
|
- Unified MCP registry name: none; this package installs skills and calls explicit platform services.
|
|
71
|
-
- Current public capability version: `0.2.
|
|
71
|
+
- Current public capability version: `0.2.16`
|
|
72
72
|
|
|
73
73
|
## Direct CLI
|
|
74
74
|
|
|
@@ -139,9 +139,10 @@ npx -y socialdatax-skills@latest wechat user-info --user-id "<finder_user_id>" -
|
|
|
139
139
|
npx -y socialdatax-skills@latest wechat user-posts --user-id "<finder_user_id>" --pretty
|
|
140
140
|
npx -y socialdatax-skills@latest wechat user-posts --url "<wechat_video_url_or_share_text>" --pretty
|
|
141
141
|
npx -y socialdatax-skills@latest sensitive-check text --text "<content>" --platform xhs --pretty
|
|
142
|
+
cat draft.txt | npx -y socialdatax-skills@latest sensitive-check text --text-stdin --platform xhs --pretty
|
|
142
143
|
```
|
|
143
144
|
|
|
144
|
-
Most direct CLI commands print a JSON envelope with `platform`, `tool`, `arguments`, and `data`. `sensitive-check` prints `platform`, `tool`, and `data` only; it does not echo the original text in CLI output.
|
|
145
|
+
Most direct CLI commands print a JSON envelope with `platform`, `tool`, `arguments`, and `data`. `sensitive-check` prints `platform`, `tool`, and `data` only; it does not echo the original text in CLI output. SocialDataX service records the submitted text and structured detection result for history, billing, and troubleshooting; the local CLI does not write API keys to local files or write local text copies.
|
|
145
146
|
|
|
146
147
|
For XHS outputs with a returned `note_url` field, when `note_url` is non-null, preserve it exactly as the full URL, including `xsec_token` query parameters, such as in final answers or display. Do not modify, truncate, redact, normalize, rebuild, or replace it with a link assembled from `note_id`. If `note_url` is null, do not synthesize a public link from `note_id`.
|
|
147
148
|
|
|
@@ -193,7 +194,7 @@ npx -y socialdatax-skills@latest doctor
|
|
|
193
194
|
npx -y socialdatax-skills@latest doctor --json
|
|
194
195
|
```
|
|
195
196
|
|
|
196
|
-
The public package declares no npm lifecycle scripts such as `preinstall`, `install`, or `postinstall`. The installer copies AgentSkills files only, does not
|
|
197
|
+
The public package declares no npm lifecycle scripts such as `preinstall`, `install`, or `postinstall`. The installer copies AgentSkills files only, does not write API keys to local files, and does not change MCP server configuration. Authenticated data calls require `SOCIALDATAX_API_KEY` at runtime, do not read local browser data, and do not perform account actions.
|
|
197
198
|
|
|
198
199
|
## Platform Names
|
|
199
200
|
|
|
@@ -263,6 +264,7 @@ npx -y socialdatax-skills@latest weibo search --keyword "露营" --pretty
|
|
|
263
264
|
npx -y socialdatax-skills@latest wechat hot-search --pretty
|
|
264
265
|
npx -y socialdatax-skills@latest wechat search --keyword "露营" --pretty
|
|
265
266
|
npx -y socialdatax-skills@latest sensitive-check text --text "<content>" --platform xhs --pretty
|
|
267
|
+
cat draft.txt | npx -y socialdatax-skills@latest sensitive-check text --text-stdin --platform xhs --pretty
|
|
266
268
|
```
|
|
267
269
|
|
|
268
270
|
Available skills:
|
|
@@ -359,8 +361,10 @@ Current WeChat Channels / 视频号 workflows include:
|
|
|
359
361
|
Current Sensitive Check workflows include:
|
|
360
362
|
|
|
361
363
|
- Check draft text for 敏感检测 / sensitive-content risks before publishing.
|
|
364
|
+
- Pass short drafts with `--text`, or pipe longer/sensitive drafts through `--text-stdin` so the text is not placed directly in the shell command.
|
|
362
365
|
- Choose a platform context with `--platform generic`, `--platform xhs`, `--platform douyin`, or `--platform kuaishou`.
|
|
363
366
|
- Return structured fields such as `violation`, `risk_level`, `types`, `highlights`, `summary`, `platform`, and `suggestions` when available.
|
|
367
|
+
- SocialDataX service records submitted text and structured detection results for history, billing, and troubleshooting; the local CLI does not write API keys to local files or write local text copies.
|
|
364
368
|
- Text checks are read-only. Image sensitive detection is reserved for a future separate tool.
|
|
365
369
|
|
|
366
370
|
## XHS Tools
|
|
@@ -481,6 +485,7 @@ npx -y socialdatax-skills@latest kuaishou search --keyword "露营" --pretty
|
|
|
481
485
|
npx -y socialdatax-skills@latest weibo search --keyword "露营" --pretty
|
|
482
486
|
npx -y socialdatax-skills@latest wechat search --keyword "露营" --pretty
|
|
483
487
|
npx -y socialdatax-skills@latest sensitive-check text --text "<content>" --platform xhs --pretty
|
|
488
|
+
cat draft.txt | npx -y socialdatax-skills@latest sensitive-check text --text-stdin --platform xhs --pretty
|
|
484
489
|
```
|
|
485
490
|
|
|
486
491
|
MCP client configuration belongs to platform or capability MCP listings. For XHS, use the `xhs-insights` docs; for Douyin, use the `douyin-insights` listing; for Kuaishou, use the `kuaishou-insights` listing; for Weibo, use the `weibo-insights` listing; for WeChat Channels / 视频号, use the `wechat-channels-insights` listing; for 敏感检测, use the `sensitive-check` server.
|
package/cli.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { dirname, join, resolve } from "node:path";
|
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
|
|
9
9
|
const PACKAGE_NAME = "socialdatax-skills";
|
|
10
|
-
const PACKAGE_VERSION = "0.2.
|
|
10
|
+
const PACKAGE_VERSION = "0.2.16";
|
|
11
11
|
const PACKAGE_SPEC = `${PACKAGE_NAME}@latest`;
|
|
12
12
|
const LOG_PREFIX = `[${PACKAGE_NAME}]`;
|
|
13
13
|
const MIN_NODE_VERSION = "20.18.1";
|
|
@@ -73,8 +73,14 @@ const BOOLEAN_OPTIONS = new Set([
|
|
|
73
73
|
"includeReplies",
|
|
74
74
|
"json",
|
|
75
75
|
"pretty",
|
|
76
|
+
"textStdin",
|
|
77
|
+
]);
|
|
78
|
+
const DIRECT_BOOLEAN_OPTIONS = new Set([
|
|
79
|
+
"all",
|
|
80
|
+
"includeReplies",
|
|
81
|
+
"pretty",
|
|
82
|
+
"textStdin",
|
|
76
83
|
]);
|
|
77
|
-
const DIRECT_BOOLEAN_OPTIONS = new Set(["all", "includeReplies", "pretty"]);
|
|
78
84
|
const INSTALL_TARGETS = ["openclaw", "hermes", "agents", "codex", "claude-code", "claude"];
|
|
79
85
|
const VALID_SCOPES = ["user", "workspace", "shared"];
|
|
80
86
|
const XHS_DIRECT_ACTION_OPTIONS = {
|
|
@@ -413,7 +419,7 @@ const WECHAT_OPTION_DISPLAY_NAMES = {
|
|
|
413
419
|
userId: "--user-id",
|
|
414
420
|
};
|
|
415
421
|
const SENSITIVE_CHECK_DIRECT_ACTION_OPTIONS = {
|
|
416
|
-
text: ["text", "platform", "pretty"],
|
|
422
|
+
text: ["text", "textStdin", "platform", "pretty"],
|
|
417
423
|
};
|
|
418
424
|
const SENSITIVE_CHECK_DIRECT_ACTION_NAMES = Object.keys(
|
|
419
425
|
SENSITIVE_CHECK_DIRECT_ACTION_OPTIONS
|
|
@@ -421,6 +427,7 @@ const SENSITIVE_CHECK_DIRECT_ACTION_NAMES = Object.keys(
|
|
|
421
427
|
const SENSITIVE_CHECK_PLATFORMS = ["generic", "xhs", "douyin", "kuaishou"];
|
|
422
428
|
const SENSITIVE_CHECK_OPTION_DISPLAY_NAMES = {
|
|
423
429
|
text: "--text",
|
|
430
|
+
textStdin: "--text-stdin",
|
|
424
431
|
platform: "--platform",
|
|
425
432
|
};
|
|
426
433
|
const PLATFORMS = {
|
|
@@ -1063,6 +1070,7 @@ function validateSensitiveCheckDirectActionOptions(action, options) {
|
|
|
1063
1070
|
|
|
1064
1071
|
validateKnownOptions(options, allowedOptions);
|
|
1065
1072
|
validateFlagOption(options, "pretty", "--pretty");
|
|
1073
|
+
validateFlagOption(options, "textStdin", "--text-stdin");
|
|
1066
1074
|
for (const key of allowedOptions) {
|
|
1067
1075
|
if (!DIRECT_BOOLEAN_OPTIONS.has(key)) {
|
|
1068
1076
|
requireOptionValue(options, key, SENSITIVE_CHECK_OPTION_DISPLAY_NAMES[key]);
|
|
@@ -1569,7 +1577,7 @@ function printDoctor(args) {
|
|
|
1569
1577
|
console.log("Install safety:");
|
|
1570
1578
|
console.log("- npm lifecycle scripts: none declared by this package.");
|
|
1571
1579
|
console.log("- install writes AgentSkills files only.");
|
|
1572
|
-
console.log("- install does not
|
|
1580
|
+
console.log("- install does not write API keys to local files.");
|
|
1573
1581
|
console.log("- install does not change MCP server configuration.");
|
|
1574
1582
|
console.log("- install --dry-run previews destinations without writing files.");
|
|
1575
1583
|
console.log("");
|
|
@@ -1868,6 +1876,8 @@ function printHelp() {
|
|
|
1868
1876
|
console.log(" --sec-user-id <sec_user_id>");
|
|
1869
1877
|
console.log(" --text <content>");
|
|
1870
1878
|
console.log(" Text content for sensitive-check text.");
|
|
1879
|
+
console.log(" --text-stdin");
|
|
1880
|
+
console.log(" Read sensitive-check text from stdin instead of a shell argument.");
|
|
1871
1881
|
console.log(" --platform <generic|xhs|douyin|kuaishou>");
|
|
1872
1882
|
console.log(" Target platform for sensitive-check text; default is generic.");
|
|
1873
1883
|
console.log(" --pages <number>");
|
|
@@ -2089,7 +2099,8 @@ async function runSensitiveCheckDirectCommand(args) {
|
|
|
2089
2099
|
}
|
|
2090
2100
|
validateSensitiveCheckDirectActionOptions(action, options);
|
|
2091
2101
|
|
|
2092
|
-
const
|
|
2102
|
+
const resolvedOptions = await resolveSensitiveCheckDirectOptions(action, options);
|
|
2103
|
+
const operation = buildSensitiveCheckOperation(action, resolvedOptions);
|
|
2093
2104
|
const data = await callDirectOperation(operation);
|
|
2094
2105
|
const envelope = {
|
|
2095
2106
|
platform: operation.platform.id,
|
|
@@ -2100,6 +2111,38 @@ async function runSensitiveCheckDirectCommand(args) {
|
|
|
2100
2111
|
process.stdout.write("\n");
|
|
2101
2112
|
}
|
|
2102
2113
|
|
|
2114
|
+
async function resolveSensitiveCheckDirectOptions(action, options) {
|
|
2115
|
+
if (action !== "text") {
|
|
2116
|
+
return options;
|
|
2117
|
+
}
|
|
2118
|
+
if (options.text !== undefined && options.textStdin !== undefined) {
|
|
2119
|
+
throw new Error("Use only one of --text or --text-stdin for sensitive-check text.");
|
|
2120
|
+
}
|
|
2121
|
+
if (options.textStdin === undefined) {
|
|
2122
|
+
return options;
|
|
2123
|
+
}
|
|
2124
|
+
const text = await readStdinText();
|
|
2125
|
+
if (!text.trim()) {
|
|
2126
|
+
throw new Error("Missing stdin text for --text-stdin.");
|
|
2127
|
+
}
|
|
2128
|
+
return {
|
|
2129
|
+
...options,
|
|
2130
|
+
text,
|
|
2131
|
+
};
|
|
2132
|
+
}
|
|
2133
|
+
|
|
2134
|
+
async function readStdinText() {
|
|
2135
|
+
if (process.stdin.isTTY) {
|
|
2136
|
+
return "";
|
|
2137
|
+
}
|
|
2138
|
+
process.stdin.setEncoding("utf8");
|
|
2139
|
+
let text = "";
|
|
2140
|
+
for await (const chunk of process.stdin) {
|
|
2141
|
+
text += chunk;
|
|
2142
|
+
}
|
|
2143
|
+
return text;
|
|
2144
|
+
}
|
|
2145
|
+
|
|
2103
2146
|
function buildXhsOperation(action, options) {
|
|
2104
2147
|
switch (action) {
|
|
2105
2148
|
case "hot-search":
|
|
@@ -2857,7 +2900,7 @@ function buildWechatSearchCall(options) {
|
|
|
2857
2900
|
}
|
|
2858
2901
|
|
|
2859
2902
|
function buildSensitiveCheckTextCall(options) {
|
|
2860
|
-
if (!options.text) {
|
|
2903
|
+
if (typeof options.text !== "string" || !options.text.trim()) {
|
|
2861
2904
|
throw new Error("Missing --text for sensitive-check text.");
|
|
2862
2905
|
}
|
|
2863
2906
|
const platform = parseAllowedStringOption(
|
package/package.json
CHANGED
|
@@ -88,7 +88,7 @@ The command prints JSON with `platform`, `tool`, `arguments`, and `data`. Multi-
|
|
|
88
88
|
|
|
89
89
|
## Safety Boundary
|
|
90
90
|
|
|
91
|
-
This skill is read-only. It does not read local browser data, does not
|
|
91
|
+
This skill is read-only. It does not read local browser data, does not perform login, posting, liking, commenting, or account changes. The local CLI and installer do not write API keys to local files. Prefer the direct CLI; hosted MCP tools are optional when the current agent already supports authenticated streamable HTTP MCP.
|
|
92
92
|
|
|
93
93
|
## MCP Tools
|
|
94
94
|
|
|
@@ -73,7 +73,7 @@ The command prints JSON with `platform`, `tool`, `arguments`, and `data`.
|
|
|
73
73
|
|
|
74
74
|
## Safety Boundary
|
|
75
75
|
|
|
76
|
-
This skill is read-only. It does not read local browser data, does not
|
|
76
|
+
This skill is read-only. It does not read local browser data, does not perform login, posting, liking, commenting, or account changes. The local CLI and installer do not write API keys to local files. Prefer the direct CLI; hosted MCP tools are optional when the current agent already supports authenticated streamable HTTP MCP.
|
|
77
77
|
|
|
78
78
|
## MCP Tools
|
|
79
79
|
|
|
@@ -149,7 +149,7 @@ Weibo and WeChat Channels search pagination:
|
|
|
149
149
|
|
|
150
150
|
## Safety Boundary
|
|
151
151
|
|
|
152
|
-
This skill is read-only. It does not read local browser data, does not
|
|
152
|
+
This skill is read-only. It does not read local browser data, does not perform login, posting, liking, commenting, or account changes. The local CLI and installer do not write API keys to local files. Prefer the direct CLI; hosted MCP tools are optional when the current agent already supports authenticated streamable HTTP MCP.
|
|
153
153
|
|
|
154
154
|
## MCP Tools
|
|
155
155
|
|
|
@@ -47,7 +47,7 @@ Submit tools may wait briefly after creating the job. If the transcript is not r
|
|
|
47
47
|
|
|
48
48
|
## Safety Boundary
|
|
49
49
|
|
|
50
|
-
This skill can submit bounded analysis jobs through hosted MCP tools. It does not read local browser data
|
|
50
|
+
This skill can submit bounded analysis jobs through hosted MCP tools. It does not read local browser data and does not perform login, posting, liking, commenting, or account changes. The local skill installer does not write API keys to local files. Use hosted MCP tools only when the current agent already supports authenticated streamable HTTP MCP.
|
|
51
51
|
|
|
52
52
|
## MCP Tools
|
|
53
53
|
|
|
@@ -76,7 +76,7 @@ The command prints JSON with `platform`, `tool`, `arguments`, and `data`.
|
|
|
76
76
|
|
|
77
77
|
## Safety Boundary
|
|
78
78
|
|
|
79
|
-
This skill is read-only. It does not read local browser data, does not
|
|
79
|
+
This skill is read-only. It does not read local browser data, does not perform login, posting, liking, commenting, or account changes. The local CLI and installer do not write API keys to local files. Prefer the direct CLI; hosted MCP tools are optional when the current agent already supports authenticated streamable HTTP MCP.
|
|
80
80
|
|
|
81
81
|
## MCP Tools
|
|
82
82
|
|
|
@@ -89,7 +89,7 @@ For recent creator research, prefer CLI `--since-days 30` or another user-specif
|
|
|
89
89
|
|
|
90
90
|
## Safety Boundary
|
|
91
91
|
|
|
92
|
-
This skill is read-only. It does not read local browser data, does not
|
|
92
|
+
This skill is read-only. It does not read local browser data, does not perform login, posting, liking, commenting, or account changes. The local CLI and installer do not write API keys to local files. Prefer the direct CLI; hosted MCP tools are optional when the current agent already supports authenticated streamable HTTP MCP.
|
|
93
93
|
|
|
94
94
|
## MCP Tools
|
|
95
95
|
|
|
@@ -42,20 +42,24 @@ npx -y socialdatax-skills@latest sensitive-check text --text "<content>" --platf
|
|
|
42
42
|
|
|
43
43
|
Required arguments:
|
|
44
44
|
|
|
45
|
-
- `sensitive-check text --text <content
|
|
45
|
+
- `sensitive-check text --text <content>` or `sensitive-check text --text-stdin`: required text to check. Use `--text` for short drafts, or pipe longer/sensitive drafts through `--text-stdin` so the text is not placed directly in the shell command.
|
|
46
46
|
|
|
47
47
|
Optional arguments:
|
|
48
48
|
|
|
49
|
+
- `--text-stdin`: read text from stdin instead of `--text`; do not pass both.
|
|
49
50
|
- `--platform <generic|xhs|douyin|kuaishou>`: platform context; default is `generic`.
|
|
50
51
|
- `--pretty`: output formatting only.
|
|
51
52
|
|
|
52
53
|
Use this skill when the user wants 敏感检测, sensitive check, content safety review, or platform-aware preflight review for draft text.
|
|
54
|
+
For longer drafts, prefer `cat draft.txt | npx -y socialdatax-skills@latest sensitive-check text --text-stdin --pretty` so the full text is not placed in shell history.
|
|
55
|
+
Service note: SocialDataX service records the submitted text and structured detection result for history, billing, and troubleshooting; the local CLI does not write API keys to local files or write local text copies.
|
|
56
|
+
服务端会保存提交文本和结构化检测结果,用于历史记录、计费和问题排查;本地 CLI 不会把 API Key 写入本地文件,也不会写本地文本副本。
|
|
53
57
|
The command prints JSON with `platform`, `tool`, and `data`; it does not echo the original text back in CLI arguments. The service returns `violation`, `risk_level`, `types`, `highlights`, `summary`, `platform`, and `suggestions` when available.
|
|
54
58
|
This v1 skill checks text only. Image sensitive detection is intentionally out of scope until a separate image tool is published.
|
|
55
59
|
|
|
56
60
|
## Safety Boundary
|
|
57
61
|
|
|
58
|
-
This skill is read-only. It does not read local browser data, does not
|
|
62
|
+
This skill is read-only. It does not read local browser data, does not perform login, posting, liking, commenting, or account changes. The local CLI and installer do not write API keys to local files. Prefer the direct CLI; hosted MCP tools are optional when the current agent already supports authenticated streamable HTTP MCP.
|
|
59
63
|
|
|
60
64
|
## MCP Tools
|
|
61
65
|
|
|
@@ -191,7 +191,7 @@ When the user asks for recent content, pass CLI `--since-days <n>` with bounded
|
|
|
191
191
|
|
|
192
192
|
## Safety Boundary
|
|
193
193
|
|
|
194
|
-
This skill is read-only. It does not read local browser data, does not
|
|
194
|
+
This skill is read-only. It does not read local browser data, does not perform login, posting, liking, commenting, or account changes. The local CLI and installer do not write API keys to local files. Prefer the direct CLI; hosted MCP tools are optional when the current agent already supports authenticated streamable HTTP MCP.
|
|
195
195
|
|
|
196
196
|
## MCP Tools
|
|
197
197
|
|