Skip to content
Back to search

xhs-workflow

SkillWorks with Claude CodeGitHub

小红书全链路智能创作调度器,编排 10 个子 skill 实现从调研到运营的自动化内容生产。 Use when 用户需要创建小红书笔记、做小红书热点分析、批量生产小红书内容、小红书账号冷启动、写小红书测评、做小红书教程。当用户提到"小红书"+"创作/写/发布/运营/热点/爆款/教程/测评/批量"时触发,即使没有明确说"调度"或"workflow"。命令触发:/xhs-workflow。 Do NOT use for 仅查询小红书信息而不创作、仅讨论小红书平台规则、已经在某个子 skill 执行中的二次触发、非小红书平台的内容创作。

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/anthonyhann--xhs-workflow-skill/badge.svg)](/listings/anthonyhann--xhs-workflow-skill)

HTML

<a href="/listings/anthonyhann--xhs-workflow-skill"><img src="/api/listings/anthonyhann--xhs-workflow-skill/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

**Prerequisites:** Python 3, Node.js, Pillow, ImageMagick, Chrome/Edge — `./init.sh --check` tells you exactly what's missing.

**1. Install the skill:**

git clone https://github.com/anthonyhann/xhs-workflow-skill ~/.claude/skills/xhs-workflow

**2. Check environment & sub-skills:**

~/.claude/skills/xhs-workflow/init.sh --check

**3. Say the word:**

/xhs-workflow 帮我写一篇关于「AI编程工具对比」的小红书爆款笔记

Add "分阶段确认" to review each phase before it proceeds.

**For AI agents** — paste this to yours:

> Clone https://github.com/anthonyhann/xhs-workflow-skill into my skills directory as `xhs-workflow`, run its `init.sh --check`, install whatever is missing, then run `/xhs-workflow` on my topic.

Works with **Claude Code** (`/xhs-workflow`, parallel via Agent tool) and **OpenClaw** (`openclaw skills run xhs-workflow`).

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

