mcpField
X
xiaohongshu-content-benchmark

xiaohongshu-content-benchmark

github.com/postplusai营销与增长27138 次安装1 天前更新
代码仓库

关于 xiaohongshu-content-benchmark

用于分析小红书账号或明确指定的关键词搜索的技能。它收集并规范化笔记数据,按点赞信号和主题相关性排序,再归纳常见钩子、标题模式、封面形态及内容类型。

主要功能

  1. 01分析账号笔记或指定关键词
  2. 02收集并规范化笔记数据
  3. 03按点赞信号和主题相关性排序
  4. 04归纳标题与封面模式
  5. 05标记缺失数据和数据集问题

适用场景

  1. 01比较指定小红书账号的近期笔记
  2. 02查找反复出现的标题钩子和封面模式
  3. 03筛选用于卡片改编的笔记示例
  4. 04查看基准样本中的内容类型分布

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/postplusai/postplus-skills --skill xiaohongshu-content-benchmark

安装后在 Claude Code 中输入/xiaohongshu-content-benchmark确认已加载。

包含的文件

除 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.mjs
hosted_billing_summary.mjs
hosted_execution_protocol.mjs
hosted_media_generation_bridge.mjs
local_skill_cli.mjs
network_runtime.mjs
postplus_cli_config.mjs
postplus_cloud_client.mjs
skill_runtime.mjs
_postplus_shared/scripts/lib/
campaign-report-manifest.mjs
references/
actor-selection.md
brief-schema.md
normalized-schema.md
scripts/
analyze_xhs_benchmark_dataset.mjs
build_xhs_benchmark_actor_input.mjs
normalize_xhs_benchmark_dataset.mjs
rank_xhs_benchmark_posts.mjs
scripts/lib/
xhs_common.mjs

详细介绍

XHS 内容基准

遵循以下共享公共 skill 规则:

  • postplus-shared 公共 skill 规则

旧别名:xhs-content-benchmark。

当用户想要执行以下操作时,使用此 skill:

  • 在小红书上对竞品或灵感账号进行基准分析
  • 识别反复出现的小红书标题钩子和封面模式
  • 在将其改编为本地 XHS 卡片之前,筛选出优秀的笔记示例
  • 比较一个或多个已知小红书主页的近期发布内容

在实现之前阅读以下参考资料:

  • skills/20-research/xhs-content-benchmark/references/actor-selection.md
  • skills/20-research/xhs-content-benchmark/references/brief-schema.md
  • skills/20-research/xhs-content-benchmark/references/normalized-schema.md

默认姿态

从基于账号的基准分析开始,而不是宽泛的关键词搜索。

默认起始界面:

  • 已知主页 URL -> 近期发布基准池

不要将此作为默认的第一界面:

  • 关键词或话题搜索作为第一采集界面

不要在界面之间静默切换。 如果用户要求关键词搜索,请显式使用关键词搜索路径,并在返回无结果时显式失败。

已验证的 actor 路径

此 skill 的默认 actor:

  • rednote-xiaohongshu-user-posts-scraper

当用户提供以下内容时使用它:

  • 一个或多个小红书 profileUrls
  • 一个或多个小红书 profileIds

这是当前默认值,因为它返回此基准流程所需的笔记级字段:

  • 笔记 URL
  • 笔记 id
  • 标题
  • 帖子类型
  • 点赞数
  • 作者元数据
  • 封面图片元数据

实验性路径

关键词路径:

  • rednote-xiaohongshu-search-scraper

仅在用户明确想要关键词或话题基准分析时使用。

当前操作规则:

  • 要求 maxItems >= 100
  • 如果 actor 返回零条项目则失败

当 actor 返回空数据集时,不要假装关键词基准分析成功。

不属于此 skill 的部分

  • 评论挖掘
  • 受众语言提取
  • 媒体下载
  • 主页健康快照
  • 发布或排期笔记

稍后将这些路由到专用 XHS skill。

推荐工作流

  1. 对请求进行分类:
    • 账号基准
    • 关键词基准
  2. 将小型基准简报编译为 actor 输入
  3. 通过共享采集运行器运行选定的 actor
  4. 规范化为一个本地帖子数据集
  5. 按点赞信号加主题相关性排序
  6. 总结:
    • 反复出现的钩子
    • 标题模式家族
    • 封面宽高模式
    • 内容类型分布
    • 最强的基准示例

