Xiaohongshu viral note agent skill
小红书爆款笔记生成 Agent Skill|小红书笔记智能选题、内容生成/爆款小红书笔记仿写、热点趋势分析、封面设计、短视频脚本生成、合规校验、账号分析、一键发布与数据复盘,支持 MCP 接入 Cursor、Claude 、workbuddy、openclaw等 AI Agent。
npx -y skills add xuboboo/xiaohongshu-viral-note-agent-skillAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 19 days oldThe repository was created 19 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use for Xiaohongshu/RED hot notes, trends, note generation/rewrite, authorized account weight, login, publish, schedule, and post-publish review. Not for unauthorized access, captcha bypass, restricted scraping, fake engagement, or plagiarism. 用于小红书热门笔记、趋势、种草文案、账号权重、扫码登录、发布与内容复盘。 禁止未授权访问、绕过验证、刷量、洗稿。
The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
14.3 KB, ~4.5k tokens by cl100k_base, as published. Nobody here has run it
小红书爆款笔记生成 agent Skill
这是什么:一套自包含的 Cursor / agent skill,面向小红书(Xiaohongshu / RED)内容研究、原创生成、合规校验、授权账号分析,以及受控登录/发布和发后运营。
能力边界以本包内的 Python 模块、scripts/ 和 references/ 为准。
- 不默认提供站内官方全量热榜
- 不假设存在包外未写明的自动化能力
黄金路径(先做对这件事)
黄金路径是什么:Agent 与人共用的最短闭环;先看
ux.summary/next_step,再下钻业务字段。
研究/选题 → 生成交付包 → 人工审阅 →(可选)授权草稿与发布
| 你想… | 优先调用 | 成功后看什么 |
|---|---|---|
| 找热门与选题 | search_hot_notes 或 generate_from_hot(dry_run=true) | topic_suggestions、hot_insights、ux.next_step |
| 一键成稿 | generate_from_hot(dry_run=false) 或 generate_xhs_note | creation_bundle、quality_report.readiness、ux.status |
| 改写润色 | rewrite_xhs_note | title_hook、structure_checks、ux |
| 无搜索密钥 | 任意研究工具 | status=needs_web_search → 宿主 websearch → 带 web_results 重调 |
| 环境是否就绪 | CLI xhs-skill doctor | ready、checks[].hint、golden_path |
读返回值的顺序(Agent / 人通用):
status或ux.status(ok/needs_web_search/needs_human_review/blocked/suggestions_ready/generated)ux.summary(一句话发生了什么)ux.next_step或顶层next_step(下一步调哪个工具)- 再读业务体:
topic_suggestions、creation_bundle、package等
工具怎么找: tools/list 里每个工具描述带场景前缀(如 [研究/选题]),_meta.groups 给分组索引;分组顺序:research → generate → verify → publish → operations。
不要做: 在 blocked / 未人工确认时直接 publish_note;不要把 PUBLIC_INDEX_TREND 说成站内热榜。
核心约定(Core contract)
核心约定是什么:先分清数据从哪来,输出里必须标明类型;客观说法进台账,缺证不编造。
三类数据标签(首次定义,全文沿用):
PUBLIC_INDEX_TREND(公开索引趋势):网上搜到的公开内容线索,不是小红书 App 内官方热榜。AUTHORIZED(授权数据):账号主人明确导入或授权暴露的数据。ESTIMATED_ACCOUNT_WEIGHT(估算账号权重):系统按规则估出的账号权重,不是小红书官方分数。
硬规则:
- 不能编造缺失的互动数据、个人经历、产品事实、用户评价、平台规则、价格、排名、奖项、医疗功效或商业关系。
- 客观说法必须进入 Claim Ledger(声明台账:待核验客观说法清单)。
- 核验不过时,只能:
DELETE/QUALIFY/CONVERT_TO_SUBJECTIVE/HUMAN_REVIEW。 - 不能让模型“挑一个听起来最像真的”。
工作流(Workflow)
工作流是什么:从任务路由到研究、生成、校验、交付、授权账号与发布的固定顺序;细节见 references。
- 先路由任务:研究、生成、改写、诊断、账号分析、鉴权或发布 →
references/task-routing.md。 - 再抽 Brief:目标、受众、账号身份、内容形态、商业属性、证据与约束。次要字段可给合理默认并写明假设;不能臆造事实或经历。
- 要“当前/热门/趋势”时,做自适应检索 →
references/research-protocol.md:- 宿主已给
web_results(client_web)→ 优先用; - 否则用已配置的在线搜索 Provider;
- 再否则返回
needs_web_search:宿主按suggested_queries检索后,带上web_results([{url, title, snippet?}, ...])重调同一工具。
- 宿主已给
- 归一化、去重、排序笔记;保留公开索引覆盖警告。
- 只蒸馏机制(人群/场景/结构/痛点等);不能复用原文独特表达、个人故事或图片。
- 多候选生成标题/封面/正文(图文分页或视频分镜与正文对齐),再按相关性和多样性排序;正文可落话题标签。
- 抽取声明,再跑原创性、合规、AI 风格/来源校验 →
references/verification-workflow.md。 - 输出结构化
DeliveryPackage(最终交付包);发布前必须人工审阅。 - 账号权重:只能用
AUTHORIZED分析数据,并标明ESTIMATED_ACCOUNT_WEIGHT。 - 登录:必须用户扫码确认;会话状态加密存储。
- 发布:默认
REQUIRE_CONFIRMATION;校验审批 token 和内容 hash。创建草稿 / 审批 / 发布前必须服务端重跑 claims、合规与原创门禁,不得信任客户端自报的compliance_report/originality_report/claims.verified。 - 立刻停止的条件:验证码、风险验证、账号不一致、不支持的 UI、合规/原创失败、内容 hash 变更、缺少 AI 披露决策、服务端重验
BLOCKED。 - 突发或长任务:有界异步任务 + SSE;遵守租户/Provider 限流,不能绕过背压。
- 发布成功后:排队做授权侧发布后指标同步(归因、权重趋势、实验、复盘、下一条建议);复盘
next_note_suggestions可直接喂generate_xhs_note。 - 多 Pod:用 PostgreSQL 管发布状态、租约、Outbox 和库级幂等;不能依赖单 Pod 本地草稿/审批/调度文件。
创作者常用能力补充:
- 热门一键生成:
generate_from_hot(dry_run先选题 / 再一键成稿,复用同一研究报吿)。 - 健康度驱动选题:
suggest_topics_by_health;generate_from_hot可开use_account_health按弱项重排选题并推荐note_style(估算,非官方推荐)。 - 热门洞察:
search_hot_notes等返回hot_insights(分位热度带、上升词/双轴、早期速度信号、话题生命周期、内容缺口、标题机制统计),公开索引非站内热榜。 - 可点选选题:
topic_suggestions[](含generate_payload/note_style)。 - 创作一览包:
generate附带creation_bundle.v1;strategy含preferred_mechanisms/title_proxy_board/seo_tag_balance。 - 改写标题钩子:
rewrite_xhs_note返回title_hook(mechanism/risk_flags)与实体/数字保留检查。 - Brief + 就绪分:
content_brief与quality_report.readiness。 - 叙事框架 / 笔记类型:
note_style+narrative_framework;plan_content_outline。 - 封面联动 / 口播时长 / 清单分页:见
note_style、video_duration_seconds、checklist 分页。 - 账号:
query_account_weight+query_content_health+diagnose_account(evidence、区间、异常检测、冷启动先验、generate_payload;非官方分)。 - 多变体 / 复盘一跳 / 发帖窗口 / 评论草稿:variants、retrospective payload、
get_publish_windows、draft_comment_reply。
自包含执行(Self-contained execution)
自包含执行是什么:本包装了研究 Provider、模型适配、高并发运行时、SSE、MCP、A2A、账号分析、浏览器登录与发布;核心能力不依赖单独的 Runtime/Platform 仓库。
详见 references/self-contained-runtime.md。
能力怎么选(按优先级):
- 没有在线搜索密钥时,优先宿主原生 websearch
- 调
search_hot_notes/generate_xhs_note(及同类研究工具)时,可以不传providers。 - 若返回
status=needs_web_search:宿主用suggested_queries检索,再以web_results重调同一工具。 - Skill 负责归一化、去重、排序和机制蒸馏;默认不会静默用 fixture 假数据。
- 调
- 已配置在线搜索(Brave / Bing / Google CSE / SearxNG / OpenAI web 等)时,Skill 自己搜,不用宿主代搜。
providers: ["fixture"]只给离线/开发用确定性数据。- 端到端研究→交付:
scripts/generate_note.py。 - 检索/分析辅助脚本(按需):
scripts/search_hot_notes.py、scripts/search_trending_topics.py、scripts/analyze_hot_notes.py、scripts/diagnose_note.py。 - 账号与发布:
scripts/query_account_weight.py、scripts/login_account.py、scripts/publish_note.py;授权数据同步可用scripts/sync_account_analytics.py。 - 高并发:
scripts/serve_runtime.py或scripts/run_worker.py;调度/Outbox/指标同步见scripts/run_scheduler.py、scripts/run_outbox.py、scripts/run_metrics_sync.py。 - MCP 宿主接入:
scripts/run_mcp.py。
模型与 Provider:references/model-routing.md、assets/providers.yaml;探测用 scripts/provider_probe.py。
工具与 references 按需加载(Tool and reference loading)
按需加载是什么:只加载当前请求相关的 reference;能跑脚本/模块时,不用长文复述其逻辑。
| 场景 | 加载 |
|---|---|
| 研究与热门排序 | references/research-protocol.md、references/hot-ranking.md |
| 任务路由 | references/task-routing.md |
| 内容生成 | references/content-generation.md |
| 验证闭环 | references/verification-workflow.md |
| 模型路由 | references/model-routing.md |
| 账号估算 | references/account-weight.md |
| 登录与发布 | references/browser-authentication.md、references/auto-publishing.md |
| 安全合规 | references/compliance-rules.md、references/ai-labeling.md |
| 协议集成 | references/mcp-a2a-streaming.md |
| 高并发与批量 | references/high-concurrency.md |
| 分布式发布与恢复 | references/distributed-consistency.md |
| 语义/视觉/学习排序 | references/content-intelligence-v5.1.md |
| 发布后运营 | references/operations-loop.md |
| 企业身份与治理 | references/enterprise-identity.md、references/enterprise-governance.md、references/supply-chain-security.md |
MCP 工具名(契约以 contracts/mcp-tools.json 为准;分组索引见 contracts/mcp-tool-groups.json)示例:
- 研究/生成:
search_hot_notes、search_trending_topics、analyze_hot_notes、generate_xhs_note、rewrite_xhs_note、diagnose_xhs_note - 校验:
verify_claims、check_originality、check_compliance - 账号:
query_account_weight、sync_account_analytics、start_account_login/check_account_login/logout_account - 发布:
create_publish_draft/preview_publish_draft/approve_publish_draft、publish_note/schedule_note - 以及:发布后运营与实验类工具(指标同步、归因、日历/系列、A/B/n、bandit、素材库、复盘等)、企业管控与审批类工具
企业执行约定(Enterprise execution contract)
企业约定是什么:企业模式打开后的身份、授权、成本、审批与审计硬规则。
- 身份只能来自已校验的本地或 OIDC token;不信任未认证的租户/角色请求头。
- 调工具前,先过租户状态、scope、角色、区域、Provider/账号白名单和 DLP。
- 贵的调用先预留估算成本,结束后结算或释放。
- 高风险发布要抗钓鱼 MFA 证据,以及 quorum(多人一起点头才算过)审批。
- 职责分离:申请人不能审批自己的发布。
- 审批绑定租户、资源、内容 hash 和过期时间;任一变更就让审批失效。
- 管理、身份、审批、插件和发布结果写入审计链。
- 生产长生命周期密钥优先 Vault Transit 或 AWS KMS(已配置时)。
- 只接受摘要和发布者公钥都受信的已签名插件。
- 遵守数据驻留与留存策略;租户或 SCIM 用户停用就停止处理。
细节:references/enterprise-identity.md、references/enterprise-governance.md、references/supply-chain-security.md。
强制输出规则(Mandatory output rules)
强制输出规则是什么:交付与操作时必须遵守的可见性、校验状态与授权要求。
- 假设和未知项要写清楚。
- 用了公开检索时,必须带研究覆盖警告(
PUBLIC_INDEX_TREND≠ 站内全量热榜)。 - 交付包要含声明、原创性、合规和 AI 来源/标识相关报告(与
DeliveryPackage约定一致)。 - 任一关键校验失败时,不能标成可直接发布(应为
BLOCKED或HUMAN_REVIEW_REQUIRED等)。 - 没有用户明确授权,不能执行登录、退出、发布或定时发布。
- 不能绕过平台安全机制,不能自动化刷量/虚假互动。
明确不做(边界)
边界是什么:本 skill 明确拒绝的高风险与违规用途。
- 破解验证码,绕过登录/风控/访问控制。
- 未授权访问账号,或抓取受限内容。
- 洗稿,或近义词复刻第三方独特表达/图片/隐私。
- 隐瞒商业合作关系;删除或篡改应有的 AI 生成内容披露。
- 把
ESTIMATED_ACCOUNT_WEIGHT或公开索引热度伪装成官方分数/站内热榜。
What ships with it: 425 files
3027.6 KB alongside SKILL.md, 299 of them executable
assets/
- account_profile.template.yaml279 B
- accounts.yaml336 B
- creator_studio_selectors.yaml1.3 KB
- plugin-trust.example.json76 B
- providers.yaml2.0 KB
- screenshots/screenshot-1.png88.5 KB
- screenshots/screenshot-2.png71.8 KB
- screenshots/screenshot-3.png116.7 KB
- screenshots/screenshot-4.png86.4 KB
- screenshots/screenshot-5.png83.3 KB
- screenshots/screenshot-6.png87.2 KB
- screenshots/screenshot-7.png87.0 KB
- tenant-policy.example.yaml513 B
contracts/
- a2a-agent-card.json4.3 KB
- events/stream-events.yaml589 B
- mcp-tool-groups.json2.5 KB
- mcp-tools.json43.5 KB
- openapi.json159.5 KB
- openapi.yaml103.6 KB
data/
- .gitkeep0 B
evals/
- cases/a2a.jsonl9.3 KB
- cases/account_weight.jsonl25.6 KB
- cases/adversarial.jsonl27.6 KB
- cases/compliance.jsonl26.3 KB
- cases/dedup.jsonl19.0 KB
- cases/factuality.jsonl23.2 KB
- cases/generation.jsonl36.7 KB
- cases/graphic.jsonl14.8 KB
- cases/hot_ranking.jsonl25.9 KB
- cases/hot_search.jsonl24.4 KB
- cases/login.jsonl19.6 KB
- cases/mcp.jsonl14.1 KB
- cases/mechanism_distillation.jsonl20.8 KB
- cases/originality.jsonl24.3 KB
- cases/protocol_smoke.jsonl4.9 KB
- CODE_OF_CONDUCT.md1.9 KB
- CONTRIBUTING.md1.9 KB
- docker-compose.yml3.1 KB
- Dockerfile583 B
- .env.example5.9 KB
385 more files not listed here. See all 425 in the repository.