@vocmarket/voc-skill 0.3.37 → 0.3.39
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/.claude-plugin/plugin.json +8 -8
- package/mcp/catalog/voc-social-endpoints.json +44 -16
- package/mcp/src/features/xiaohongshu-trend/live-collector.js +46 -5
- package/mcp/src/providers/xiaohongshu-api.js +182 -15
- package/mcp/src/server.js +1 -1
- package/mcp/src/tools/voc-api-catalog-run.js +7 -1
- package/package.json +80 -80
- package/scripts/smoke-package.js +1 -1
- package/skill-package-manifest.json +137 -137
- package/skills/voc-api-catalog/SKILL.md +19 -0
- package/skills/xiaohongshu-trend-intelligence/references/live-mode.md +8 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "voc-intelligence",
|
|
3
|
-
"description": "VOC intelligence skills for Claude Code: end-to-end VOC business workflows, Xiaohongshu/Douyin/WeChat Channels collection and trend reports, live social VOC collection, Fmode Doubao image analysis, token/recharge checks, evidence-card outputs, prioritized issue pools, single-problem deep dives, competitor maps, 7-day content plans, VOC-backed speaking script co-creation, boss/operator action plans, and multi-turn memory.",
|
|
4
|
-
"version": "0.3.
|
|
5
|
-
"author": {
|
|
6
|
-
"name": "nkkj-BrainHack"
|
|
7
|
-
}
|
|
8
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "voc-intelligence",
|
|
3
|
+
"description": "VOC intelligence skills for Claude Code: end-to-end VOC business workflows, Xiaohongshu/Douyin/WeChat Channels collection and trend reports, live social VOC collection, Fmode Doubao image analysis, token/recharge checks, evidence-card outputs, prioritized issue pools, single-problem deep dives, competitor maps, 7-day content plans, VOC-backed speaking script co-creation, boss/operator action plans, and multi-turn memory.",
|
|
4
|
+
"version": "0.3.39",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "nkkj-BrainHack"
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -915,7 +915,10 @@
|
|
|
915
915
|
"desc": "连续翻页时透传上一次返回的 session_id。"
|
|
916
916
|
}
|
|
917
917
|
],
|
|
918
|
-
"responseHint": "返回笔记列表,含 note_id、标题、作者、互动数;翻页递增 page 并透传 search_id/session_id。"
|
|
918
|
+
"responseHint": "返回笔记列表,含 note_id、标题、作者、互动数;翻页递增 page 并透传 search_id/session_id。",
|
|
919
|
+
"deprecated": true,
|
|
920
|
+
"replacedBy": "xiaohongshu.app_v2.search_notes",
|
|
921
|
+
"recommendationPriority": -1000
|
|
919
922
|
},
|
|
920
923
|
{
|
|
921
924
|
"id": "xiaohongshu.note_detail",
|
|
@@ -952,7 +955,10 @@
|
|
|
952
955
|
"desc": "可选:直接传小红书分享文案/链接,与 note_id 二选一。"
|
|
953
956
|
}
|
|
954
957
|
],
|
|
955
|
-
"responseHint": "返回单条笔记对象,含正文、图片/视频、话题、互动数。"
|
|
958
|
+
"responseHint": "返回单条笔记对象,含正文、图片/视频、话题、互动数。",
|
|
959
|
+
"deprecated": true,
|
|
960
|
+
"replacedBy": "xiaohongshu.app_v2.get_image_note_detail",
|
|
961
|
+
"recommendationPriority": -1000
|
|
956
962
|
},
|
|
957
963
|
{
|
|
958
964
|
"id": "xiaohongshu.note_comments",
|
|
@@ -997,7 +1003,8 @@
|
|
|
997
1003
|
"desc": "可选安全令牌,来自 search_notes 返回的 note.xsec_token;部分笔记风控需要。"
|
|
998
1004
|
}
|
|
999
1005
|
],
|
|
1000
|
-
"responseHint": "返回评论列表,含 comment_id、文本、点赞、子评论数;翻页用返回的游标。"
|
|
1006
|
+
"responseHint": "返回评论列表,含 comment_id、文本、点赞、子评论数;翻页用返回的游标。",
|
|
1007
|
+
"recommendationPriority": 80
|
|
1001
1008
|
},
|
|
1002
1009
|
{
|
|
1003
1010
|
"id": "xiaohongshu.sub_comments",
|
|
@@ -1043,7 +1050,8 @@
|
|
|
1043
1050
|
"desc": "分页游标,首页留空,翻页用上一次返回的 start。"
|
|
1044
1051
|
}
|
|
1045
1052
|
],
|
|
1046
|
-
"responseHint": "返回某条评论的回复列表;翻页用返回的 start。"
|
|
1053
|
+
"responseHint": "返回某条评论的回复列表;翻页用返回的 start。",
|
|
1054
|
+
"recommendationPriority": 70
|
|
1047
1055
|
},
|
|
1048
1056
|
{
|
|
1049
1057
|
"id": "xiaohongshu.user_info",
|
|
@@ -1074,7 +1082,10 @@
|
|
|
1074
1082
|
"desc": "用户 id(24 位 hex),来自 search_notes 返回的 note.user.userid;注意不是数字 red_id。"
|
|
1075
1083
|
}
|
|
1076
1084
|
],
|
|
1077
|
-
"responseHint": "返回用户资料对象,含粉丝数、获赞收藏、简介。"
|
|
1085
|
+
"responseHint": "返回用户资料对象,含粉丝数、获赞收藏、简介。",
|
|
1086
|
+
"deprecated": true,
|
|
1087
|
+
"replacedBy": "xiaohongshu.app_v2.get_user_info",
|
|
1088
|
+
"recommendationPriority": -1000
|
|
1078
1089
|
},
|
|
1079
1090
|
{
|
|
1080
1091
|
"id": "xiaohongshu.user_notes",
|
|
@@ -1113,7 +1124,10 @@
|
|
|
1113
1124
|
"desc": "分页游标,首页留空,翻页用上一次返回的 cursor。"
|
|
1114
1125
|
}
|
|
1115
1126
|
],
|
|
1116
|
-
"responseHint": "返回该用户的笔记列表;翻页用返回的 cursor。"
|
|
1127
|
+
"responseHint": "返回该用户的笔记列表;翻页用返回的 cursor。",
|
|
1128
|
+
"deprecated": true,
|
|
1129
|
+
"replacedBy": "xiaohongshu.app_v2.get_user_posted_notes",
|
|
1130
|
+
"recommendationPriority": -1000
|
|
1117
1131
|
},
|
|
1118
1132
|
{
|
|
1119
1133
|
"id": "xiaohongshu.topic_notes",
|
|
@@ -1190,7 +1204,10 @@
|
|
|
1190
1204
|
"desc": "翻页透传上一次返回的 session_id。"
|
|
1191
1205
|
}
|
|
1192
1206
|
],
|
|
1193
|
-
"responseHint": "返回话题下笔记列表;翻页透传 last_note_ct/last_note_id/cursor_score/session_id。"
|
|
1207
|
+
"responseHint": "返回话题下笔记列表;翻页透传 last_note_ct/last_note_id/cursor_score/session_id。",
|
|
1208
|
+
"deprecated": true,
|
|
1209
|
+
"replacedBy": "xiaohongshu.app_v2.get_topic_feed",
|
|
1210
|
+
"recommendationPriority": -1000
|
|
1194
1211
|
},
|
|
1195
1212
|
{
|
|
1196
1213
|
"id": "xiaohongshu.search_products",
|
|
@@ -1276,7 +1293,10 @@
|
|
|
1276
1293
|
"desc": "连续翻页时透传上一次返回的 session_id。"
|
|
1277
1294
|
}
|
|
1278
1295
|
],
|
|
1279
|
-
"responseHint": "返回商品列表,含标题、价格、销量、店铺。"
|
|
1296
|
+
"responseHint": "返回商品列表,含标题、价格、销量、店铺。",
|
|
1297
|
+
"deprecated": true,
|
|
1298
|
+
"replacedBy": "xiaohongshu.app_v2.search_products",
|
|
1299
|
+
"recommendationPriority": -1000
|
|
1280
1300
|
},
|
|
1281
1301
|
{
|
|
1282
1302
|
"id": "tiktok.web.fetch_post_detail",
|
|
@@ -10405,7 +10425,8 @@
|
|
|
10405
10425
|
"app",
|
|
10406
10426
|
"v2"
|
|
10407
10427
|
],
|
|
10408
|
-
"requiredParams": []
|
|
10428
|
+
"requiredParams": [],
|
|
10429
|
+
"recommendationPriority": 90
|
|
10409
10430
|
},
|
|
10410
10431
|
{
|
|
10411
10432
|
"id": "xiaohongshu.app_v2.get_video_note_detail",
|
|
@@ -10423,7 +10444,8 @@
|
|
|
10423
10444
|
"app",
|
|
10424
10445
|
"v2"
|
|
10425
10446
|
],
|
|
10426
|
-
"requiredParams": []
|
|
10447
|
+
"requiredParams": [],
|
|
10448
|
+
"recommendationPriority": 90
|
|
10427
10449
|
},
|
|
10428
10450
|
{
|
|
10429
10451
|
"id": "xiaohongshu.app_v2.get_note_comments",
|
|
@@ -10479,7 +10501,8 @@
|
|
|
10479
10501
|
"app",
|
|
10480
10502
|
"v2"
|
|
10481
10503
|
],
|
|
10482
|
-
"requiredParams": []
|
|
10504
|
+
"requiredParams": [],
|
|
10505
|
+
"recommendationPriority": 60
|
|
10483
10506
|
},
|
|
10484
10507
|
{
|
|
10485
10508
|
"id": "xiaohongshu.app_v2.get_user_posted_notes",
|
|
@@ -10497,7 +10520,8 @@
|
|
|
10497
10520
|
"app",
|
|
10498
10521
|
"v2"
|
|
10499
10522
|
],
|
|
10500
|
-
"requiredParams": []
|
|
10523
|
+
"requiredParams": [],
|
|
10524
|
+
"recommendationPriority": 50
|
|
10501
10525
|
},
|
|
10502
10526
|
{
|
|
10503
10527
|
"id": "xiaohongshu.app_v2.get_user_faved_notes",
|
|
@@ -10535,7 +10559,8 @@
|
|
|
10535
10559
|
],
|
|
10536
10560
|
"requiredParams": [
|
|
10537
10561
|
"keyword"
|
|
10538
|
-
]
|
|
10562
|
+
],
|
|
10563
|
+
"recommendationPriority": 100
|
|
10539
10564
|
},
|
|
10540
10565
|
{
|
|
10541
10566
|
"id": "xiaohongshu.app_v2.search_users",
|
|
@@ -10595,7 +10620,8 @@
|
|
|
10595
10620
|
],
|
|
10596
10621
|
"requiredParams": [
|
|
10597
10622
|
"keyword"
|
|
10598
|
-
]
|
|
10623
|
+
],
|
|
10624
|
+
"recommendationPriority": 30
|
|
10599
10625
|
},
|
|
10600
10626
|
{
|
|
10601
10627
|
"id": "xiaohongshu.app_v2.search_groups",
|
|
@@ -10715,7 +10741,8 @@
|
|
|
10715
10741
|
],
|
|
10716
10742
|
"requiredParams": [
|
|
10717
10743
|
"page_id"
|
|
10718
|
-
]
|
|
10744
|
+
],
|
|
10745
|
+
"recommendationPriority": 40
|
|
10719
10746
|
},
|
|
10720
10747
|
{
|
|
10721
10748
|
"id": "xiaohongshu.app_v2.get_topic_feed",
|
|
@@ -10735,7 +10762,8 @@
|
|
|
10735
10762
|
],
|
|
10736
10763
|
"requiredParams": [
|
|
10737
10764
|
"page_id"
|
|
10738
|
-
]
|
|
10765
|
+
],
|
|
10766
|
+
"recommendationPriority": 40
|
|
10739
10767
|
},
|
|
10740
10768
|
{
|
|
10741
10769
|
"id": "xiaohongshu.app_v2.get_creator_inspiration_feed",
|
|
@@ -231,17 +231,49 @@ function normalizeComment(raw, noteId, keyword) {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
+
function flattenSearchItem(item) {
|
|
235
|
+
if (!item || typeof item !== 'object') return null;
|
|
236
|
+
if (item.note) return item.note;
|
|
237
|
+
if (item.note_card) {
|
|
238
|
+
const interact = item.note_card.interact_info || {};
|
|
239
|
+
return {
|
|
240
|
+
id: item.id || item.note_id || item.note_card.note_id,
|
|
241
|
+
note_id: item.id || item.note_id || item.note_card.note_id,
|
|
242
|
+
title: item.note_card.display_title || item.note_card.title || '',
|
|
243
|
+
desc: item.note_card.desc || item.note_card.display_title || '',
|
|
244
|
+
type: item.note_card.type || item.model_type || '',
|
|
245
|
+
user: item.note_card.user || {},
|
|
246
|
+
liked_count: interact.liked_count,
|
|
247
|
+
collected_count: interact.collected_count,
|
|
248
|
+
comments_count: interact.comment_count || interact.comments_count,
|
|
249
|
+
shared_count: interact.share_count || interact.shared_count,
|
|
250
|
+
cover: item.note_card.cover,
|
|
251
|
+
xsec_token: item.xsec_token || item.note_card.xsec_token || '',
|
|
252
|
+
note_card: item.note_card,
|
|
253
|
+
share_info: item.note_card.share_info,
|
|
254
|
+
mini_program_info: item.note_card.mini_program_info
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
return item;
|
|
258
|
+
}
|
|
259
|
+
|
|
234
260
|
function extractSearchNotes(data) {
|
|
235
261
|
const items = data.items || data.note_list || data.notes || [];
|
|
236
262
|
if (!Array.isArray(items)) return [];
|
|
237
263
|
return items
|
|
238
|
-
.map(
|
|
264
|
+
.map(flattenSearchItem)
|
|
239
265
|
.filter(note => note && (note.id || note.note_id));
|
|
240
266
|
}
|
|
241
267
|
|
|
242
268
|
function extractDetailNote(data) {
|
|
243
|
-
|
|
244
|
-
|
|
269
|
+
if (Array.isArray(data) && data[0]) {
|
|
270
|
+
const first = data[0];
|
|
271
|
+
const nested = first.note_list || first.notes || [];
|
|
272
|
+
if (Array.isArray(nested) && nested[0]) return nested[0];
|
|
273
|
+
return first.note || first;
|
|
274
|
+
}
|
|
275
|
+
const list = data && (data.note_list || data.notes) || [];
|
|
276
|
+
return Array.isArray(list) && list[0] ? list[0] : (data && data.note) || data;
|
|
245
277
|
}
|
|
246
278
|
|
|
247
279
|
function extractComments(data) {
|
|
@@ -301,7 +333,10 @@ async function collectLiveDataset({ profile, token, fallbackToken, options = {}
|
|
|
301
333
|
for (const rawNote of rawNotes) {
|
|
302
334
|
let note = rawNote;
|
|
303
335
|
try {
|
|
304
|
-
const detail = await api.getNoteDetail({
|
|
336
|
+
const detail = await api.getNoteDetail({
|
|
337
|
+
noteId: rawNote.id,
|
|
338
|
+
noteType: rawNote.type
|
|
339
|
+
});
|
|
305
340
|
note = normalizeNote(rawNote, keyword, extractDetailNote(detail.data));
|
|
306
341
|
} catch (error) {
|
|
307
342
|
warnings.push({
|
|
@@ -318,7 +353,11 @@ async function collectLiveDataset({ profile, token, fallbackToken, options = {}
|
|
|
318
353
|
let cursor = '';
|
|
319
354
|
for (let page = 0; page < maxCommentPages; page++) {
|
|
320
355
|
try {
|
|
321
|
-
const commentResult = await api.getNoteComments({
|
|
356
|
+
const commentResult = await api.getNoteComments({
|
|
357
|
+
noteId: note.id,
|
|
358
|
+
cursor,
|
|
359
|
+
xsecToken: rawNote.xsec_token || note.xsec_token || ''
|
|
360
|
+
});
|
|
322
361
|
extractComments(commentResult.data).forEach(rawComment => {
|
|
323
362
|
comments.push(normalizeComment(rawComment, note.id, keyword));
|
|
324
363
|
});
|
|
@@ -363,5 +402,7 @@ module.exports = {
|
|
|
363
402
|
normalizeNote,
|
|
364
403
|
pickWebUrl,
|
|
365
404
|
extractImageUrls,
|
|
405
|
+
extractSearchNotes,
|
|
406
|
+
extractDetailNote,
|
|
366
407
|
hasXsecToken
|
|
367
408
|
};
|
|
@@ -1,21 +1,89 @@
|
|
|
1
1
|
const { callSocialGateway } = require('./voc-gateway');
|
|
2
2
|
|
|
3
3
|
const VOC_SOCIAL_API_ROOT = 'https://server.fmode.cn/api/voc-social';
|
|
4
|
-
const
|
|
4
|
+
const XIAOHONGSHU_API_ROOT = `${VOC_SOCIAL_API_ROOT}/xiaohongshu`;
|
|
5
|
+
const XIAOHONGSHU_APP_BASE_URL = `${XIAOHONGSHU_API_ROOT}/app`;
|
|
6
|
+
|
|
7
|
+
const SEARCH_APP_V2_PATH = 'app_v2/search_notes';
|
|
8
|
+
const SEARCH_WEB_V3_PATH = 'web_v3/fetch_search_notes';
|
|
9
|
+
const DETAIL_IMAGE_PATH = 'app_v2/get_image_note_detail';
|
|
10
|
+
const DETAIL_VIDEO_PATH = 'app_v2/get_video_note_detail';
|
|
11
|
+
const DETAIL_APP_FALLBACK_PATH = 'app/get_note_info';
|
|
12
|
+
const COMMENTS_PATH = 'app_v2/get_note_comments';
|
|
13
|
+
|
|
14
|
+
function normalizeXiaohongshuBaseUrl(baseUrl) {
|
|
15
|
+
const value = String(baseUrl || XIAOHONGSHU_API_ROOT).replace(/\/$/, '');
|
|
16
|
+
return value.replace(/\/(app_v2|app|web_v3|web_v2|web)$/i, '').replace(/\/$/, '') || XIAOHONGSHU_API_ROOT;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function isRetryableUpstream(error) {
|
|
20
|
+
if (!error) return false;
|
|
21
|
+
if (error.kind === 'upstream') return true;
|
|
22
|
+
const status = Number(error.httpStatus || 0);
|
|
23
|
+
return status === 0 || status >= 500 || status === 301;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function mapSortType(sort) {
|
|
27
|
+
const value = String(sort || 'popularity_descending').trim();
|
|
28
|
+
if (!value || value === '_0') return 'popularity_descending';
|
|
29
|
+
if (value === 'time_desc') return 'time_descending';
|
|
30
|
+
if (value === 'popularity') return 'popularity_descending';
|
|
31
|
+
return value;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function mapAppV2NoteType(noteType) {
|
|
35
|
+
const value = String(noteType == null ? '_0' : noteType).trim();
|
|
36
|
+
if (value === '_0' || value === '0' || value === '不限' || value === '') return '不限';
|
|
37
|
+
if (value === '_1' || value === '1' || value === '视频' || value === '视频笔记') return '视频笔记';
|
|
38
|
+
if (value === '_2' || value === '2' || value === '图文' || value === '普通笔记' || value === 'normal') return '普通笔记';
|
|
39
|
+
if (value === '直播' || value === '直播笔记') return '直播笔记';
|
|
40
|
+
return value;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function mapWebV3NoteType(noteType) {
|
|
44
|
+
const value = String(noteType == null ? '_0' : noteType).trim();
|
|
45
|
+
if (value === '_1' || value === '1' || value === '视频' || value === '视频笔记' || value === 'video') return 1;
|
|
46
|
+
if (value === '_2' || value === '2' || value === '图文' || value === '普通笔记' || value === 'normal') return 2;
|
|
47
|
+
return 0;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
function extractSearchItems(data) {
|
|
51
|
+
if (!data || typeof data !== 'object') return [];
|
|
52
|
+
const candidates = [data.items, data.note_list, data.notes, data.data && data.data.items];
|
|
53
|
+
for (const list of candidates) {
|
|
54
|
+
if (Array.isArray(list)) return list;
|
|
55
|
+
}
|
|
56
|
+
return [];
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function hasNotePayload(data) {
|
|
60
|
+
if (!data) return false;
|
|
61
|
+
if (Array.isArray(data)) return data.some(item => hasNotePayload(item));
|
|
62
|
+
if (Array.isArray(data.note_list) && data.note_list.length) return true;
|
|
63
|
+
if (Array.isArray(data.notes) && data.notes.length) return true;
|
|
64
|
+
if (data.note && (data.note.id || data.note.note_id)) return true;
|
|
65
|
+
return Boolean(data.id || data.note_id);
|
|
66
|
+
}
|
|
5
67
|
|
|
6
68
|
class XiaohongshuApi {
|
|
7
69
|
constructor(options = {}) {
|
|
8
|
-
this.baseUrl =
|
|
70
|
+
this.baseUrl = normalizeXiaohongshuBaseUrl(
|
|
71
|
+
options.baseUrl ||
|
|
72
|
+
process.env.XIAOHONGSHU_API_BASE_URL ||
|
|
73
|
+
process.env.VOC_XIAOHONGSHU_API_BASE_URL ||
|
|
74
|
+
XIAOHONGSHU_API_ROOT
|
|
75
|
+
);
|
|
9
76
|
this.token = options.token;
|
|
10
77
|
this.fallbackToken = options.fallbackToken || '';
|
|
11
78
|
this.headers = options.headers || {};
|
|
12
79
|
}
|
|
13
80
|
|
|
14
|
-
request(proxyPath, query) {
|
|
81
|
+
request(proxyPath, { method = 'GET', query = {}, body } = {}) {
|
|
15
82
|
return callSocialGateway({
|
|
16
83
|
proxyPath,
|
|
17
|
-
method
|
|
84
|
+
method,
|
|
18
85
|
query,
|
|
86
|
+
body,
|
|
19
87
|
token: this.token,
|
|
20
88
|
fallbackToken: this.fallbackToken,
|
|
21
89
|
baseUrl: this.baseUrl,
|
|
@@ -23,26 +91,125 @@ class XiaohongshuApi {
|
|
|
23
91
|
});
|
|
24
92
|
}
|
|
25
93
|
|
|
26
|
-
searchNotes({
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
94
|
+
async searchNotes({
|
|
95
|
+
keyword,
|
|
96
|
+
page = 1,
|
|
97
|
+
sort = 'popularity_descending',
|
|
98
|
+
noteType = '_0',
|
|
99
|
+
searchId = '',
|
|
100
|
+
sessionId = ''
|
|
101
|
+
}) {
|
|
102
|
+
const sortType = mapSortType(sort);
|
|
103
|
+
let firstError;
|
|
104
|
+
|
|
105
|
+
try {
|
|
106
|
+
const result = await this.request(SEARCH_APP_V2_PATH, {
|
|
107
|
+
query: {
|
|
108
|
+
keyword,
|
|
109
|
+
page,
|
|
110
|
+
sort_type: sortType,
|
|
111
|
+
note_type: mapAppV2NoteType(noteType),
|
|
112
|
+
search_id: searchId,
|
|
113
|
+
search_session_id: sessionId
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
if (extractSearchItems(result.data).length > 0) {
|
|
117
|
+
return {
|
|
118
|
+
...result,
|
|
119
|
+
endpoint: SEARCH_APP_V2_PATH,
|
|
120
|
+
fallbackUsedForEndpoint: false
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
} catch (error) {
|
|
124
|
+
if (!isRetryableUpstream(error)) throw error;
|
|
125
|
+
firstError = error;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
try {
|
|
129
|
+
const result = await this.request(SEARCH_WEB_V3_PATH, {
|
|
130
|
+
query: {
|
|
131
|
+
keyword,
|
|
132
|
+
page,
|
|
133
|
+
sort: sortType,
|
|
134
|
+
note_type: mapWebV3NoteType(noteType)
|
|
135
|
+
}
|
|
136
|
+
});
|
|
137
|
+
return {
|
|
138
|
+
...result,
|
|
139
|
+
endpoint: SEARCH_WEB_V3_PATH,
|
|
140
|
+
fallbackUsedForEndpoint: true
|
|
141
|
+
};
|
|
142
|
+
} catch (error) {
|
|
143
|
+
throw firstError || error;
|
|
144
|
+
}
|
|
33
145
|
}
|
|
34
146
|
|
|
35
|
-
getNoteDetail({ noteId }) {
|
|
36
|
-
|
|
147
|
+
async getNoteDetail({ noteId, noteType = '', shareText = '' }) {
|
|
148
|
+
const query = {
|
|
149
|
+
note_id: noteId,
|
|
150
|
+
share_text: shareText
|
|
151
|
+
};
|
|
152
|
+
const preferred = /video/i.test(String(noteType || ''))
|
|
153
|
+
? [DETAIL_VIDEO_PATH, DETAIL_IMAGE_PATH]
|
|
154
|
+
: [DETAIL_IMAGE_PATH, DETAIL_VIDEO_PATH];
|
|
155
|
+
|
|
156
|
+
let lastError;
|
|
157
|
+
for (const proxyPath of preferred) {
|
|
158
|
+
try {
|
|
159
|
+
const result = await this.request(proxyPath, { query });
|
|
160
|
+
if (hasNotePayload(result.data)) {
|
|
161
|
+
return {
|
|
162
|
+
...result,
|
|
163
|
+
endpoint: proxyPath,
|
|
164
|
+
fallbackUsedForEndpoint: false
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
} catch (error) {
|
|
168
|
+
if (!isRetryableUpstream(error)) throw error;
|
|
169
|
+
lastError = error;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
try {
|
|
174
|
+
const result = await this.request(DETAIL_APP_FALLBACK_PATH, {
|
|
175
|
+
query: {
|
|
176
|
+
note_id: noteId,
|
|
177
|
+
share_text: shareText
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
return {
|
|
181
|
+
...result,
|
|
182
|
+
endpoint: DETAIL_APP_FALLBACK_PATH,
|
|
183
|
+
fallbackUsedForEndpoint: true
|
|
184
|
+
};
|
|
185
|
+
} catch (error) {
|
|
186
|
+
throw lastError || error;
|
|
187
|
+
}
|
|
37
188
|
}
|
|
38
189
|
|
|
39
|
-
getNoteComments({ noteId, cursor = '' }) {
|
|
40
|
-
return this.request(
|
|
190
|
+
getNoteComments({ noteId, cursor = '', shareText = '', xsecToken = '' }) {
|
|
191
|
+
return this.request(COMMENTS_PATH, {
|
|
192
|
+
query: {
|
|
193
|
+
note_id: noteId,
|
|
194
|
+
cursor,
|
|
195
|
+
share_text: shareText,
|
|
196
|
+
xsec_token: xsecToken
|
|
197
|
+
}
|
|
198
|
+
});
|
|
41
199
|
}
|
|
42
200
|
}
|
|
43
201
|
|
|
44
202
|
module.exports = {
|
|
45
203
|
VOC_SOCIAL_API_ROOT,
|
|
204
|
+
XIAOHONGSHU_API_ROOT,
|
|
46
205
|
XIAOHONGSHU_APP_BASE_URL,
|
|
206
|
+
SEARCH_APP_V2_PATH,
|
|
207
|
+
SEARCH_WEB_V3_PATH,
|
|
208
|
+
DETAIL_IMAGE_PATH,
|
|
209
|
+
DETAIL_VIDEO_PATH,
|
|
210
|
+
COMMENTS_PATH,
|
|
211
|
+
normalizeXiaohongshuBaseUrl,
|
|
212
|
+
extractSearchItems,
|
|
213
|
+
hasNotePayload,
|
|
47
214
|
XiaohongshuApi
|
|
48
215
|
};
|
package/mcp/src/server.js
CHANGED
|
@@ -37,7 +37,7 @@ async function searchVocApis(input = {}) {
|
|
|
37
37
|
const matches = (query || input.platform || input.tag)
|
|
38
38
|
? searchEndpoints({ query, platform: input.platform, tag: input.tag, limit: input.limit || 20 })
|
|
39
39
|
: listEndpoints();
|
|
40
|
-
const results = matches.map(summarizeEndpoint);
|
|
40
|
+
const results = matches.map(summarizeEndpoint).filter(item => !item.deprecated);
|
|
41
41
|
const lines = [
|
|
42
42
|
'## VOC 转发接口清单',
|
|
43
43
|
'',
|
|
@@ -80,6 +80,12 @@ async function getVocApiDoc(input = {}) {
|
|
|
80
80
|
});
|
|
81
81
|
}
|
|
82
82
|
endpoint = hydrateEndpoint(endpoint);
|
|
83
|
+
if (endpoint.deprecated) {
|
|
84
|
+
const replacement = endpoint.replacedBy ? `请改用 ${endpoint.replacedBy}。` : '请用 voc_api_search 改选现用接口。';
|
|
85
|
+
return errorResult(`接口「${endpoint.id}」已下架。${replacement}`, {
|
|
86
|
+
data: { endpoint: summarizeEndpoint(endpoint) }
|
|
87
|
+
});
|
|
88
|
+
}
|
|
83
89
|
const paramLines = (endpoint.params || []).map(p => {
|
|
84
90
|
const flag = p.required ? '必填' : '可选';
|
|
85
91
|
const def = p.default !== undefined ? `,默认 ${JSON.stringify(p.default)}` : '';
|
package/package.json
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@vocmarket/voc-skill",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"description": "Claude Code VOC intelligence skills for Xiaohongshu, Douyin and WeChat Channels trend/content collection, live social VOC, Fmode image analysis, single-issue deep dives, boss/operator action plans, and multi-turn memory.",
|
|
5
|
-
"type": "commonjs",
|
|
6
|
-
"bin": {
|
|
7
|
-
"claude-voc": "bin/claude-voc.js"
|
|
8
|
-
},
|
|
9
|
-
"scripts": {
|
|
10
|
-
"install:check": "node install.js --check",
|
|
11
|
-
"install:smoke": "node install.js --smoke",
|
|
12
|
-
"smoke:package": "node scripts/smoke-package.js",
|
|
13
|
-
"smoke:cross-industry": "node scripts/smoke-cross-industry.js",
|
|
14
|
-
"fmode:image": "node mcp/src/tools/fmode-image-analysis.js",
|
|
15
|
-
"fmode:image:smoke": "node scripts/fmode-image-analysis-smoke.js",
|
|
16
|
-
"smoke:billing": "node scripts/billing-client-smoke.js",
|
|
17
|
-
"smoke:budget": "node scripts/smoke-budget-guard.js",
|
|
18
|
-
"smoke:trend-budget": "node scripts/smoke-trend-budget.js",
|
|
19
|
-
"smoke:cost": "node scripts/smoke-cost-estimate.js",
|
|
20
|
-
"smoke:cost-calibration": "node scripts/smoke-cost-calibration.js",
|
|
21
|
-
"smoke:media": "node scripts/smoke-media-pipeline.js",
|
|
22
|
-
"smoke:request": "node scripts/smoke-voc-request-shaping.js",
|
|
23
|
-
"audit:index": "node scripts/audit-index.js",
|
|
24
|
-
"xhs:sample": "node mcp/src/tools/xiaohongshu-trend-run.js --collection-mode sample --profile memory-templates/xiaohongshu-trend-profile.json --output ../outputs/claude-code-xhs-sample --result-prefix XHS_TREND_RESULT",
|
|
25
|
-
"xhs:preference-smoke": "node mcp/src/tools/xiaohongshu-preference-update.js --message \"保留奶油风和全屋定制翻车方向,不要纯风格美图,下一个版本更偏门店转化话术。\" --memory ../outputs/claude-code-xhs-memory-smoke/xiaohongshu-trend-memory.json --result-prefix XHS_PREF_RESULT",
|
|
26
|
-
"xhs:sample-with-memory": "node mcp/src/tools/xiaohongshu-trend-run.js --collection-mode sample --profile memory-templates/xiaohongshu-trend-profile.json --memory ../outputs/claude-code-xhs-memory-smoke/xiaohongshu-trend-memory.json --output ../outputs/claude-code-xhs-memory-smoke/report --result-prefix XHS_TREND_RESULT",
|
|
27
|
-
"xhs:live": "node mcp/src/tools/xiaohongshu-trend-run.js --collection-mode live --profile memory-templates/xiaohongshu-trend-profile.json --output ../outputs/claude-code-xhs-live --keyword-limit 1 --notes-per-keyword 1 --max-comment-pages 1 --result-prefix XHS_TREND_RESULT",
|
|
28
|
-
"dy:sample": "node mcp/src/tools/douyin-trend-run.js --collection-mode sample --profile memory-templates/douyin-trend-profile.json --output ../outputs/claude-code-douyin-sample --result-prefix DOUYIN_TREND_RESULT",
|
|
29
|
-
"dy:preference-smoke": "node mcp/src/tools/douyin-preference-update.js --message \"保留口播开头和评论区问题,不要只做纯素材剪辑,下一个版本更偏门店转化话术。\" --memory ../outputs/claude-code-douyin-memory-smoke/douyin-trend-memory.json --result-prefix DOUYIN_PREF_RESULT",
|
|
30
|
-
"dy:sample-with-memory": "node mcp/src/tools/douyin-trend-run.js --collection-mode sample --profile memory-templates/douyin-trend-profile.json --memory ../outputs/claude-code-douyin-memory-smoke/douyin-trend-memory.json --output ../outputs/claude-code-douyin-memory-smoke/report --result-prefix DOUYIN_TREND_RESULT",
|
|
31
|
-
"dy:live": "node mcp/src/tools/douyin-trend-run.js --collection-mode live --profile memory-templates/douyin-trend-profile.json --output ../outputs/claude-code-douyin-live --keyword-limit 1 --videos-per-keyword 1 --max-comment-pages 1 --result-prefix DOUYIN_TREND_RESULT",
|
|
32
|
-
"voc:issue-pool": "node mcp/src/tools/voc-issue-pool-run.js --project 示例品牌A --industry 家居定制 --scenario 线上获客 --audience 意向用户 --evidence \"第一次买不知道怎么选,怕踩雷。;价格有点高,不确定值不值。;咨询的时候没人理。\" --assistant-message-only",
|
|
33
|
-
"voc:deep-dive": "node mcp/src/tools/voc-problem-deep-dive-run.js --issue 怎么选 --industry 家居定制 --scenario 线上获客 --audience 意向用户 --assistant-message-only",
|
|
34
|
-
"voc:content-plan": "node mcp/src/tools/voc-content-plan-run.js --brand 示例品牌A --industry 家居定制 --issues \"第一次买怕踩雷;觉得价格贵;怕质量不稳定\" --assistant-message-only",
|
|
35
|
-
"voc:speaking-script": "node mcp/src/tools/voc-speaking-script-run.js --brand 示例品牌A --industry 家居定制 --topic \"第一次买怎么选不踩雷\" --user-issue \"第一次买怕选错\" --evidence \"第一次买不知道怎么选,怕踩雷\" --assistant-message-only",
|
|
36
|
-
"voc:competitor-map": "node mcp/src/tools/voc-competitor-map-run.js --brand 示例品牌A --city 本地 --category 家居定制 --assistant-message-only",
|
|
37
|
-
"voc:business-workflow": "node mcp/src/tools/voc-business-workflow-run.js --brand 示例品牌A --industry 家居定制 --platform douyin --collection-mode sample --keywords \"家居定制怎么选,第一次买怎么对比,售后\" --assistant-message-only",
|
|
38
|
-
"mcp:start": "node mcp/src/server.js",
|
|
39
|
-
"mcp:smoke": "node scripts/smoke-mcp.js",
|
|
40
|
-
"acceptance": "node scripts/acceptance.js",
|
|
41
|
-
"acceptance:installer": "node scripts/installer-acceptance.js"
|
|
42
|
-
},
|
|
43
|
-
"files": [
|
|
44
|
-
"SKILL.md",
|
|
45
|
-
".claude-plugin/",
|
|
46
|
-
".mcp.json",
|
|
47
|
-
"bin/",
|
|
48
|
-
"docs/",
|
|
49
|
-
"install.js",
|
|
50
|
-
"mcp/src/",
|
|
51
|
-
"mcp/catalog/params/",
|
|
52
|
-
"mcp/catalog/voc-social-endpoints.json",
|
|
53
|
-
"memory-templates/",
|
|
54
|
-
"package.json",
|
|
55
|
-
"README.md",
|
|
56
|
-
"scripts/",
|
|
57
|
-
"skill-package-manifest.json",
|
|
58
|
-
"skills/"
|
|
59
|
-
],
|
|
60
|
-
"publishConfig": {
|
|
61
|
-
"access": "public"
|
|
62
|
-
},
|
|
63
|
-
"keywords": [
|
|
64
|
-
"claude-code",
|
|
65
|
-
"voc",
|
|
66
|
-
"voice-of-customer",
|
|
67
|
-
"xiaohongshu",
|
|
68
|
-
"douyin",
|
|
69
|
-
"trend-intelligence",
|
|
70
|
-
"customer-insights",
|
|
71
|
-
"mcp",
|
|
72
|
-
"openclaw",
|
|
73
|
-
"social-listening"
|
|
74
|
-
],
|
|
75
|
-
"homepage": "https://www.npmjs.com/package/@vocmarket/voc-skill",
|
|
76
|
-
"dependencies": {
|
|
77
|
-
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
78
|
-
"zod": "^4.4.3"
|
|
79
|
-
}
|
|
80
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@vocmarket/voc-skill",
|
|
3
|
+
"version": "0.3.39",
|
|
4
|
+
"description": "Claude Code VOC intelligence skills for Xiaohongshu, Douyin and WeChat Channels trend/content collection, live social VOC, Fmode image analysis, single-issue deep dives, boss/operator action plans, and multi-turn memory.",
|
|
5
|
+
"type": "commonjs",
|
|
6
|
+
"bin": {
|
|
7
|
+
"claude-voc": "bin/claude-voc.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"install:check": "node install.js --check",
|
|
11
|
+
"install:smoke": "node install.js --smoke",
|
|
12
|
+
"smoke:package": "node scripts/smoke-package.js",
|
|
13
|
+
"smoke:cross-industry": "node scripts/smoke-cross-industry.js",
|
|
14
|
+
"fmode:image": "node mcp/src/tools/fmode-image-analysis.js",
|
|
15
|
+
"fmode:image:smoke": "node scripts/fmode-image-analysis-smoke.js",
|
|
16
|
+
"smoke:billing": "node scripts/billing-client-smoke.js",
|
|
17
|
+
"smoke:budget": "node scripts/smoke-budget-guard.js",
|
|
18
|
+
"smoke:trend-budget": "node scripts/smoke-trend-budget.js",
|
|
19
|
+
"smoke:cost": "node scripts/smoke-cost-estimate.js",
|
|
20
|
+
"smoke:cost-calibration": "node scripts/smoke-cost-calibration.js",
|
|
21
|
+
"smoke:media": "node scripts/smoke-media-pipeline.js",
|
|
22
|
+
"smoke:request": "node scripts/smoke-voc-request-shaping.js",
|
|
23
|
+
"audit:index": "node scripts/audit-index.js",
|
|
24
|
+
"xhs:sample": "node mcp/src/tools/xiaohongshu-trend-run.js --collection-mode sample --profile memory-templates/xiaohongshu-trend-profile.json --output ../outputs/claude-code-xhs-sample --result-prefix XHS_TREND_RESULT",
|
|
25
|
+
"xhs:preference-smoke": "node mcp/src/tools/xiaohongshu-preference-update.js --message \"保留奶油风和全屋定制翻车方向,不要纯风格美图,下一个版本更偏门店转化话术。\" --memory ../outputs/claude-code-xhs-memory-smoke/xiaohongshu-trend-memory.json --result-prefix XHS_PREF_RESULT",
|
|
26
|
+
"xhs:sample-with-memory": "node mcp/src/tools/xiaohongshu-trend-run.js --collection-mode sample --profile memory-templates/xiaohongshu-trend-profile.json --memory ../outputs/claude-code-xhs-memory-smoke/xiaohongshu-trend-memory.json --output ../outputs/claude-code-xhs-memory-smoke/report --result-prefix XHS_TREND_RESULT",
|
|
27
|
+
"xhs:live": "node mcp/src/tools/xiaohongshu-trend-run.js --collection-mode live --profile memory-templates/xiaohongshu-trend-profile.json --output ../outputs/claude-code-xhs-live --keyword-limit 1 --notes-per-keyword 1 --max-comment-pages 1 --result-prefix XHS_TREND_RESULT",
|
|
28
|
+
"dy:sample": "node mcp/src/tools/douyin-trend-run.js --collection-mode sample --profile memory-templates/douyin-trend-profile.json --output ../outputs/claude-code-douyin-sample --result-prefix DOUYIN_TREND_RESULT",
|
|
29
|
+
"dy:preference-smoke": "node mcp/src/tools/douyin-preference-update.js --message \"保留口播开头和评论区问题,不要只做纯素材剪辑,下一个版本更偏门店转化话术。\" --memory ../outputs/claude-code-douyin-memory-smoke/douyin-trend-memory.json --result-prefix DOUYIN_PREF_RESULT",
|
|
30
|
+
"dy:sample-with-memory": "node mcp/src/tools/douyin-trend-run.js --collection-mode sample --profile memory-templates/douyin-trend-profile.json --memory ../outputs/claude-code-douyin-memory-smoke/douyin-trend-memory.json --output ../outputs/claude-code-douyin-memory-smoke/report --result-prefix DOUYIN_TREND_RESULT",
|
|
31
|
+
"dy:live": "node mcp/src/tools/douyin-trend-run.js --collection-mode live --profile memory-templates/douyin-trend-profile.json --output ../outputs/claude-code-douyin-live --keyword-limit 1 --videos-per-keyword 1 --max-comment-pages 1 --result-prefix DOUYIN_TREND_RESULT",
|
|
32
|
+
"voc:issue-pool": "node mcp/src/tools/voc-issue-pool-run.js --project 示例品牌A --industry 家居定制 --scenario 线上获客 --audience 意向用户 --evidence \"第一次买不知道怎么选,怕踩雷。;价格有点高,不确定值不值。;咨询的时候没人理。\" --assistant-message-only",
|
|
33
|
+
"voc:deep-dive": "node mcp/src/tools/voc-problem-deep-dive-run.js --issue 怎么选 --industry 家居定制 --scenario 线上获客 --audience 意向用户 --assistant-message-only",
|
|
34
|
+
"voc:content-plan": "node mcp/src/tools/voc-content-plan-run.js --brand 示例品牌A --industry 家居定制 --issues \"第一次买怕踩雷;觉得价格贵;怕质量不稳定\" --assistant-message-only",
|
|
35
|
+
"voc:speaking-script": "node mcp/src/tools/voc-speaking-script-run.js --brand 示例品牌A --industry 家居定制 --topic \"第一次买怎么选不踩雷\" --user-issue \"第一次买怕选错\" --evidence \"第一次买不知道怎么选,怕踩雷\" --assistant-message-only",
|
|
36
|
+
"voc:competitor-map": "node mcp/src/tools/voc-competitor-map-run.js --brand 示例品牌A --city 本地 --category 家居定制 --assistant-message-only",
|
|
37
|
+
"voc:business-workflow": "node mcp/src/tools/voc-business-workflow-run.js --brand 示例品牌A --industry 家居定制 --platform douyin --collection-mode sample --keywords \"家居定制怎么选,第一次买怎么对比,售后\" --assistant-message-only",
|
|
38
|
+
"mcp:start": "node mcp/src/server.js",
|
|
39
|
+
"mcp:smoke": "node scripts/smoke-mcp.js",
|
|
40
|
+
"acceptance": "node scripts/acceptance.js",
|
|
41
|
+
"acceptance:installer": "node scripts/installer-acceptance.js"
|
|
42
|
+
},
|
|
43
|
+
"files": [
|
|
44
|
+
"SKILL.md",
|
|
45
|
+
".claude-plugin/",
|
|
46
|
+
".mcp.json",
|
|
47
|
+
"bin/",
|
|
48
|
+
"docs/",
|
|
49
|
+
"install.js",
|
|
50
|
+
"mcp/src/",
|
|
51
|
+
"mcp/catalog/params/",
|
|
52
|
+
"mcp/catalog/voc-social-endpoints.json",
|
|
53
|
+
"memory-templates/",
|
|
54
|
+
"package.json",
|
|
55
|
+
"README.md",
|
|
56
|
+
"scripts/",
|
|
57
|
+
"skill-package-manifest.json",
|
|
58
|
+
"skills/"
|
|
59
|
+
],
|
|
60
|
+
"publishConfig": {
|
|
61
|
+
"access": "public"
|
|
62
|
+
},
|
|
63
|
+
"keywords": [
|
|
64
|
+
"claude-code",
|
|
65
|
+
"voc",
|
|
66
|
+
"voice-of-customer",
|
|
67
|
+
"xiaohongshu",
|
|
68
|
+
"douyin",
|
|
69
|
+
"trend-intelligence",
|
|
70
|
+
"customer-insights",
|
|
71
|
+
"mcp",
|
|
72
|
+
"openclaw",
|
|
73
|
+
"social-listening"
|
|
74
|
+
],
|
|
75
|
+
"homepage": "https://www.npmjs.com/package/@vocmarket/voc-skill",
|
|
76
|
+
"dependencies": {
|
|
77
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
78
|
+
"zod": "^4.4.3"
|
|
79
|
+
}
|
|
80
|
+
}
|
package/scripts/smoke-package.js
CHANGED
|
@@ -515,7 +515,7 @@ async function smokeBusinessStatusErrors() {
|
|
|
515
515
|
global.fetch = makeBusinessErrorFetch();
|
|
516
516
|
await new XiaohongshuApi({
|
|
517
517
|
token: 'r:smoke-token',
|
|
518
|
-
baseUrl: 'https://example.test/xiaohongshu
|
|
518
|
+
baseUrl: 'https://example.test/xiaohongshu'
|
|
519
519
|
}).searchNotes({ keyword: 'smoke' });
|
|
520
520
|
throw new Error('xiaohongshu business status 403 did not throw');
|
|
521
521
|
} catch (error) {
|
|
@@ -1,137 +1,137 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "claude-code-voc-intelligence",
|
|
3
|
-
"version": "0.3.
|
|
4
|
-
"capabilities": {
|
|
5
|
-
"summary": "三类情报源同源接入:①社媒内容(含抖音/小红书/微信视频号等)②国内电商+创作者情报 ③海外选品。统一 search→doc→call、鉴权计费一致。",
|
|
6
|
-
"channels": [
|
|
7
|
-
{
|
|
8
|
-
"key": "social",
|
|
9
|
-
"label": "社媒内容",
|
|
10
|
-
"platforms": 18,
|
|
11
|
-
"apis": 1018,
|
|
12
|
-
"examples": [
|
|
13
|
-
"抖音",
|
|
14
|
-
"小红书",
|
|
15
|
-
"TikTok",
|
|
16
|
-
"YouTube",
|
|
17
|
-
"微博",
|
|
18
|
-
"哔哩哔哩",
|
|
19
|
-
"快手",
|
|
20
|
-
"知乎",
|
|
21
|
-
"Instagram",
|
|
22
|
-
"Reddit",
|
|
23
|
-
"Twitter/X",
|
|
24
|
-
"微信/视频号"
|
|
25
|
-
]
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
"key": "ecommerce",
|
|
29
|
-
"label": "国内电商 + 创作者情报",
|
|
30
|
-
"platforms": 32,
|
|
31
|
-
"apis": 289,
|
|
32
|
-
"examples": [
|
|
33
|
-
"京东",
|
|
34
|
-
"淘宝天猫",
|
|
35
|
-
"1688",
|
|
36
|
-
"抖音电商",
|
|
37
|
-
"TikTok Shop",
|
|
38
|
-
"闲鱼",
|
|
39
|
-
"得物",
|
|
40
|
-
"抖音星图",
|
|
41
|
-
"小红书蒲公英"
|
|
42
|
-
]
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"key": "overseas",
|
|
46
|
-
"label": "海外选品",
|
|
47
|
-
"platforms": 1,
|
|
48
|
-
"apis": 37,
|
|
49
|
-
"examples": [
|
|
50
|
-
"亚马逊"
|
|
51
|
-
]
|
|
52
|
-
}
|
|
53
|
-
],
|
|
54
|
-
"totals": {
|
|
55
|
-
"platforms": 51,
|
|
56
|
-
"apis": 1344
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
"description": "Claude Code native VOC intelligence package for cross-industry social VOC workflows. Includes Xiaohongshu, Douyin and WeChat Channels collection/intelligence, live token checks, evidence-card reports, single-issue VOC deep dives, boss/operator action plans, and scoped multi-turn memory.",
|
|
60
|
-
"changelogUrl": "https://www.npmjs.com/package/@vocmarket/voc-skill?activeTab=versions",
|
|
61
|
-
"plugin": "voc-intelligence",
|
|
62
|
-
"skills": [
|
|
63
|
-
"xiaohongshu-trend-intelligence",
|
|
64
|
-
"douyin-trend-intelligence",
|
|
65
|
-
"voc-issue-pool",
|
|
66
|
-
"voc-problem-deep-dive",
|
|
67
|
-
"voc-content-plan",
|
|
68
|
-
"voc-speaking-script",
|
|
69
|
-
"voc-competitor-map",
|
|
70
|
-
"voc-business-workflow",
|
|
71
|
-
"fmode-image-analysis",
|
|
72
|
-
"voc-api-catalog",
|
|
73
|
-
"voc-cost-controller"
|
|
74
|
-
],
|
|
75
|
-
"mcpTools": [
|
|
76
|
-
"fmode_image_analysis",
|
|
77
|
-
"voc_business_workflow_run",
|
|
78
|
-
"voc_speaking_script_run",
|
|
79
|
-
"voc_issue_pool_run",
|
|
80
|
-
"voc_problem_deep_dive_run",
|
|
81
|
-
"voc_content_plan_run",
|
|
82
|
-
"voc_competitor_map_run",
|
|
83
|
-
"voc_xiaohongshu_token_check",
|
|
84
|
-
"voc_xiaohongshu_trend_run",
|
|
85
|
-
"voc_xiaohongshu_preference_update",
|
|
86
|
-
"voc_douyin_token_check",
|
|
87
|
-
"voc_douyin_trend_run",
|
|
88
|
-
"voc_douyin_preference_update",
|
|
89
|
-
"voc_api_search",
|
|
90
|
-
"voc_api_doc",
|
|
91
|
-
"voc_api_call",
|
|
92
|
-
"voc_billing_query",
|
|
93
|
-
"voc_cost_estimate",
|
|
94
|
-
"voc_usage_report"
|
|
95
|
-
],
|
|
96
|
-
"apiCatalog": "mcp/catalog/voc-social-endpoints.json",
|
|
97
|
-
"entrySkill": "voc-business-workflow",
|
|
98
|
-
"capabilityMap": "docs/capability-map.md",
|
|
99
|
-
"taobaoV7Doc": "docs/taobao-item-detail-v7.md",
|
|
100
|
-
"bossPromptTemplates": "docs/boss-prompt-templates.md",
|
|
101
|
-
"liveAcceptanceChecklist": "docs/live-manual-acceptance-checklist.md",
|
|
102
|
-
"troubleshootingPlaybook": "docs/claude-code-troubleshooting-playbook.md",
|
|
103
|
-
"paymentLinksDoc": "docs/payment-package-links.md",
|
|
104
|
-
"contextBudgetDoc": "docs/context-budget-implementation-plan.md",
|
|
105
|
-
"costMeteringSpec": "docs/voc-cost-metering-and-balance-implementation-spec.md",
|
|
106
|
-
"apiErrorCodesDoc": "skills/voc-api-catalog/references/error-codes.md",
|
|
107
|
-
"primaryUseCases": [
|
|
108
|
-
"First-round Xiaohongshu or Douyin trend intelligence from sample or live collection",
|
|
109
|
-
"Evidence-first customer concern and opportunity reports",
|
|
110
|
-
"Prioritized VOC issue pools with status, evidence, impact, and next actions",
|
|
111
|
-
"Single VOC problem deep dive into boss/operator actions and 7-day validation plans",
|
|
112
|
-
"7-day VOC content plans with speaking scripts and validation metrics",
|
|
113
|
-
"VOC-backed speaking script co-creation with revision, finalization, and script memory",
|
|
114
|
-
"End-to-end VOC business workflow from market voices to issue, action, content, and script",
|
|
115
|
-
"Competitor maps and differentiated opportunity reports from VOC evidence",
|
|
116
|
-
"Interface catalog lookup and generic VOC gateway calls across social, ecommerce, and overseas channels",
|
|
117
|
-
"Preflight cost estimates, balance checks, budget controls, and post-run usage reports",
|
|
118
|
-
"Fmode Doubao vision image analysis for screenshots, product images, UI captures, charts, posters, and image text",
|
|
119
|
-
"Multi-turn preference and scoped memory so repeated use gets more tailored",
|
|
120
|
-
"Friendly token and recharge handling for live collection"
|
|
121
|
-
],
|
|
122
|
-
"recommendedUserPrompts": [
|
|
123
|
-
"帮我做一份家装全屋定制行业的小红书趋势情报。先用演示样例跑通流程,不要真实采集。",
|
|
124
|
-
"帮我看下家居定制行业抖音上用户最近在吐槽什么,先小规模真实采集。",
|
|
125
|
-
"继续深挖“怎么选”这个问题,站在老板视角告诉我怎么解决。",
|
|
126
|
-
"监听 280 个账号并生成日报,先给我经济版、标准版和完整版的预计成本、余额风险和降本建议。",
|
|
127
|
-
"查一下这份报告实际调用了哪些接口、各调用多少次、分别消耗了多少额度。"
|
|
128
|
-
],
|
|
129
|
-
"sampleCommand": "npm run xhs:sample",
|
|
130
|
-
"mcpSmokeCommand": "npm run mcp:smoke",
|
|
131
|
-
"installCommand": "node install.js",
|
|
132
|
-
"npmInstallCommand": "npm install -g @vocmarket/voc-skill && claude-voc install",
|
|
133
|
-
"npxInstallCommand": "npx @vocmarket/voc-skill install",
|
|
134
|
-
"workspaceInstallCommand": "npx @vocmarket/voc-skill workspace --smoke",
|
|
135
|
-
"workspaceInstallTarget": ".claude/plugins/voc-intelligence",
|
|
136
|
-
"installHint": "Supports three delivery modes: unzip and run node install.js, install globally into ~/.claude/plugins/voc-intelligence, or install into the current workspace. Workspace mode writes .mcp.json plus .claude/skills/* entries for trend intelligence, issue pool, deep dive, competitor map, content plan, speaking script, VOC business workflow, Fmode image analysis, API catalog, and cost controller so VSCode Claude Code can discover all workflows without relying only on --plugin-dir."
|
|
137
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "claude-code-voc-intelligence",
|
|
3
|
+
"version": "0.3.39",
|
|
4
|
+
"capabilities": {
|
|
5
|
+
"summary": "三类情报源同源接入:①社媒内容(含抖音/小红书/微信视频号等)②国内电商+创作者情报 ③海外选品。统一 search→doc→call、鉴权计费一致。",
|
|
6
|
+
"channels": [
|
|
7
|
+
{
|
|
8
|
+
"key": "social",
|
|
9
|
+
"label": "社媒内容",
|
|
10
|
+
"platforms": 18,
|
|
11
|
+
"apis": 1018,
|
|
12
|
+
"examples": [
|
|
13
|
+
"抖音",
|
|
14
|
+
"小红书",
|
|
15
|
+
"TikTok",
|
|
16
|
+
"YouTube",
|
|
17
|
+
"微博",
|
|
18
|
+
"哔哩哔哩",
|
|
19
|
+
"快手",
|
|
20
|
+
"知乎",
|
|
21
|
+
"Instagram",
|
|
22
|
+
"Reddit",
|
|
23
|
+
"Twitter/X",
|
|
24
|
+
"微信/视频号"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"key": "ecommerce",
|
|
29
|
+
"label": "国内电商 + 创作者情报",
|
|
30
|
+
"platforms": 32,
|
|
31
|
+
"apis": 289,
|
|
32
|
+
"examples": [
|
|
33
|
+
"京东",
|
|
34
|
+
"淘宝天猫",
|
|
35
|
+
"1688",
|
|
36
|
+
"抖音电商",
|
|
37
|
+
"TikTok Shop",
|
|
38
|
+
"闲鱼",
|
|
39
|
+
"得物",
|
|
40
|
+
"抖音星图",
|
|
41
|
+
"小红书蒲公英"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"key": "overseas",
|
|
46
|
+
"label": "海外选品",
|
|
47
|
+
"platforms": 1,
|
|
48
|
+
"apis": 37,
|
|
49
|
+
"examples": [
|
|
50
|
+
"亚马逊"
|
|
51
|
+
]
|
|
52
|
+
}
|
|
53
|
+
],
|
|
54
|
+
"totals": {
|
|
55
|
+
"platforms": 51,
|
|
56
|
+
"apis": 1344
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"description": "Claude Code native VOC intelligence package for cross-industry social VOC workflows. Includes Xiaohongshu, Douyin and WeChat Channels collection/intelligence, live token checks, evidence-card reports, single-issue VOC deep dives, boss/operator action plans, and scoped multi-turn memory.",
|
|
60
|
+
"changelogUrl": "https://www.npmjs.com/package/@vocmarket/voc-skill?activeTab=versions",
|
|
61
|
+
"plugin": "voc-intelligence",
|
|
62
|
+
"skills": [
|
|
63
|
+
"xiaohongshu-trend-intelligence",
|
|
64
|
+
"douyin-trend-intelligence",
|
|
65
|
+
"voc-issue-pool",
|
|
66
|
+
"voc-problem-deep-dive",
|
|
67
|
+
"voc-content-plan",
|
|
68
|
+
"voc-speaking-script",
|
|
69
|
+
"voc-competitor-map",
|
|
70
|
+
"voc-business-workflow",
|
|
71
|
+
"fmode-image-analysis",
|
|
72
|
+
"voc-api-catalog",
|
|
73
|
+
"voc-cost-controller"
|
|
74
|
+
],
|
|
75
|
+
"mcpTools": [
|
|
76
|
+
"fmode_image_analysis",
|
|
77
|
+
"voc_business_workflow_run",
|
|
78
|
+
"voc_speaking_script_run",
|
|
79
|
+
"voc_issue_pool_run",
|
|
80
|
+
"voc_problem_deep_dive_run",
|
|
81
|
+
"voc_content_plan_run",
|
|
82
|
+
"voc_competitor_map_run",
|
|
83
|
+
"voc_xiaohongshu_token_check",
|
|
84
|
+
"voc_xiaohongshu_trend_run",
|
|
85
|
+
"voc_xiaohongshu_preference_update",
|
|
86
|
+
"voc_douyin_token_check",
|
|
87
|
+
"voc_douyin_trend_run",
|
|
88
|
+
"voc_douyin_preference_update",
|
|
89
|
+
"voc_api_search",
|
|
90
|
+
"voc_api_doc",
|
|
91
|
+
"voc_api_call",
|
|
92
|
+
"voc_billing_query",
|
|
93
|
+
"voc_cost_estimate",
|
|
94
|
+
"voc_usage_report"
|
|
95
|
+
],
|
|
96
|
+
"apiCatalog": "mcp/catalog/voc-social-endpoints.json",
|
|
97
|
+
"entrySkill": "voc-business-workflow",
|
|
98
|
+
"capabilityMap": "docs/capability-map.md",
|
|
99
|
+
"taobaoV7Doc": "docs/taobao-item-detail-v7.md",
|
|
100
|
+
"bossPromptTemplates": "docs/boss-prompt-templates.md",
|
|
101
|
+
"liveAcceptanceChecklist": "docs/live-manual-acceptance-checklist.md",
|
|
102
|
+
"troubleshootingPlaybook": "docs/claude-code-troubleshooting-playbook.md",
|
|
103
|
+
"paymentLinksDoc": "docs/payment-package-links.md",
|
|
104
|
+
"contextBudgetDoc": "docs/context-budget-implementation-plan.md",
|
|
105
|
+
"costMeteringSpec": "docs/voc-cost-metering-and-balance-implementation-spec.md",
|
|
106
|
+
"apiErrorCodesDoc": "skills/voc-api-catalog/references/error-codes.md",
|
|
107
|
+
"primaryUseCases": [
|
|
108
|
+
"First-round Xiaohongshu or Douyin trend intelligence from sample or live collection",
|
|
109
|
+
"Evidence-first customer concern and opportunity reports",
|
|
110
|
+
"Prioritized VOC issue pools with status, evidence, impact, and next actions",
|
|
111
|
+
"Single VOC problem deep dive into boss/operator actions and 7-day validation plans",
|
|
112
|
+
"7-day VOC content plans with speaking scripts and validation metrics",
|
|
113
|
+
"VOC-backed speaking script co-creation with revision, finalization, and script memory",
|
|
114
|
+
"End-to-end VOC business workflow from market voices to issue, action, content, and script",
|
|
115
|
+
"Competitor maps and differentiated opportunity reports from VOC evidence",
|
|
116
|
+
"Interface catalog lookup and generic VOC gateway calls across social, ecommerce, and overseas channels",
|
|
117
|
+
"Preflight cost estimates, balance checks, budget controls, and post-run usage reports",
|
|
118
|
+
"Fmode Doubao vision image analysis for screenshots, product images, UI captures, charts, posters, and image text",
|
|
119
|
+
"Multi-turn preference and scoped memory so repeated use gets more tailored",
|
|
120
|
+
"Friendly token and recharge handling for live collection"
|
|
121
|
+
],
|
|
122
|
+
"recommendedUserPrompts": [
|
|
123
|
+
"帮我做一份家装全屋定制行业的小红书趋势情报。先用演示样例跑通流程,不要真实采集。",
|
|
124
|
+
"帮我看下家居定制行业抖音上用户最近在吐槽什么,先小规模真实采集。",
|
|
125
|
+
"继续深挖“怎么选”这个问题,站在老板视角告诉我怎么解决。",
|
|
126
|
+
"监听 280 个账号并生成日报,先给我经济版、标准版和完整版的预计成本、余额风险和降本建议。",
|
|
127
|
+
"查一下这份报告实际调用了哪些接口、各调用多少次、分别消耗了多少额度。"
|
|
128
|
+
],
|
|
129
|
+
"sampleCommand": "npm run xhs:sample",
|
|
130
|
+
"mcpSmokeCommand": "npm run mcp:smoke",
|
|
131
|
+
"installCommand": "node install.js",
|
|
132
|
+
"npmInstallCommand": "npm install -g @vocmarket/voc-skill && claude-voc install",
|
|
133
|
+
"npxInstallCommand": "npx @vocmarket/voc-skill install",
|
|
134
|
+
"workspaceInstallCommand": "npx @vocmarket/voc-skill workspace --smoke",
|
|
135
|
+
"workspaceInstallTarget": ".claude/plugins/voc-intelligence",
|
|
136
|
+
"installHint": "Supports three delivery modes: unzip and run node install.js, install globally into ~/.claude/plugins/voc-intelligence, or install into the current workspace. Workspace mode writes .mcp.json plus .claude/skills/* entries for trend intelligence, issue pool, deep dive, competitor map, content plan, speaking script, VOC business workflow, Fmode image analysis, API catalog, and cost controller so VSCode Claude Code can discover all workflows without relying only on --plugin-dir."
|
|
137
|
+
}
|
|
@@ -46,6 +46,25 @@ VOC 后端是一个**通用转发网关**(`https://server.fmode.cn/api/voc-soc
|
|
|
46
46
|
4. `voc_api_call` 用真实关键词调用;翻页/拉评论时把上一次返回里的 cursor / id 透传进下一次调用。
|
|
47
47
|
5. 用返回数据继续后续分析(可交给 voc-issue-pool、voc-content-plan 等技能)。
|
|
48
48
|
|
|
49
|
+
## 小红书现用接口(V2)
|
|
50
|
+
|
|
51
|
+
小红书社媒采集只走下面这些健康的 V2 接口。`voc_api_search` 会把它们排在前面;标了 `deprecated` 的旧接口不要调用,也不要在给用户的说明里提到。
|
|
52
|
+
|
|
53
|
+
| 用途 | 接口 id | proxyPath | 必填 |
|
|
54
|
+
|---|---|---|---|
|
|
55
|
+
| 笔记搜索 | `xiaohongshu.app_v2.search_notes` | `xiaohongshu/app_v2/search_notes` | `keyword` |
|
|
56
|
+
| 图文详情 | `xiaohongshu.app_v2.get_image_note_detail` | `xiaohongshu/app_v2/get_image_note_detail` | `note_id` 或 `share_text` |
|
|
57
|
+
| 视频详情 | `xiaohongshu.app_v2.get_video_note_detail` | `xiaohongshu/app_v2/get_video_note_detail` | `note_id` 或 `share_text` |
|
|
58
|
+
| 一级评论 | `xiaohongshu.note_comments` | `xiaohongshu/app_v2/get_note_comments` | `note_id` |
|
|
59
|
+
| 楼中楼 | `xiaohongshu.sub_comments` | `xiaohongshu/app_v2/get_note_sub_comments` | `note_id` + `comment_id` |
|
|
60
|
+
| 用户资料 | `xiaohongshu.app_v2.get_user_info` | `xiaohongshu/app_v2/get_user_info` | `user_id` |
|
|
61
|
+
| 用户笔记 | `xiaohongshu.app_v2.get_user_posted_notes` | `xiaohongshu/app_v2/get_user_posted_notes` | `user_id` |
|
|
62
|
+
| 话题详情 | `xiaohongshu.app_v2.get_topic_info` | `xiaohongshu/app_v2/get_topic_info` | `page_id` |
|
|
63
|
+
| 话题笔记 | `xiaohongshu.app_v2.get_topic_feed` | `xiaohongshu/app_v2/get_topic_feed` | `page_id` |
|
|
64
|
+
| 商品搜索 | `xiaohongshu.app_v2.search_products` | `xiaohongshu/app_v2/search_products` | `keyword` |
|
|
65
|
+
|
|
66
|
+
搜索先用 `xiaohongshu.app_v2.search_notes` 拿 `note_id`,再按笔记类型选图文或视频详情,评论和楼中楼继续用上表两条。不确定类型时先试视频详情,空结果再试图文详情。具体参数用 `voc_api_doc` 读取,不要手写旧路径。
|
|
67
|
+
|
|
49
68
|
## 创作者侧情报(channel=ecommerce)
|
|
50
69
|
|
|
51
70
|
抖音星图 / 小红书蒲公英(PGY)的创作者数据是 VOC 在**创作者生态**维度的情报源——它服务的是 VOC 一贯的「内容战略、竞对理解、受众洞察、选题与脚本」闭环,而**不是**「替用户挑达人投广告」。同一套数据用来回答这些 VOC 问题:
|
|
@@ -14,6 +14,14 @@ live 模式默认保持小规模:
|
|
|
14
14
|
- `notesPerKeyword = 1`
|
|
15
15
|
- `maxCommentPages = 1`
|
|
16
16
|
|
|
17
|
+
## 接口优先级
|
|
18
|
+
|
|
19
|
+
live 采集只走健康的 V2:
|
|
20
|
+
|
|
21
|
+
- 搜索:`app_v2/search_notes`,空结果再降级 `web_v3/fetch_search_notes`
|
|
22
|
+
- 详情:视频笔记用 `app_v2/get_video_note_detail`,图文笔记用 `app_v2/get_image_note_detail`
|
|
23
|
+
- 评论:`app_v2/get_note_comments`
|
|
24
|
+
|
|
17
25
|
## 媒体持久化
|
|
18
26
|
|
|
19
27
|
响应中的图片、视频、音频、封面、买家秀和详情素材始终写入本地 `assets/`,并登记到 `media-manifest.json`。旧 `cacheAssets` 参数仅作兼容,传 `false` 也不会跳过持久化;报告只引用本地路径。
|