成本纪律

已验证的账号路径:

  • 每个主页从 8-15 条近期帖子开始
  • 一次基准分析 1-3 个主页

实验性关键词路径:

  • actor 当前强制执行高得多的最低项目数
  • 不要隐藏该约束
  • 保持关键词批次狭窄且具体

公共 Skill 执行契约

  • 将基准简报、actor 输入、原始数据集、规范化数据集、 排名和分析输出保留在 <work-folder>/.postplus/xiaohongshu-content-benchmark/ 下
  • 仅将最终面向用户的基准摘要或候选列表保留在 .postplus/ 之外
  • 从有界的第一轮开始:
    • 已验证账号路径使用 1-3 个主页
    • 仅在用户明确请求搜索时使用狭窄的关键词批次
  • 如果 PostPlus Cloud 服务不可用、未授权或返回稳定的 网络错误,请立即停止,而不是切换到临时的 shell 胶水代码

主要脚本

  • scripts/build_xhs_benchmark_actor_input.mjs
  • scripts/normalize_xhs_benchmark_dataset.mjs
  • scripts/rank_xhs_benchmark_posts.mjs
  • scripts/analyze_xhs_benchmark_dataset.mjs

使用共享采集运行器进行 actor 调用:

  • ${CLAUDE_SKILL_DIR}/_postplus_shared/00-core/shared-collection/scripts/collection_actor_run.mjs

最小工作流

账号基准

从简报构建 actor 输入:

node ${CLAUDE_SKILL_DIR}/scripts/build_xhs_benchmark_actor_input.mjs \
  --brief <work-folder>/.postplus/xhs-benchmark-brief.json \
  --output <work-folder>/.postplus/xhs-benchmark-actor-input.json

运行已验证的 actor:

node ${CLAUDE_SKILL_DIR}/_postplus_shared/00-core/shared-collection/scripts/collection_actor_run.mjs \
  --collection-key xhs-account-posts \
  --input <work-folder>/.postplus/xhs-benchmark-actor-input.json \
  --output <work-folder>/.postplus/xhs-benchmark-raw.json

规范化、排序、分析:

node ${CLAUDE_SKILL_DIR}/scripts/normalize_xhs_benchmark_dataset.mjs \
  --input <work-folder>/.postplus/xhs-benchmark-raw.json \
  --output <work-folder>/.postplus/xhs-benchmark-normalized.json

node ${CLAUDE_SKILL_DIR}/scripts/rank_xhs_benchmark_posts.mjs \
  --input <work-folder>/.postplus/xhs-benchmark-normalized.json \
  --theme "workplace,office workers,office" \
  --output <work-folder>/.postplus/xhs-benchmark-ranking.json

node ${CLAUDE_SKILL_DIR}/scripts/analyze_xhs_benchmark_dataset.mjs \
  --input <work-folder>/.postplus/xhs-benchmark-normalized.json \
  --output <work-folder>/.postplus/xhs-benchmark-analysis.json
关键词基准测试

使用相同的构建脚本,但在需求简报中提供 keywords。

运行约束:

  • 保持 limit >= 100
  • 如果 actor 返回零条结果,预期会出现可见的失败

良好输出

返回:

  • 基准测试候选清单
  • 热门笔记 URL
  • 反复出现的标题钩子
  • 标题模式拆解
  • 封面形状拆解
  • 观测到的内容类型分布
  • 字段缺失时的数据质量警告
  • 建议的卡片角度,之后可提供给 skills/40-creative/xiaohongshu-card-notes

失败姿态

  • 如果请求混用了账号基准测试和关键词基准测试,却未说明哪一项应为主,则失败
  • 如果未提供 profileUrls、profileIds 或 keywords,则失败
  • 在失败文案中指明缺失的输入:要么是小红书账号 URL、 账号 id,要么是明确的关键词路径
  • 如果关键词搜索 actor 返回零条结果,则失败
  • 如果归一化后的数据集没有任何笔记 URL,则失败
  • 保留 actor 的原始输出以便调试

评论

支持 Markdown