关于 xiaohongshu-tools
为小红书技能系列提供本地数据处理脚本的执行支持。它限定使用指定的采集键,并涵盖数据规范化、账号与笔记排名、评论聚类,以及主题图和商家报告生成。
主要功能
- 01运行受支持的小红书采集键
- 02规范化采集数据集
- 03排名账号、笔记和商品
- 04聚类评论
- 05生成主题图和商家报告
适用场景
- 01处理采集的小红书账号笔记
- 02分析小红书搜索结果
- 03生成账号或商品排名
安装
复制下面的命令,在终端中运行。
$
npx skills add https:/ / github.com/ postplusai/ postplus-skills --skill xiaohongshu-tools安装后在 Claude Code 中输入/xiaohongshu-tools确认已加载。
包含的文件
除 SKILL.md 外,安装时一起下载的参考资料和脚本。
_postplus_shared/00-core/shared-collection/scripts/collection_actor_run.mjs_postplus_shared/00-core/shared-collection/scripts/lib/hosted_collection_bridge.mjs_postplus_shared/00-core/shared-runtime/scripts/download_videos_from_manifest_with_ytdlp.mjs_postplus_shared/00-core/shared-runtime/scripts/lib/execution_approval.mjshosted_billing_summary.mjshosted_execution_protocol.mjshosted_media_generation_bridge.mjslocal_skill_cli.mjsnetwork_runtime.mjspostplus_cli_config.mjspostplus_cloud_client.mjsskill_runtime.mjsscripts/build_xhs_merchant_report.mjsbuild_xhs_topic_map.mjscluster_xhs_comments.mjsextract_xhs_vendor_page_products.mjsnormalize_xhs_dataset.mjsrank_xhs_accounts.mjsrank_xhs_posts.mjsrank_xhs_products.mjsrun_xhs_actor.mjsscripts/lib/xhs_common.mjs详细介绍
小红书工具
请遵循以下共享公共技能规则:
postplus-shared公共技能规则
在实现或运行小红书技能族的本地执行层时,请使用本技能。
主要脚本:
scripts/run_xhs_actor.mjsscripts/normalize_xhs_dataset.mjsscripts/extract_xhs_vendor_page_products.mjsscripts/rank_xhs_accounts.mjsscripts/rank_xhs_posts.mjsscripts/cluster_xhs_comments.mjsscripts/rank_xhs_products.mjsscripts/build_xhs_topic_map.mjsscripts/build_xhs_merchant_report.mjs
共享辅助模块:
scripts/lib/xhs_common.mjs
参考契约:
../xiaohongshu-references/tool-contracts.md../xiaohongshu-references/normalized-schema.md
执行规则
除非 schema 确实要求,否则不要自行发明 actor 专属的下游工作流。
优先使用:
scripts/run_xhs_actor.mjs${CLAUDE_SKILL_DIR}/_postplus_shared/00-core/shared-collection/scripts/collection_actor_run.mjs
在原始数据收集完成后,本技能应专注于稳定的本地契约。
支持的采集键
本支持技能只能运行以下 PostPlus 公共采集键:
xhs-account-postsxhs-search
最小运行示例:
node ${CLAUDE_SKILL_DIR}/scripts/run_xhs_actor.mjs \
--collection-key xhs-account-posts \
--input <work-folder>/.postplus/xiaohongshu-tools/xhs-account-posts-input.json \
--output <work-folder>/.postplus/xiaohongshu-tools/xhs-account-posts-raw.json
node ${CLAUDE_SKILL_DIR}/scripts/run_xhs_actor.mjs \
--collection-key xhs-search \
--input <work-folder>/.postplus/xiaohongshu-tools/xhs-search-input.json \
--output <work-folder>/.postplus/xiaohongshu-tools/xhs-search-raw.json
不要传入提供商专属的采集名称或未发布的键。
公共技能执行契约
- 将 actor 输入、原始数据集、规范化数据集、排名输出、
聚类评论、商品排名和话题图谱保留在
<work-folder>/.postplus/xiaohongshu-tools/下 - 仅将最终面向用户的候选清单或报告保留在
.postplus/之外 - 在更大范围采集之前,先进行一次有界的第一轮采集
- 如果 PostPlus Cloud 服务不可用、未授权,或返回稳定的 网络错误,请立即停止,而不要切换到临时的 shell 拼接方案
评论
支持 Markdown