SKILL.md · Manifest · 449 lines
  1. ---
  2. name: xhs-workflow
  3. description: |
  4. 小红书全链路智能创作调度器,编排 10 个子 skill 实现从调研到运营的自动化内容生产。
  5. Use when 用户需要创建小红书笔记、做小红书热点分析、批量生产小红书内容、小红书账号冷启动、写小红书测评、做小红书教程。当用户提到"小红书"+"创作/写/发布/运营/热点/爆款/教程/测评/批量"时触发,即使没有明确说"调度"或"workflow"。命令触发:/xhs-workflow。
  6. Do NOT use for 仅查询小红书信息而不创作、仅讨论小红书平台规则、已经在某个子 skill 执行中的二次触发、非小红书平台的内容创作。
  7. ---
  8. # 小红书全链路智能创作调度器
  9. > 本 skill 是一个 **总控调度器**(P3 流程编排 + P2 路由分发),负责根据用户场景自动编排 10 个小红书子 skill 的串行/并行执行,覆盖调研→创作→设计→发布→运营全链路。
  10. ---
  11. ## 运行前门禁(Pre-flight Gate)
  12. > **强制执行**:每次 skill 被触发时,在进入 Step 0 之前必须先通过门禁检查。门禁失败则阻断执行并给出修复指引。
  13. ### 检查项
  14. | # | 检查 | 命令 | 通过条件 | 失败处理 |
  15. |---|------|------|---------|---------|
  16. | G1 | Python 3 | `which python3` | 返回路径 | 阻断:提示安装 Python 3 |
  17. | G2 | Pillow | `python3 -c "import PIL"` | 退出码 0 | 阻断:`pip3 install Pillow` |
  18. | G3 | Node.js | `which node` | 返回路径 | 阻断:提示安装 Node.js |
  19. | G4 | 核心子 skill 存在 | 检查 `xhs-content-creator`、`xhs`、`xiaohongshu-publisher`、`xiaohongshu-mcp` 目录 | 4 个均存在 | 阻断:列出缺失 skill 并提示安装 |
  20. | G5 | 场景子 skill(按需) | 按路由后场景检查所需的可选 skill | 场景所需 skill 存在 | 警告:标记该阶段将跳过 |
  21. | G6 | ImageMagick(图片场景) | `which convert` | 返回路径 | 警告:Phase 3 图片生成可能受限 |
  22. | G7 | MCP 服务(发布场景) | `curl -s --connect-timeout 2 http://localhost:18060/health` | HTTP 200 | 警告:Phase 4 将降级为手动发布 |
  23. ### 门禁分级
  24. **硬性门禁(阻断级)** — G1-G4 任一失败则终止执行:
  25. - 缺少运行时环境(Python/Node)→ 无法执行任何子 skill
  26. - 缺少核心 skill → 链路断裂,无法完成最小可用流程
  27. **软性门禁(降级级)** — G5-G7 失败则标记降级,不阻断:
  28. - 缺少可选 skill → 跳过对应 Phase,在报告中标注
  29. - MCP 未运行 → Phase 4 降级为"产物准备 + 手动发布指南"
  30. ### 执行逻辑
  31. ```
  32. 触发 /xhs-workflow
  33. │
  34. ▼
  35. ┌─────────────────────────────┐
  36. │ Pre-flight Gate │
  37. │ G1-G3: 硬性依赖 ──────────│──→ 任一失败 → 阻断 + 修复指引
  38. │ G4: 核心 skill ───────────│──→ 任一缺失 → 阻断 + 安装指引
  39. │ G5-G7: 软性依赖 ──────────│──→ 失败 → 警告 + 标记降级
  40. └─────────────────────────────┘
  41. │ 全部通过或仅有软性警告
  42. ▼
  43. Step 0: 场景路由
  44. ```
  45. ### 门禁输出格式
  46. ```markdown
  47. ## 环境门禁检查
  48. | 检查项 | 状态 | 备注 |
  49. |--------|------|------|
  50. | Python 3 | ✅ 3.11.5 | — |
  51. | Pillow | ✅ | — |
  52. | Node.js | ✅ v20.10.0 | — |
  53. | 核心 skill (4) | ✅ | — |
  54. | 场景 skill | ⚠️ 缺少 baoyu-xhs-images | Phase 3 将跳过信息图生成 |
  55. | ImageMagick | ✅ 7.1.1 | — |
  56. | MCP 服务 | ❌ 未运行 | Phase 4 降级为手动发布 |
  57. **结论:通过(1 项降级)**,继续执行...
  58. ```
  59. ### 快速修复命令
  60. 门禁失败时输出对应的一键修复:
  61. ```bash
  62. # G1-G3 系统依赖
  63. brew install python3 node imagemagick
  64. # G2 Pillow
  65. pip3 install Pillow
  66. # G4 核心 skill 缺失 — 运行初始化脚本
  67. ./init.sh
  68. # G7 MCP 服务启动
  69. python3 server.py --port 18060
  70. ```
  71. ---
  72. ## 输入与前置条件
  73. ### 必填输入
  74. - `topic`:选题关键词或主题描述(中文)
  75. - `scene`(可选):场景模式,不提供时由调度器自动识别
  76. - `hotspot` — 热点爆款笔记
  77. - `tutorial` — 知识教程类
  78. - `review` — 测评合集类
  79. - `batch` — 批量内容工厂
  80. - `coldstart` — 账号冷启动
  81. ### 可选参数
  82. - `mode`:运行模式
  83. - `auto` — 全自动执行(默认)
  84. - `step` — 分阶段确认
  85. - `style`:视觉风格(`bold`/`fresh`/`minimal`/`pop`/`retro` 等,默认 `fresh`)
  86. - `count`:图片数量(默认 6)
  87. - `publish`:是否自动发布(`true`/`false`,默认 `false`,需用户确认)
  88. ### 依赖(子 skill)
  89. | 子 Skill | 用途 | 必需 |
  90. |----------|------|------|
  91. | xiaohongshu-cn | 热点/趋势发现 | 按场景 |
  92. | xiaohongshu-deep-research | 深度调研 | 按场景 |
  93. | xhs-content-creator | CES 算法文案生成 | 是 |
  94. | xhs | 全能助手(创作指南) | 是 |
  95. | xiaohongshu-ops | 运营 SOP | 按场景 |
  96. | baoyu-xhs-images | 信息图生成 | 按场景 |
  97. | xhs-md2pic | Markdown 转卡片图 | 按场景 |
  98. | xiaohongshu-publisher | 封面+发布 | 是 |
  99. | xhs-auto-reply | AI 评论回复 | 按场景 |
  100. | xiaohongshu-mcp | MCP 浏览器服务 | 是 |
  101. ### 环境依赖
  102. | 依赖 | 用途 | 检查命令 |
  103. |------|------|----------|
  104. | Python 3 | 脚本运行 | `which python3` |
  105. | Pillow | 图片生成 | `python3 -c "import PIL"` |
  106. | ImageMagick | 图片转换 | `which convert` |
  107. | Node.js | MCP 服务 | `which node` |
  108. | Chrome/Edge | 浏览器自动化 | 系统检查 |
  109. 依赖缺失时不得静默继续,需提示安装或指向 `init.sh` 脚本。
  110. ---
  111. ## Step 0:场景路由(P2 辅助模式)
  112. ### 路由规则
  113. | 条件 | 场景 | 判断方式 |
  114. |------|------|----------|
  115. | 用户明确指定 `scene` 参数 | 直接使用 | 参数匹配 |
  116. | 包含"热点/爆款/流量/火" | `hotspot` | 关键词匹配 |
  117. | 包含"教程/教学/步骤/怎么做/攻略" | `tutorial` | 关键词匹配 |
  118. | 包含"测评/对比/推荐/合集/排行" | `review` | 关键词匹配 |
  119. | 包含"批量/多篇/量产/周更" | `batch` | 关键词匹配 |
  120. | 包含"冷启动/新号/起号/从零" | `coldstart` | 关键词匹配 |
  121. | 无法匹配 | `hotspot`(默认) | fallback |
  122. > 判断优先级:用户显式参数 > 关键词匹配 > 默认 hotspot
  123. ### 多关键词冲突裁决
  124. 当输入同时命中多个场景关键词时(如"从零做健身教程"同时命中 `coldstart` + `tutorial`),按以下规则裁决:
  125. | 冲突组合 | 裁决 | 理由 |
  126. |----------|------|------|
  127. | coldstart + 其他 | → `coldstart` | "起号"是元目标,教程/测评是内容形式 |
  128. | batch + 其他 | → `batch` | 批量是执行模式,优先于内容类型 |
  129. | hotspot + tutorial/review | → 追问用户 | 目标不明确,需确认是追热点还是做教程 |
  130. | tutorial + review | → `review` | 测评含教程属性,更具体 |
  131. **置信度追问**:命中 ≥2 个场景且无法通过上表裁决时,展示匹配结果并追问:
  132. ```
  133. 检测到多个匹配场景:{scene_a}(关键词: {kw_a})、{scene_b}(关键词: {kw_b})
  134. 请确认您的主要目标是:
  135. 1. {scene_a} — {一句话描述}
  136. 2. {scene_b} — {一句话描述}
  137. ```
  138. ### 场景→阶段映射
  139. | 场景 | Phase 1 调研 | Phase 2 创作 | Phase 3 设计 | Phase 4 发布 | Phase 5 运营 |
  140. |------|:---:|:---:|:---:|:---:|:---:|
  141. | hotspot | ✅ 全量 | ✅ CES优化 | ✅ 信息图 | ✅ | ✅ 自动回复 |
  142. | tutorial | ⬜ 跳过 | ✅ 教程体 | ✅ Markdown卡片 | ✅ | ⬜ 仅复盘 |
  143. | review | ✅ 竞品调研 | ✅ 测评体 | ✅ 信息密集图 | ✅ | ✅ 咨询回复 |
  144. | batch | ✅ 快速调研 | ✅ 批量生成 | ✅ 批量图 | ✅ 排队发布 | ✅ 监控 |
  145. | coldstart | ✅ 对标分析 | ✅ 种子内容 | ✅ 批量图 | ✅ 批量发布 | ✅ 周复盘 |
  146. ---
  147. ## Step 1:调研分析(Phase 1)
  148. - **输入**:`topic` + 路由后的 `scene`
  149. - **操作**:
  150. - `hotspot`/`batch`/`coldstart`:**并行调用**
  151. - `xiaohongshu-cn`:`keyword={topic}, limit=10` → 返回 hotspots + trends
  152. - `xiaohongshu-deep-research`:`keyword={topic}, depth="deep", focus="hotspot"` → 返回 report + top_notes
  153. - `review`:调用 `xiaohongshu-deep-research`:`keyword={topic}, depth="deep", focus="competitor"`
  154. - `tutorial`:跳过,直接进入 Step 2
  155. - **输出**:
  156. - `research_report.md` — 结构化调研报告
  157. - `hotspots.json` — 热点列表(如适用)
  158. - **检查点**:
  159. - ✅ 通过:调研报告非空且包含至少 3 条可用素材
  160. - ❌ 失败:报告为空或素材不足 → 提示用户补充关键词或扩大调研范围
  161. ### 并行执行策略
  162. ```
  163. 场景 hotspot/batch/coldstart:
  164. ┌─ Agent A: xiaohongshu-cn(热点发现)
  165. │
  166. ├─ Agent B: xiaohongshu-deep-research(深度调研)
  167. │
  168. └─ 等待两者完成 → 合并结果 → research_report.md
  169. ```
  170. ---
  171. ## Step 2:内容创作(Phase 2)
  172. - **输入**:`research_report.md`(来自 Step 1)+ `scene` + `topic`
  173. - **操作**:
  174. 1. 读取 `xiaohongshu-ops` 运营 SOP 指导(确定内容框架)
  175. 2. 调用 `xhs-content-creator` 生成文案:`topic={topic}, ces_optimize=true, research_context={report}`
  176. - `hotspot` → `template="diary"`
  177. - `tutorial` → `template="tutorial"`
  178. - `review` → `template="review"`
  179. - `batch` → `template="collection"`,循环 N 次(N=用户指定篇数)
  180. - `coldstart` → `template="diary"`,参考 top_notes 结构
  181. 3. 调用 `xhs` 润色:`draft={content}, action="full"` → 返回 polished + suggestions
  182. - **输出**:
  183. - `content_draft.md` — 最终文案(含标题、正文、标签)
  184. - CES 评分(仅参考)
  185. - **检查点**:
  186. - ✅ 通过:文案 300-600 字 + 标题 ≤20 字 + 含 `#AI生成内容` 标签 + 5-8 个标签
  187. - ❌ 失败:不满足要求 → 自动修正(最多 2 次):
  188. - 字数超标 → 重新调用 `xhs`:`draft={content}, action="polish"` 并附指令"压缩到 600 字内"
  189. - 字数不足 → 重新调用 `xhs-content-creator` 补充细节段落
  190. - 标签不足 → 调用 `xhs`:`action="tags"` 补充至 5-8 个
  191. - 缺 `#AI生成内容` → 直接追加到标签列表末尾
  192. ### 强制规则
  193. - 所有生成内容**必须**包含 `#AI生成内容` 标签(2026 年强制要求)
  194. - 标题前 13 字必须包含核心关键词
  195. - 正文以短句为主,避免长段落
  196. ---
  197. ## Step 3:视觉设计(Phase 3)
  198. - **输入**:`content_draft.md` + `style` + `count`
  199. - **操作**:按场景 **并行** 选择设计工具:
  200. - `hotspot`/`review`/`batch`/`coldstart`:调用 `baoyu-xhs-images`
  201. - 选择风格(用户指定或默认 `fresh`)
  202. - 信息密集型布局(review)/ 视觉优先型(hotspot)
  203. - `tutorial`:调用 `xhs-md2pic`
  204. - Markdown 转分步骤卡片图
  205. - 3:4 小红书标准比例
  206. - **输出**:
  207. - `images/` 目录 — 生成的图片文件(1-10 张)
  208. - `cover.png` — 封面图
  209. - **检查点**:
  210. - ✅ 通过:至少生成 1 张图片 + 封面图为 3:4 竖图
  211. - ❌ 失败:图片生成失败 → 检查 Pillow/ImageMagick → 提示用户手动准备图片
  212. ### 并行执行策略
  213. ```
  214. 场景 hotspot:
  215. ┌─ Agent A: baoyu-xhs-images(系列信息图 × count)
  216. │
  217. └─ Agent B: xiaohongshu-publisher 封面生成模块(cover.png)
  218. ```
  219. ---
  220. ## Step 4:智能发布(Phase 4)
  221. - **输入**:`content_draft.md` + `images/` + `cover.png`
  222. - **操作**:
  223. 1. 检查 `xiaohongshu-mcp` 服务状态(端口 18060)
  224. 2. 调用 `xiaohongshu-publisher` 执行发布:
  225. - 上传封面图 + 内容图
  226. - 填充标题、正文、标签
  227. - 浏览器自动化提交
  228. - **输出**:
  229. - 发布状态:成功/失败
  230. - 笔记链接(如成功)
  231. - **检查点**:
  232. - ✅ 通过:发布成功且返回笔记链接
  233. - ❌ 失败:MCP 服务不可用 → 提示启动服务;发布失败 → 重试 1 次后提示手动发布
  234. ### 安全确认
  235. - `publish=false`(默认):完成准备后**暂停**,展示预览并等待用户确认
  236. - `publish=true`:自动发布,但发布前仍输出预览摘要
  237. ---
  238. ## Step 5:互动运营(Phase 5)
  239. - **输入**:笔记链接(来自 Step 4)+ `scene`
  240. - **操作**:
  241. - `hotspot`/`review`/`batch`:调用 `xhs-auto-reply` 自动回复前 20 条评论
  242. - `coldstart`:调用 `xiaohongshu-ops` 制定周复盘计划
  243. - `tutorial`:调用 `xiaohongshu-ops` 记录内容效果
  244. - **输出**:
  245. - `interaction_log.md` — 互动日志
  246. - 复盘建议(如适用)
  247. - **检查点**:
  248. - ✅ 通过:互动日志非空
  249. - ❌ 失败:评论获取失败 → 标记为"待手动互动",不阻断整体流程
  250. ---
  251. ## 执行报告(最终输出)
  252. ALWAYS use this exact template:
  253. ```markdown
  254. ## 小红书创作执行报告
  255. - 场景:{scene_name}
  256. - 模式:{auto|step}
  257. - 主题:{topic}
  258. ### Phase 1 调研 {✅|⬜|❌}
  259. - 热点发现:{summary}
  260. - 调研报告:{file_path}
  261. ### Phase 2 创作 {✅|❌}
  262. - 文案:{file_path}
  263. - 字数:{word_count}
  264. - CES 参考分:{score}
  265. ### Phase 3 设计 {✅|❌}
  266. - 图片数量:{count}
  267. - 风格:{style}
  268. - 封面:{cover_path}
  269. ### Phase 4 发布 {✅|⏳|❌}
  270. - 状态:{published|pending_confirm|failed}
  271. - 笔记链接:{url|待发布}
  272. ### Phase 5 运营 {✅|⬜|❌}
  273. - 互动:{summary}
  274. - 复盘建议:{suggestions}
  275. ---
  276. 总耗时:{duration}
  277. 子 skill 调用:{call_count} 次
  278. ```
  279. ---
  280. ## 检查点总览
  281. | 步骤 | 检查内容 | 通过标准 | 失败处理 |
  282. |------|---------|---------|---------|
  283. | Step 0 | 场景识别 | 命中已定义场景 | fallback 到 hotspot |
  284. | Step 1 | 调研质量 | 报告含 >=3 条素材 | 提示补充关键词 |
  285. | Step 2 | 文案合规 | 字数/标签/标题合规 | 自动修正(2次) |
  286. | Step 3 | 图片生成 | >=1 张图 + 3:4 封面 | 提示手动准备 |
  287. | Step 4 | 发布成功 | 返回笔记链接 | 重试后手动发布 |
  288. | Step 5 | 互动完成 | 日志非空 | 标记待手动 |
  289. ---
  290. ## 异常处理
  291. | 场景 | 处理 |
  292. |------|------|
  293. | 子 skill 未安装 | 运行 `init.sh` 安装缺失 skill,或提示手动安装 |
  294. | MCP 服务未启动 | 提示运行 `python3 server.py --port 18060` |
  295. | 环境依赖缺失 | 运行 `init.sh --check` 诊断并给出安装命令 |
  296. | 文案生成超时 | 中止并展示已生成部分,提示手动完善 |
  297. | 发布失败 | 保存所有产物到本地,提供手动发布指南 |
  298. | 分阶段模式用户拒绝 | 停止后续阶段,保存当前产物 |
  299. ---
  300. ## init.sh 脚本功能
  301. ```bash
  302. #!/bin/bash
  303. # xhs-workflow-orchestrator 环境初始化脚本
  304. # 用法:
  305. # ./init.sh # 安装所有子 skill 并检查环境
  306. # ./init.sh --check # 仅检查环境,不安装
  307. # 检查项:
  308. # 1. Python3 + Pillow + ImageMagick
  309. # 2. Node.js
  310. # 3. Chrome/Edge 浏览器
  311. # 4. 10 个子 skill 是否存在
  312. # 5. MCP 服务端口可用性
  313. # 6. 环境变量(DASHSCOPE_API_KEY, OPENAI_API_KEY)
  314. ```
  315. ---
  316. ## 诚实边界
  317. - 本 skill **做不到**:
  318. 1. 替代子 skill 的核心逻辑(调度器不内聚子功能)
  319. 2. 绕过小红书平台审核机制
  320. 3. 保证内容一定成为"爆款"(CES 评分仅为参考)
  321. 4. 在无 MCP 服务时完成自动发布(降级为手动)
  322. - 信息不足时不做臆断:
  323. - `topic` 缺失 → 必须追问
  324. - `scene` 不明确 → 走路由识别,低置信度时追问用户
  325. - 低信息降级策略:
  326. 1. 缺关键输入 → 先追问,不启动链路
  327. 2. 子 skill 不可用 → 跳过对应阶段并标记,不中止整体
  328. 3. MCP 未连接 → Phase 4 降级为"生成产物 + 手动发布指南"
  329. ---
  330. ## 兼容性说明
  331. ### Claude Code 环境
  332. - 通过 `~/.claude/skills/` 注册,使用 `/xhs-workflow` 命令触发
  333. - subagent 并行通过 Agent tool 的并行调用实现
  334. - 子 skill 通过 Skill tool 调用
  335. ### OpenClaw Agent Framework
  336. - 通过 `~/.qclaw/skills/` 注册,使用 `openclaw skills run xhs-workflow-orchestrator` 触发
  337. - subagent 并行通过 OpenClaw 的 parallel task 机制实现
  338. - 子 skill 通过 `openclaw skills invoke` 调用
  339. ---
  340. ## 资源文件
  341. | 文件 | 内容 | 何时读取 |
  342. |------|------|---------|
  343. | [references/scene-configs.md](references/scene-configs.md) | 5 种场景的详细配置和子 skill 参数 | Step 0 场景路由后 |
  344. | [references/sub-skill-api.md](references/sub-skill-api.md) | 10 个子 skill 的接口约定 | 调用子 skill 前 |
  345. | [references/quality-rules.md](references/quality-rules.md) | 内容质量检查规则集 | Step 2 检查点 |
  346. | [init.sh](init.sh) | 环境初始化脚本 | 首次使用或依赖检查失败时 |
