socialdatax-skills 0.2.43 → 0.2.45
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 +20 -6
- package/cli.mjs +61 -6
- package/package.json +1 -1
- package/skills/media-comments/SKILL.md +3 -2
- package/skills/media-detail/SKILL.md +36 -23
- package/skills/media-detail/agents/openai.yaml +1 -1
package/README.md
CHANGED
|
@@ -89,7 +89,18 @@ Common search phrases for this skill package:
|
|
|
89
89
|
- Reserved future SocialDataX namespace names for existing platform listings without draft files yet: `com.socialdatax/kuaishou-insights`, `com.socialdatax/bilibili-insights`, `com.socialdatax/weibo-insights`, `com.socialdatax/wechat-channels-insights`, `com.socialdatax/zhihu-insights`, `com.socialdatax/instagram-insights`, `com.socialdatax/x-insights`, `com.socialdatax/youtube-insights`, and `com.socialdatax/tiktok-insights`.
|
|
90
90
|
- Hosted endpoint without a repo-tracked standalone listing: Sensitive Words Check.
|
|
91
91
|
- Unified MCP registry name: none; this package installs skills and calls explicit hosted MCP entries.
|
|
92
|
-
- Current public capability version: `0.2.
|
|
92
|
+
- Current public capability version: `0.2.45`
|
|
93
|
+
|
|
94
|
+
## XHS 蒲公英 / Pugongying commercial note details
|
|
95
|
+
|
|
96
|
+
Version `0.2.45` adds `xhs pgy-detail` and the matching `media-detail` Skill routing:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
npx -y socialdatax-skills@latest xhs pgy-detail --note-id "<note_id>" --pretty
|
|
100
|
+
npx -y socialdatax-skills@latest xhs pgy-detail --url "<note_url_or_share_text>" --pretty
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Configure `SOCIALDATAX_API_KEY` before running these commands. Choose exactly one input: the complete note ID, or the original note URL, short link or share text. Each successful call costs **20 points**; failed calls are not charged. Use this route for requested 蒲公英 commercial details. Ordinary `xhs detail` stays on the public note-detail route and does not automatically switch to commercial data. Only notes from creators enrolled in 蒲公英 are eligible. When MCP structured code is `pgy_commercial_data_unavailable` (HTTP numeric code `1009`), the product treats this explicit no-commercial-data outcome as not enrolled: "该笔记所属博主未入驻蒲公英,无法查询蒲公英数据。本次查询失败,不扣费。" Use the structured code, not message text or internal reason_code, to identify this outcome. The CLI exits with status 1 and writes a JSON object containing only `code` and `message` to stderr for this outcome; stdout remains empty. Other errors retain their existing output format. Stop without retrying the other ID/URL route. Timeouts, service outages, authentication errors, insufficient balance, invalid inputs and unexplained empty responses retain their actual error or unresolved status; do not label them as not enrolled.
|
|
93
104
|
|
|
94
105
|
## Direct CLI
|
|
95
106
|
|
|
@@ -169,6 +180,7 @@ npx -y socialdatax-skills@latest weibo search --keyword "露营" --pretty
|
|
|
169
180
|
npx -y socialdatax-skills@latest weibo detail --post-id "<post_id>" --pretty
|
|
170
181
|
npx -y socialdatax-skills@latest weibo detail --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
171
182
|
npx -y socialdatax-skills@latest weibo comments --post-id "<post_id>" --pretty
|
|
183
|
+
npx -y socialdatax-skills@latest weibo comments --post-id "<post_id>" --sort-type time_descending --pretty
|
|
172
184
|
npx -y socialdatax-skills@latest weibo comments --post-id "<post_id>" --all --include-replies --pretty
|
|
173
185
|
npx -y socialdatax-skills@latest weibo comments --post-url "<weibo_post_url_or_share_text>" --pretty
|
|
174
186
|
npx -y socialdatax-skills@latest weibo replies --post-id "<post_id>" --comment-id "<comment_id>" --pretty
|
|
@@ -278,7 +290,7 @@ YouTube reply pagination starts from the returned first-level comment `reply_tok
|
|
|
278
290
|
XHS comments accept optional `--sort-type` values: `default`,
|
|
279
291
|
`time_descending`, and `like_count_descending`; omit it for the platform
|
|
280
292
|
default comment order.
|
|
281
|
-
Bilibili and YouTube comments accept optional `--sort-type` values: `hot` and
|
|
293
|
+
Bilibili, Weibo, and YouTube comments accept optional `--sort-type` values: `hot` and
|
|
282
294
|
`time_descending`; Zhihu comments accept `default` and `time_descending`.
|
|
283
295
|
Omit comment sort values for the platform default order.
|
|
284
296
|
|
|
@@ -444,7 +456,7 @@ Available skills:
|
|
|
444
456
|
|
|
445
457
|
- `socialdatax-content-research-assistant`: combine SocialDataX search, detail, comment, creator profile, and creator content workflows for cross-platform content research across XHS, Douyin, Kuaishou, Bilibili, Weibo, WeChat Channels, Zhihu, Instagram, X / Twitter, YouTube, and TikTok; also reads WeChat Official Account article link details.
|
|
446
458
|
- `media-search`: search social media content by keyword; supports XHS notes, Douyin works, Kuaishou works, Bilibili videos/articles, Weibo posts, WeChat Channels videos, Zhihu content, Instagram posts, X / Twitter posts, YouTube videos, and TikTok posts.
|
|
447
|
-
- `media-detail`:
|
|
459
|
+
- `media-detail`: supports requested XHS 蒲公英 / Pugongying commercial note details (20 points per successful call; failures are not charged). Read WeChat Official Account article details and body text from article links. Read structured content details and metrics for XHS notes, Douyin works, Kuaishou works, Bilibili content, Weibo posts, WeChat Channels videos and image posts, Zhihu content, Instagram posts, X / Twitter posts, YouTube videos, and TikTok posts.
|
|
448
460
|
- `media-comments`: fetch and analyze comments/replies for XHS, Douyin, Kuaishou, Bilibili, Weibo, WeChat Channels, Zhihu, Instagram, X / Twitter, YouTube, and TikTok.
|
|
449
461
|
- `media-transcript`: submit and check video 口播转文字 / speech-to-text transcript jobs; supports XHS, Douyin, Kuaishou, Weibo, and WeChat Channels through direct CLI commands or hosted MCP tools, plus Bilibili, Zhihu independent videos and video answers, Instagram regular video posts/Reels, X / Twitter video posts, TikTok, and YouTube through hosted MCP tools. Instagram photo and carousel posts and Zhihu plain answers without video are not processable.
|
|
450
462
|
- `media-user-info`: retrieve creator profile information; supports XHS, Douyin, Kuaishou, Bilibili, Weibo, WeChat Channels, Zhihu, Instagram, X / Twitter, YouTube channels, and TikTok creators.
|
|
@@ -530,7 +542,7 @@ Current Weibo workflows include:
|
|
|
530
542
|
- Fetch the current Weibo / 微博 hot-search list.
|
|
531
543
|
- Search related Weibo posts by keyword.
|
|
532
544
|
- Resolve a Weibo post URL, short link, share text, or post_id into structured post details.
|
|
533
|
-
- Fetch paginated first-level comments for comment analysis
|
|
545
|
+
- Fetch paginated first-level comments for comment analysis, optionally sorted by `hot` or `time_descending`.
|
|
534
546
|
- Fetch paginated replies under a first-level comment.
|
|
535
547
|
- Continue Weibo list pagination only when `next_page_token` is non-empty; an empty string means there are no more results to request.
|
|
536
548
|
- Read Weibo creator profile data from a user profile link or user_id.
|
|
@@ -618,6 +630,8 @@ Current Sensitive Words Check workflows include:
|
|
|
618
630
|
| `xhs_search_notes` | Search Xiaohongshu / 小红书 notes by keyword with optional sort, note type, and publish-time filters. |
|
|
619
631
|
| `xhs_get_note_detail_by_note_url` | Resolve a shared XHS link, short link, or share text into structured note details. |
|
|
620
632
|
| `xhs_get_note_detail_by_note_id` | Fetch structured note details when the caller already has a note ID. |
|
|
633
|
+
| `xhs_pgy_get_note_detail_by_note_id` | Read 蒲公英 commercial note details by full note ID; 20 points per successful call, failures are not charged. |
|
|
634
|
+
| `xhs_pgy_get_note_detail_by_note_url` | Read 蒲公英 commercial note details from a note URL, short link or share text; 20 points per successful call, failures are not charged. |
|
|
621
635
|
| `xhs_get_note_comments_by_note_id` | Fetch paginated first-level comments when the caller already has a note ID; accepts optional comment `sort_type`. |
|
|
622
636
|
| `xhs_get_note_comments_by_note_url` | Fetch paginated first-level comments directly from a shared note URL, short link, or share text; accepts optional comment `sort_type`. |
|
|
623
637
|
| `xhs_get_note_sub_comments_by_comment_id` | Fetch paginated replies under a first-level comment by note ID and comment ID. |
|
|
@@ -706,8 +720,8 @@ Current Sensitive Words Check workflows include:
|
|
|
706
720
|
| `weibo_search_posts` | Search Weibo posts by keyword with optional `page_token` continuation; do not pass `page`. |
|
|
707
721
|
| `weibo_get_post_detail_by_post_id` | Fetch structured Weibo post details when the caller already has a post_id. |
|
|
708
722
|
| `weibo_get_post_detail_by_post_url` | Resolve a Weibo post URL, short link, or share text into structured post details. |
|
|
709
|
-
| `weibo_get_post_comments_by_post_id` | Fetch paginated first-level comments
|
|
710
|
-
| `weibo_get_post_comments_by_post_url` | Fetch paginated first-level comments
|
|
723
|
+
| `weibo_get_post_comments_by_post_id` | Fetch paginated first-level comments by post_id with optional `sort_type` (`hot` or `time_descending`). |
|
|
724
|
+
| `weibo_get_post_comments_by_post_url` | Fetch paginated first-level comments from a Weibo post URL, short link, or share text with optional `sort_type` (`hot` or `time_descending`). |
|
|
711
725
|
| `weibo_get_post_comment_replies_by_comment_id` | Fetch paginated replies under a first-level comment by post_id and comment_id. |
|
|
712
726
|
| `weibo_get_post_liker_list_by_post_id` | Fetch paginated users who liked a Weibo post by post_id. |
|
|
713
727
|
| `weibo_get_post_liker_list_by_post_url` | Fetch paginated users who liked a Weibo post from a post page link, short link, or share text. |
|
package/cli.mjs
CHANGED
|
@@ -22,7 +22,7 @@ import { decryptWechatMediaCommand } from "./lib/media/wechat-decrypt.mjs";
|
|
|
22
22
|
export { decryptWechatMediaCommand };
|
|
23
23
|
|
|
24
24
|
const PACKAGE_NAME = "socialdatax-skills";
|
|
25
|
-
const PACKAGE_VERSION = "0.2.
|
|
25
|
+
const PACKAGE_VERSION = "0.2.45";
|
|
26
26
|
const PACKAGE_SPEC = `${PACKAGE_NAME}@latest`;
|
|
27
27
|
const LOG_PREFIX = `[${PACKAGE_NAME}]`;
|
|
28
28
|
const MIN_NODE_VERSION = "20.18.1";
|
|
@@ -71,7 +71,7 @@ const AVAILABLE_SKILLS = [
|
|
|
71
71
|
{
|
|
72
72
|
name: "media-detail",
|
|
73
73
|
summary:
|
|
74
|
-
"Read WeChat Official Account article details and body text. Read structured content details and metrics for XHS, Douyin, Kuaishou, Bilibili, Weibo, WeChat Channels, Zhihu, Instagram, X / Twitter, YouTube, and TikTok.",
|
|
74
|
+
"Read WeChat Official Account article details and body text. Read structured content details and metrics for XHS, Douyin, Kuaishou, Bilibili, Weibo, WeChat Channels, Zhihu, Instagram, X / Twitter, YouTube, and TikTok. Supports requested XHS 蒲公英 / Pugongying commercial note details.",
|
|
75
75
|
emoji: "📄",
|
|
76
76
|
},
|
|
77
77
|
{
|
|
@@ -139,6 +139,7 @@ const XHS_DIRECT_ACTION_OPTIONS = {
|
|
|
139
139
|
"pretty",
|
|
140
140
|
],
|
|
141
141
|
detail: ["noteId", "url", "pretty"],
|
|
142
|
+
"pgy-detail": ["noteId", "url", "pretty"],
|
|
142
143
|
comments: [
|
|
143
144
|
"noteId",
|
|
144
145
|
"url",
|
|
@@ -702,6 +703,7 @@ const WEIBO_DIRECT_ACTION_OPTIONS = {
|
|
|
702
703
|
"all",
|
|
703
704
|
"maxItems",
|
|
704
705
|
"includeReplies",
|
|
706
|
+
"sortType",
|
|
705
707
|
"pretty",
|
|
706
708
|
],
|
|
707
709
|
replies: [
|
|
@@ -739,6 +741,7 @@ const WEIBO_OPTION_DISPLAY_NAMES = {
|
|
|
739
741
|
sinceDays: "--since-days",
|
|
740
742
|
all: "--all",
|
|
741
743
|
includeReplies: "--include-replies",
|
|
744
|
+
sortType: "--sort-type",
|
|
742
745
|
postId: "--post-id",
|
|
743
746
|
postUrl: "--post-url",
|
|
744
747
|
commentId: "--comment-id",
|
|
@@ -751,6 +754,7 @@ const WEIBO_OPTION_DISPLAY_NAMES = {
|
|
|
751
754
|
outputDir: "--output-dir",
|
|
752
755
|
proxy: "--proxy",
|
|
753
756
|
};
|
|
757
|
+
const WEIBO_COMMENT_SORT_TYPES = ["hot", "time_descending"];
|
|
754
758
|
const WECHAT_DIRECT_ACTION_OPTIONS = {
|
|
755
759
|
"hot-search": ["pretty"],
|
|
756
760
|
search: [
|
|
@@ -895,6 +899,16 @@ const PLATFORMS = {
|
|
|
895
899
|
name: "xhs_get_note_detail_by_note_id",
|
|
896
900
|
description: "Fetch structured note details by note ID.",
|
|
897
901
|
},
|
|
902
|
+
{
|
|
903
|
+
name: "xhs_pgy_get_note_detail_by_note_id",
|
|
904
|
+
description:
|
|
905
|
+
"Read XHS 蒲公英 / Pugongying commercial note details by full note ID; 20 points per successful call, failures are not charged.",
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
name: "xhs_pgy_get_note_detail_by_note_url",
|
|
909
|
+
description:
|
|
910
|
+
"Read XHS 蒲公英 / Pugongying commercial note details from a note URL, short link or share text; 20 points per successful call, failures are not charged.",
|
|
911
|
+
},
|
|
898
912
|
{
|
|
899
913
|
name: "xhs_get_note_comments_by_note_id",
|
|
900
914
|
description:
|
|
@@ -1251,11 +1265,13 @@ const PLATFORMS = {
|
|
|
1251
1265
|
},
|
|
1252
1266
|
{
|
|
1253
1267
|
name: "weibo_get_post_comments_by_post_id",
|
|
1254
|
-
description:
|
|
1268
|
+
description:
|
|
1269
|
+
"Fetch paginated first-level comments by post_id with optional hot or newest-first sorting.",
|
|
1255
1270
|
},
|
|
1256
1271
|
{
|
|
1257
1272
|
name: "weibo_get_post_comments_by_post_url",
|
|
1258
|
-
description:
|
|
1273
|
+
description:
|
|
1274
|
+
"Fetch paginated first-level comments from a Weibo post URL, short link, or share text with optional hot or newest-first sorting.",
|
|
1259
1275
|
},
|
|
1260
1276
|
{
|
|
1261
1277
|
name: "weibo_get_post_comment_replies_by_comment_id",
|
|
@@ -1777,7 +1793,14 @@ async function main() {
|
|
|
1777
1793
|
process.exitCode = 1;
|
|
1778
1794
|
}
|
|
1779
1795
|
} catch (error) {
|
|
1780
|
-
|
|
1796
|
+
if (error?.structuredContent?.code === "pgy_commercial_data_unavailable") {
|
|
1797
|
+
console.error(JSON.stringify({
|
|
1798
|
+
code: error.structuredContent.code,
|
|
1799
|
+
message: error.structuredContent.message || error.message,
|
|
1800
|
+
}));
|
|
1801
|
+
} else {
|
|
1802
|
+
console.error(`${LOG_PREFIX} ${formatCliErrorMessage(error)}`);
|
|
1803
|
+
}
|
|
1781
1804
|
process.exit(1);
|
|
1782
1805
|
}
|
|
1783
1806
|
}
|
|
@@ -2848,6 +2871,10 @@ function printHelp() {
|
|
|
2848
2871
|
console.log(` npx -y ${PACKAGE_SPEC} xhs detail --note-id "<note_id>" --pretty`);
|
|
2849
2872
|
console.log(" Call the XHS note detail tool directly and print JSON.");
|
|
2850
2873
|
console.log("");
|
|
2874
|
+
console.log(` npx -y ${PACKAGE_SPEC} xhs pgy-detail --note-id "<note_id>" --pretty`);
|
|
2875
|
+
console.log(" 蒲公英 / Pugongying commercial details: 20 points per successful call; failures are not charged.");
|
|
2876
|
+
console.log(" Use --url instead of --note-id for a note link, short link or share text.");
|
|
2877
|
+
console.log("");
|
|
2851
2878
|
console.log(` npx -y ${PACKAGE_SPEC} xhs comments --note-id "<note_id>" --pretty`);
|
|
2852
2879
|
console.log(" Call the XHS comments tool directly and print JSON.");
|
|
2853
2880
|
console.log("");
|
|
@@ -3357,7 +3384,7 @@ function printHelp() {
|
|
|
3357
3384
|
console.log(" --publish-time-range <all|day|week|month|three_months|half_year|year>");
|
|
3358
3385
|
console.log(" Zhihu search publish-time filter; omit for no filter.");
|
|
3359
3386
|
console.log(" --sort-type <hot|time_descending>");
|
|
3360
|
-
console.log(" X search
|
|
3387
|
+
console.log(" X search, Weibo comments, and YouTube comments sort; omit for default sort.");
|
|
3361
3388
|
console.log(" --sort-type <general|time_descending|view_count_descending|rating>");
|
|
3362
3389
|
console.log(" YouTube search sort; omit for default sort.");
|
|
3363
3390
|
console.log(" --video-type <all|video|movie>");
|
|
@@ -3907,6 +3934,20 @@ function buildXhsOperation(action, options) {
|
|
|
3907
3934
|
urlDisplay: "--url",
|
|
3908
3935
|
})
|
|
3909
3936
|
);
|
|
3937
|
+
case "pgy-detail":
|
|
3938
|
+
return buildDirectOperation(
|
|
3939
|
+
"pgy-detail",
|
|
3940
|
+
buildOneOfCall(options, {
|
|
3941
|
+
idOption: "noteId",
|
|
3942
|
+
urlOption: "url",
|
|
3943
|
+
idTool: "xhs_pgy_get_note_detail_by_note_id",
|
|
3944
|
+
urlTool: "xhs_pgy_get_note_detail_by_note_url",
|
|
3945
|
+
idArgument: "note_id",
|
|
3946
|
+
urlArgument: "note_url",
|
|
3947
|
+
idDisplay: "--note-id",
|
|
3948
|
+
urlDisplay: "--url",
|
|
3949
|
+
})
|
|
3950
|
+
);
|
|
3910
3951
|
case "comments":
|
|
3911
3952
|
return buildDirectOperation(
|
|
3912
3953
|
"comments",
|
|
@@ -4403,6 +4444,7 @@ function buildWeiboOperation(action, options) {
|
|
|
4403
4444
|
idDisplay: "--post-id",
|
|
4404
4445
|
urlDisplay: "--post-url",
|
|
4405
4446
|
pageToken: options.pageToken,
|
|
4447
|
+
extraArguments: buildWeiboCommentsExtraArguments(options),
|
|
4406
4448
|
}),
|
|
4407
4449
|
PLATFORMS.weibo
|
|
4408
4450
|
);
|
|
@@ -5135,6 +5177,19 @@ function buildXhsCommentsExtraArguments(options) {
|
|
|
5135
5177
|
return toolArguments;
|
|
5136
5178
|
}
|
|
5137
5179
|
|
|
5180
|
+
function buildWeiboCommentsExtraArguments(options) {
|
|
5181
|
+
const toolArguments = {};
|
|
5182
|
+
if (options.sortType !== undefined) {
|
|
5183
|
+
toolArguments.sort_type = parseAllowedStringOption(
|
|
5184
|
+
options.sortType,
|
|
5185
|
+
"--sort-type",
|
|
5186
|
+
WEIBO_COMMENT_SORT_TYPES,
|
|
5187
|
+
WEIBO_COMMENT_SORT_TYPES.join(", ")
|
|
5188
|
+
);
|
|
5189
|
+
}
|
|
5190
|
+
return toolArguments;
|
|
5191
|
+
}
|
|
5192
|
+
|
|
5138
5193
|
function buildTranscriptCall(
|
|
5139
5194
|
options,
|
|
5140
5195
|
{
|
package/package.json
CHANGED
|
@@ -242,6 +242,7 @@ Optional arguments:
|
|
|
242
242
|
- TikTok `--post-id <post_id>` or `--url <tiktok_post_url_or_share_text>`: use for first-level comments; replies require `--post-id <post_id>` and `--comment-id <comment_id>`.
|
|
243
243
|
- Weibo `--post-id <post_id>`: preferred when the Weibo post ID is already known and should anchor the comment thread.
|
|
244
244
|
- Weibo `--post-url <weibo_post_url_or_share_text>`: use for a Weibo post URL, short link, or share text for first-level comments.
|
|
245
|
+
- Weibo comments `--sort-type <hot|time_descending>`: optional first-level comment sort order; omit it for the default `hot` order, and keep it unchanged when continuing with `--page-token`.
|
|
245
246
|
- WeChat Channels / 视频号 `--object-id <object_id>` and `--object-nonce-id <object_nonce_id>`: use together when both values are already known and should anchor the comment thread.
|
|
246
247
|
- WeChat Channels / 视频号 `--url <wechat_video_url_or_share_text>`: use for a WeChat Channels video link or share text for first-level comments.
|
|
247
248
|
- `--source-client socialdatax-skills --source-platform npm --source-skill media-comments`: usage attribution for this Agent Skill; keep these values unchanged when running examples from this Skill.
|
|
@@ -300,8 +301,8 @@ If MCP tools are already available in the current agent, use one of these tools:
|
|
|
300
301
|
- `tiktok_get_post_comments_by_post_id`: use when the TikTok post_id is known.
|
|
301
302
|
- `tiktok_get_post_comments_by_url`: use for TikTok post URLs or share text.
|
|
302
303
|
- `tiktok_get_post_comment_replies`: use when the TikTok post_id and first-level comment ID are known.
|
|
303
|
-
- `weibo_get_post_comments_by_post_id`: use when the post_id is known
|
|
304
|
-
- `weibo_get_post_comments_by_post_url`: use for Weibo post URLs, short links, or share text
|
|
304
|
+
- `weibo_get_post_comments_by_post_id`: use when the post_id is known; optional `sort_type` accepts `hot` or `time_descending`.
|
|
305
|
+
- `weibo_get_post_comments_by_post_url`: use for Weibo post URLs, short links, or share text; optional `sort_type` accepts `hot` or `time_descending`.
|
|
305
306
|
- `weibo_get_post_comment_replies_by_comment_id`: use when the post_id and first-level comment ID are known.
|
|
306
307
|
- For Weibo comments and replies, continue only when `next_page_token` is non-empty; an empty string means there are no more comments or replies to request.
|
|
307
308
|
- `wechat_get_video_comments_by_object_id`: use when both object_id and object_nonce_id are known.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: "media-detail"
|
|
3
|
-
description: "Read structured social media content details and metrics from content IDs, URLs, short links, or share text for supported platforms including Xiaohongshu / XHS / RedNote, Douyin, Kuaishou, Bilibili, Zhihu, Instagram, X / Twitter, YouTube, TikTok, Weibo, and WeChat Channels. For WeChat Official Account articles, read article details and body text from article links."
|
|
3
|
+
description: "Read structured social media content details and metrics from content IDs, URLs, short links, or share text for supported platforms including Xiaohongshu / XHS / RedNote, Douyin, Kuaishou, Bilibili, Zhihu, Instagram, X / Twitter, YouTube, TikTok, Weibo, and WeChat Channels. For WeChat Official Account articles, read article details and body text from article links. Supports XHS 蒲公英 / Pugongying commercial note details when requested."
|
|
4
4
|
source_client: "socialdatax-skills"
|
|
5
5
|
source_platform: "npm"
|
|
6
6
|
source_skill: "media-detail"
|
|
@@ -24,7 +24,7 @@ metadata:
|
|
|
24
24
|
|
|
25
25
|
# Media Detail
|
|
26
26
|
|
|
27
|
-
Use this skill when the user provides an mp.weixin.qq.com article link and wants WeChat Official Account article body text. For other supported content links, short links, share text, or content IDs, use it for structured details or interaction metrics where supported.
|
|
27
|
+
Use this skill when the user provides an mp.weixin.qq.com article link and wants WeChat Official Account article body text. For other supported content links, short links, share text, or content IDs, use it for structured details or interaction metrics where supported. For explicit XHS 蒲公英 / Pugongying commercial note requests, choose the commercial detail route (20 points per successful call; failures are not charged).
|
|
28
28
|
|
|
29
29
|
Current platform support:
|
|
30
30
|
|
|
@@ -40,6 +40,7 @@ Current platform support:
|
|
|
40
40
|
- Weibo / 微博 posts through the `weibo_get_post_detail_by_*` tools.
|
|
41
41
|
- WeChat Channels / 视频号 video and image-post details through the `wechat_get_video_detail_by_*` tools.
|
|
42
42
|
- WeChat Official Account / 微信公众号 articles through `wechat_get_mp_article_detail_by_url`.
|
|
43
|
+
- Xiaohongshu / XHS 蒲公英 / Pugongying single-note commercial details through `xhs_pgy_get_note_detail_by_note_id` or `xhs_pgy_get_note_detail_by_note_url`.
|
|
43
44
|
|
|
44
45
|
## API Key
|
|
45
46
|
|
|
@@ -130,6 +131,14 @@ npx -y socialdatax-skills@latest wechat detail \
|
|
|
130
131
|
npx -y socialdatax-skills@latest wechat article \
|
|
131
132
|
--url "<mp_article_url_or_share_text>" --pretty --source-client socialdatax-skills \
|
|
132
133
|
--source-platform npm --source-skill media-detail
|
|
134
|
+
|
|
135
|
+
npx -y socialdatax-skills@latest xhs pgy-detail \
|
|
136
|
+
--note-id "<note_id>" --pretty --source-client socialdatax-skills \
|
|
137
|
+
--source-platform npm --source-skill media-detail
|
|
138
|
+
|
|
139
|
+
npx -y socialdatax-skills@latest xhs pgy-detail \
|
|
140
|
+
--url "<note_url_or_share_text>" --pretty --source-client socialdatax-skills \
|
|
141
|
+
--source-platform npm --source-skill media-detail
|
|
133
142
|
```
|
|
134
143
|
|
|
135
144
|
Optional arguments:
|
|
@@ -160,6 +169,11 @@ Optional arguments:
|
|
|
160
169
|
Use either the ID option or the URL option for detail commands, not both.
|
|
161
170
|
|
|
162
171
|
The command prints JSON with `platform`, `tool`, `arguments`, and `data`.
|
|
172
|
+
For XHS 蒲公英 / Pugongying commercial note data, use `xhs pgy-detail`. Each successful call costs 20 points; failed calls are not charged.
|
|
173
|
+
XHS 蒲公英 queries apply only to notes from creators enrolled in 蒲公英 / Pugongying.
|
|
174
|
+
Use this route when the user asks for 蒲公英 / Pugongying commercial details. Ordinary note-detail requests continue to use `xhs detail`; do not automatically upgrade an ordinary request or retry it through the paid commercial route.
|
|
175
|
+
Choose exactly one input: the complete `--note-id`, or `--url` with the original note link, short link or share text. Do not call both routes for the same note.
|
|
176
|
+
If the user asks only for exposure, reads or pricing without establishing the 蒲公英 commercial scope, clarify that scope and the 20-point successful-call cost before calling. Do not ask again when the conversation has already established this scope.
|
|
163
177
|
|
|
164
178
|
## Safety Boundary
|
|
165
179
|
|
|
@@ -169,26 +183,17 @@ Platform detail access is read-only. It uses `SOCIALDATAX_API_KEY` from the user
|
|
|
169
183
|
|
|
170
184
|
MCP tools matching the direct CLI commands above:
|
|
171
185
|
|
|
172
|
-
- `xhs_get_note_detail_by_note_id`
|
|
173
|
-
- `
|
|
174
|
-
- `
|
|
175
|
-
- `
|
|
176
|
-
- `
|
|
177
|
-
- `
|
|
178
|
-
- `
|
|
179
|
-
- `
|
|
180
|
-
- `
|
|
181
|
-
- `
|
|
182
|
-
- `
|
|
183
|
-
- `x_get_post_detail_by_post_id`
|
|
184
|
-
- `x_get_post_detail_by_post_url`
|
|
185
|
-
- `youtube_get_video_detail_by_url`
|
|
186
|
-
- `tiktok_get_post_detail_by_url`
|
|
187
|
-
- `weibo_get_post_detail_by_post_id`
|
|
188
|
-
- `weibo_get_post_detail_by_post_url`
|
|
189
|
-
- `wechat_get_video_detail_by_encrypted_object_id`
|
|
190
|
-
- `wechat_get_video_detail_by_url`
|
|
191
|
-
- `wechat_get_mp_article_detail_by_url`
|
|
186
|
+
- XHS: `xhs_get_note_detail_by_note_id`, `xhs_get_note_detail_by_note_url`, `xhs_pgy_get_note_detail_by_note_id`, `xhs_pgy_get_note_detail_by_note_url`
|
|
187
|
+
- DOUYIN: `douyin_get_video_detail_by_aweme_id`, `douyin_get_video_detail_by_url`
|
|
188
|
+
- KUAISHOU: `kuaishou_get_video_detail_by_photo_id`, `kuaishou_get_video_detail_by_url`
|
|
189
|
+
- BILIBILI: `bilibili_get_content_detail_by_id`, `bilibili_get_content_detail_by_url`
|
|
190
|
+
- ZHIHU: `zhihu_get_content_detail_by_url`
|
|
191
|
+
- INSTAGRAM: `instagram_get_post_detail_by_post_id`, `instagram_get_post_detail_by_post_url`
|
|
192
|
+
- X: `x_get_post_detail_by_post_id`, `x_get_post_detail_by_post_url`
|
|
193
|
+
- YOUTUBE: `youtube_get_video_detail_by_url`
|
|
194
|
+
- TIKTOK: `tiktok_get_post_detail_by_url`
|
|
195
|
+
- WEIBO: `weibo_get_post_detail_by_post_id`, `weibo_get_post_detail_by_post_url`
|
|
196
|
+
- WECHAT: `wechat_get_video_detail_by_encrypted_object_id`, `wechat_get_video_detail_by_url`, `wechat_get_mp_article_detail_by_url`
|
|
192
197
|
|
|
193
198
|
If MCP tools are already available in the current agent, use one of these tools:
|
|
194
199
|
- `xhs_get_note_detail_by_note_id`: use when the full `note_id` is already known; do not pass only a prefix.
|
|
@@ -211,6 +216,9 @@ If MCP tools are already available in the current agent, use one of these tools:
|
|
|
211
216
|
- `wechat_get_video_detail_by_encrypted_object_id`: use when encrypted_object_id from search is already known.
|
|
212
217
|
- `wechat_get_video_detail_by_url`: use for a WeChat Channels / 视频号 video or image-post link or share text.
|
|
213
218
|
- `wechat_get_mp_article_detail_by_url`: use for WeChat Official Account / 微信公众号 article links or share text.
|
|
219
|
+
- `xhs_pgy_get_note_detail_by_note_id`: for 蒲公英 / Pugongying commercial details when the full note_id is known.
|
|
220
|
+
- `xhs_pgy_get_note_detail_by_note_url`: for 蒲公英 / Pugongying commercial details from a note URL, short link or share text.
|
|
221
|
+
Both XHS 蒲公英 tools cost 20 points per successful call; failures are not charged. They are distinct from ordinary `xhs_get_note_detail_by_*` tools.
|
|
214
222
|
|
|
215
223
|
## Output Guidance
|
|
216
224
|
|
|
@@ -232,10 +240,15 @@ When the user wants to save Weibo media after detail, pass each returned `image_
|
|
|
232
240
|
For WeChat Channels / 视频号 detail, preserve `object_id` and `object_nonce_id` because comments and replies need both values.
|
|
233
241
|
When the user wants to save a WeChat Channels / 视频号 video after detail, pass the returned `video.video_url` to `npx -y socialdatax-skills@latest wechat decrypt-media --media-url "<video.video_url>" --output <file>`; this local save command decrypts when needed and does not require `SOCIALDATAX_API_KEY`.
|
|
234
242
|
For WeChat Official Account / 微信公众号 article detail, include article title, account, publish time, body text, image URLs, linked articles, and embedded video cards when present.
|
|
243
|
+
Label XHS 蒲公英 / Pugongying results as commercial note data, distinct from ordinary public note metrics; do not present ordinary note details as a successful commercial result.
|
|
244
|
+
When MCP returns structured code `pgy_commercial_data_unavailable` (or HTTP returns numeric code `1009`), treat the creator as not enrolled and show the returned message: "该笔记所属博主未入驻蒲公英,无法查询蒲公英数据。本次查询失败,不扣费。" These identifiers retain the explicit no-commercial-data outcome; do not classify errors by matching message text or internal reason_code.
|
|
245
|
+
After this no-data outcome, stop: do not retry through the other ID/URL route or automatically substitute ordinary details. If the user still wants ordinary details, use the ordinary detail route for that request.
|
|
246
|
+
Do not classify timeouts, service outages, authentication failures, insufficient balance, invalid inputs, or an unexplained empty response as 未入驻蒲公英. Report the actual request error or unresolved outcome instead.
|
|
247
|
+
For CLI calls, this no-commercial-data error exits with status 1 and writes a JSON object containing `code` and `message` to stderr; read that code instead of matching text. A text-only or unknown error is unresolved, not evidence of non-enrollment. Do not persist this single-note outcome as a permanent creator enrollment status.
|
|
235
248
|
|
|
236
249
|
## Troubleshooting
|
|
237
250
|
|
|
238
251
|
- If an SDK/dependency, npm network, Node.js/npm/npx availability, permission, or missing runtime error appears, treat it as a local runtime, dependency installation, network, or agent authorization issue, not a SocialDataX API key or business data error. If the current environment has permission, install or restore automatically. When network or execution authorization is needed, ask the user to approve or finish authorization, then continue the same command; do not use public web search as a substitute for SocialDataX data.
|
|
239
|
-
- For non-balance network or API errors, preserve the error message, check `SOCIALDATAX_API_KEY`, parameters, and link or ID format, then retry once when appropriate.
|
|
252
|
+
- For non-balance network or API errors, preserve the error message, check `SOCIALDATAX_API_KEY`, parameters, and link or ID format, then retry once when appropriate. This retry advice excludes `pgy_commercial_data_unavailable` / HTTP `1009`: stop without retrying the same or alternate input route.
|
|
240
253
|
- If the response returns `insufficient_balance` or says the balance/credits are insufficient, do not retry repeatedly. Show the recharge URL from the error exactly as returned, then continue the same command after the user recharges.
|
|
241
254
|
- If the user has recharged but still sees insufficient balance, confirm `SOCIALDATAX_API_KEY` belongs to the same account that was recharged; if needed, copy a fresh API Key from the official dashboard.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
interface:
|
|
2
2
|
display_name: "Media Detail"
|
|
3
3
|
short_description: "Read content details"
|
|
4
|
-
default_prompt: "Use $media-detail to read WeChat Official Account article details and body text. For supported XHS, Douyin, Kuaishou, Bilibili, Zhihu, Instagram, X / Twitter, YouTube, TikTok, Weibo, and WeChat Channels content, read structured details and metrics."
|
|
4
|
+
default_prompt: "Use $media-detail to read WeChat Official Account article details and body text. For supported XHS, Douyin, Kuaishou, Bilibili, Zhihu, Instagram, X / Twitter, YouTube, TikTok, Weibo, and WeChat Channels content, read structured details and metrics. When requested, use the XHS 蒲公英 commercial detail route; successful calls cost 20 points and failures are not charged."
|
|
5
5
|
|
|
6
6
|
policy:
|
|
7
7
|
allow_implicit_invocation: true
|