README.md · README · 154 lines
  1. <div align="center">
  2. # XHS Workflow Skill 📕
  3. ### One prompt in, a published Xiaohongshu post out.
  4. 10 sub-skills · 5 phases · 7 pre-flight gates — research → write → design → publish → engage, with your confirmation before anything goes live.
  5. [![license](https://img.shields.io/badge/license-MIT-E8590C?style=flat-square)](LICENSE)
  6. [![sub-skills](https://img.shields.io/badge/sub--skills-10-E8590C?style=flat-square)](references/sub-skill-api.md)
  7. [![scenes](https://img.shields.io/badge/scenes-5-2B8A3E?style=flat-square)](#-the-pipeline)
  8. [![phases](https://img.shields.io/badge/phases-5-4C6EF5?style=flat-square)](#-the-pipeline)
  9. [![stars](https://img.shields.io/github/stars/anthonyhann/xhs-workflow-skill?style=flat-square)](https://github.com/anthonyhann/xhs-workflow-skill/stargazers)
  10. [![works with](https://img.shields.io/badge/works%20with-Claude%20Code%20%7C%20OpenClaw-333?style=flat-square)](#-quickstart)
  11. [Quickstart](#-quickstart) · [Pipeline](#-the-pipeline) · [By the numbers](#-by-the-numbers) · [Docs](SKILL.md) · [Scenes](references/scene-configs.md) · **[中文](README_zh.md)**
  12. </div>
  13. ## 😅 Sound familiar?
  14. - You ask an AI to "write a Xiaohongshu post" — you get generic copy. The research, the images, the publishing, the comment replies: still on you.
  15. - Your content pipeline lives in five disconnected tools, and every post is a copy-paste relay between them.
  16. - Your auto-everything script dies silently the moment one dependency is missing — and you find out after the copy is already half-written.
  17. This skill is an orchestrator, not another writer: it routes your topic into one of **5 scene modes**, runs the right sub-skills in the right order, checks quality at **6 checkpoints**, and degrades gracefully instead of crashing.
  18. ## 🔄 The pipeline
  19. ```
  20. topic + scene (optional)
  21. │
  22. ▼
  23. ┌─────────────────────────────────────────────┐
  24. │ Pre-flight Gate G1–G7 │
  25. │ hard: Python3 · Pillow · Node · 4 core │
  26. │ soft: scene skills · ImageMagick · MCP │
  27. └─────────────────────────────────────────────┘
  28. │ fail hard → block + fix guide
  29. │ fail soft → degrade + mark in report
  30. ▼
  31. ┌── Step 0: scene router ─────────────────────┐
  32. │ hotspot · tutorial · review · batch · │
  33. │ coldstart (keyword match → conflict rules) │
  34. └─────────────────────────────────────────────┘
  35. │
  36. ▼ ▼ ▼ ▼ ▼
  37. Phase 1 Phase 2 Phase 3 Phase 4 Phase 5
  38. research create design publish engage
  39. │
  40. ▼
  41. execution report + artifacts
  42. ```
  43. Each scene runs a different pipeline — e.g. `tutorial` skips research and renders step-by-step Markdown cards, while `hotspot` runs full research, CES-optimized copy, infographics, and auto-reply:
  44. | Scene | Say something like | Research | Create | Design | Publish | Engage |
  45. |-------|--------------------|:--------:|:------:|:------:|:-------:|:------:|
  46. | `hotspot` | "写一篇…爆款笔记" | full | CES-optimized diary | infographics | ✅ | auto-reply |
  47. | `tutorial` | "写一篇…教程" | skip | tutorial format | MD cards | ✅ | review only |
  48. | `review` | "做个…测评合集" | competitor | review format | dense images | ✅ | Q&A reply |
  49. | `batch` | "批量生产…" | quick | batch ×N | batch images | queued | monitor |
  50. | `coldstart` | "新号起号" | 5 benchmark accounts | 10 seed posts | batch images | batch | weekly review |
  51. Ambiguous input ("从零做健身教程" hits `coldstart` + `tutorial`) → resolved by priority rules, or it asks you. No silent guessing.
  52. ## 🚀 Quickstart
  53. **Prerequisites:** Python 3, Node.js, Pillow, ImageMagick, Chrome/Edge — `./init.sh --check` tells you exactly what's missing.
  54. **1. Install the skill:**
  55. ```bash
  56. git clone https://github.com/anthonyhann/xhs-workflow-skill ~/.claude/skills/xhs-workflow
  57. ```
  58. **2. Check environment & sub-skills:**
  59. ```bash
  60. ~/.claude/skills/xhs-workflow/init.sh --check
  61. ```
  62. **3. Say the word:**
  63. ```
  64. /xhs-workflow 帮我写一篇关于「AI编程工具对比」的小红书爆款笔记
  65. ```
  66. Add "分阶段确认" to review each phase before it proceeds.
  67. **For AI agents** — paste this to yours:
  68. > Clone https://github.com/anthonyhann/xhs-workflow-skill into my skills directory as `xhs-workflow`, run its `init.sh --check`, install whatever is missing, then run `/xhs-workflow` on my topic.
  69. Works with **Claude Code** (`/xhs-workflow`, parallel via Agent tool) and **OpenClaw** (`openclaw skills run xhs-workflow`).
  70. ## 📊 By the numbers
  71. Every number below is verifiable in this repo — no vanity metrics.
  72. | Number | What it is | Where to verify |
  73. |-------:|------------|-----------------|
  74. | **10** | sub-skills orchestrated (research / create / design / publish / engage / infra) | [references/sub-skill-api.md](references/sub-skill-api.md) |
  75. | **5** | scene modes with routing + conflict arbitration | [SKILL.md](SKILL.md) Step 0 |
  76. | **7** | pre-flight gates: 4 hard-blocking + 3 soft-degrading | [SKILL.md](SKILL.md) Pre-flight Gate |
  77. | **6** | quality checkpoints, one per step | [SKILL.md](SKILL.md) 检查点总览 |
  78. | **10** | content rules: 5 P0 blocking + 5 P1 warning | [references/quality-rules.md](references/quality-rules.md) |
  79. | **2** | max auto-fix rounds before a checkpoint blocks | quality-rules.md |
  80. | **≤20 · 13 · 300–600 · 5–8** | title chars · keyword in first 13 chars · body length · tag count | quality-rules.md |
  81. | **25/40** | CES score gate (P1) | quality-rules.md R10 |
  82. | **Top 20–50** | deep-research batch size | sub-skill-api.md |
  83. | **20** | comments auto-replied per note (default max) | sub-skill-api.md |
  84. | **0** | notes published without your confirmation — `publish=false` by default | [SKILL.md](SKILL.md) Step 4 |
  85. ## 📁 Project structure
  86. ```
  87. xhs-workflow-skill/
  88. ├── SKILL.md # the orchestrator: gates, routing, 5 phases, checkpoints
  89. ├── init.sh # env + 10 sub-skill checker (--check = diagnose only)
  90. ├── references/
  91. │ ├── scene-configs.md # per-scene call chains & parameters
  92. │ ├── sub-skill-api.md # I/O contracts of all 10 sub-skills
  93. │ └── quality-rules.md # R1–R10 content rules + auto-fix policy
  94. ├── README.md # this file
  95. └── README_zh.md # 中文版
  96. ```
  97. The 10 sub-skills (e.g. `xiaohongshu-deep-research`, `xhs-content-creator`, `baoyu-xhs-images`, `xiaohongshu-publisher`, `xiaohongshu-mcp`) are separate installs from ClawHub — `init.sh --check` lists which ones you're missing.
  98. ## ⚠️ When NOT to use it
  99. - **Your platform isn't Xiaohongshu.** Douyin, WeChat, Instagram — this pipeline is XHS-only, by design.
  100. - **You only want to read trends, not create.** Invoke the research sub-skills (`xiaohongshu-cn`, `xiaohongshu-deep-research`) directly; don't spin up the whole pipeline.
  101. - **You expect guaranteed virality.** CES optimization is a reference score, not a promise — and nothing here bypasses platform review.
  102. - **You want fully hands-off publishing.** Xiaohongshu has no official Mac client or publish API; Phase 4 rides browser automation via `xiaohongshu-mcp` and degrades to a manual-publish guide when it's down. Nothing publishes without your confirmation by default.
  103. Your login session stays in your own browser profile; nothing is sent anywhere except what you choose to publish.
  104. ## License
  105. MIT © [anthonyhann](https://github.com/anthonyhann) — built by an indie hacker tired of the copy-paste relay between five tools. If this killed your Sunday content batch, a ⭐ tells you when new scene modes land.
  106. ## 许可与署名(非代码内容)
  107. 代码沿用仓库根目录 `LICENSE` 中的原有许可;**非代码内容**(文档、图片、示意图、数据、提示词与示例文本等)采用 [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/deed.zh-hans),完整条款见 [`LICENSE-CC-BY-4.0`](LICENSE-CC-BY-4.0)。
  108. 转载、引用或改编非代码内容时,必须署名并注明是否做过修改:
  109. > 来源:xhs-workflow-skill · 作者 anthonyhann · https://github.com/anthonyhann/xhs-workflow-skill · CC BY 4.0
  110. ---
  111. **License & attribution (non-code content).** Code follows the existing `LICENSE` at the repository root. All **non-code content** (documentation, images, diagrams, data, prompts and sample text) is licensed under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/); full terms in [`LICENSE-CC-BY-4.0`](LICENSE-CC-BY-4.0). Reuse must credit the source above and state whether changes were made.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.