Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill should be used when the user wants to publish an existing Markdown article to Xiaohongshu as a private longform post, keep the original wording and structure, insert inline images in order, use one-click layout, and verify the result in note manager.
.claude/skills/cnfjlhj-xhs-longform-private-publisher/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 28% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-05 | ✗→✓ | ▲ Improved | -20% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 171% | 0% |
| case-07 | ✗→✓ | ▲ Improved | 67% | 0% |
这个 skill 面向“已有原文、已有配图、不要改写、直接发布”的场景。
它的核心目标不是重新创作小红书文案,而是把现成的 Markdown 长文尽量无损地搬到小红书长文编辑器里,按图片占位顺序插图,使用“一键排版”,并默认以“仅自己可见”的方式发布,再做一次可视化验收。
如果用户要的是“帮我改写成更像小红书的风格”“帮我做封面卡片”“帮我生成图文卡片”,优先使用 xhs-note-creator;这个 skill 更适合“忠实发布现有长文”。
Markdown 文件而不是最终可直接上传的图片卡片最少需要以下输入:
<markdown_path>:原文 Markdown 文件<image_dir> 或 <image_paths...>:正文插图,顺序与文中的图片占位一致常见可选项:
h2/h3/blockquote/ul/li/strong,移除 code/hr 和属性。https://creator.xiaohongshu.com/publish/publish?target=article优先使用内置脚本把 Markdown 转成一个稳定的 JSON 载荷:
bashpython scripts/build_payload.py \ <markdown_path> \ --image-dir <image_dir> \ --xhs-safe-rich \ --output /tmp/xhs_payload.json
这个脚本会做几件事:
图片数 + 1 段--xhs-safe-rich 是默认推荐:保留小标题、引用和列表层级,同时移除 XHS 容易处理异常的 code、hr 和 HTML 属性1.png、2.png、10.png如果用户是显式给定图片路径列表,也可以改用:
bashpython scripts/build_payload.py <markdown_path> --images <img1> <img2> <img3>
如果手工维护了 payload-xhs.json,发布前必须检查:
parts = images + 1##<code><hr>h2/h3 或等价的独立标题行保留加载 references/xhs-longform-workflow.md 获取最新页面选择器、按钮回退策略和验收方法。
优先使用自动化脚本:
bashpython scripts/publish_longform.py --payload /tmp/xhs_payload.json --validate-only python scripts/publish_longform.py --payload /tmp/xhs_payload.json --publish
脚本默认行为:
仅自己可见--publish 时只走到发布前页面,便于人工验收--publish 后会在发布后自动跳转笔记管理页并截图留证failure.png 和 failure-state.json核心要求:
part1 -> image1 -> part2 -> image2 -> ... -> partN一键排版 -> 选择模板/预览页 -> 下一步 -> 发布设置页 -> 发布如果直接贴 Markdown 导致页面出现 #、-、> 等原始符号,说明插入方式错了,应改为先转换成 XHS 安全富文本再插入。不要用“全部降级为普通段落”的方式解决,它会破坏长文可读性。
如果用脚本执行,可通过以下参数显式控制:
bashpython scripts/publish_longform.py \ --payload /tmp/xhs_payload.json \ --visibility private \ --publish
除非用户明确要求公开,否则不要切成公开发布。
发布后回到笔记管理页,至少确认以下几点:
仅自己可见审核中 或 已发布至少保留一张截图;有条件的话,再补一张编辑页或预览页截图。
允许最多 3 次完整重试。
failure-state.json 更换假设,例如入口登录态、模板预览流程、最终发布按钮定位或管理页异步刷新每次重试都要说明新的判断依据,例如:
button 语义元素,需要滚到底部或坐标兜底选择模板、页码和 下一步,这不是失败,应点击 下一步button,语义定位失败时需要滚到底部后使用文本/class/坐标兜底满足以下四点才算交付:
仅自己可见scripts/build_payload.py:把 Markdown 和图片整理成稳定 JSON 载荷scripts/publish_longform.py:自动打开长文编辑器、插入正文与图片、执行一键排版、切换私密并做发布后验收references/xhs-longform-workflow.md:记录长文编辑器的实际流程、选择器经验和排错点外部检索:默认不需要;这个 skill 主要基于本地上下文和实际浏览器页面工作。
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 27,604 | 26,623 | -4% | 1 | 1 | 0% | 2,727 | 3,498 | +28% | 0 | 0 | — |
case-02 | fail→fail | 19,062 | 23,922 | +25% | 1 | 1 | 0% | 430 | 2,582 | +500% | 0 | 0 | — |
case-03 | fail→fail | 23,866 | 15,329 | -36% | 1 | 1 | 0% | 1,798 | 2,656 | +48% | 0 | 0 | — |
case-04 | fail→pass | 25,345 | 14,504 | -43% | 1 | 1 | 0% | 2,612 | 3,446 | +32% | 0 | 0 | — |
case-05 | fail→pass | 38,748 | 13,048 | -66% | 1 | 1 | 0% | 3,985 | 3,174 | -20% | 0 | 0 | — |
case-06 | fail→pass | 10,746 | 12,515 | +16% | 1 | 1 | 0% | 1,567 | 4,252 | +171% | 0 | 0 | — |
case-07 | fail→pass | 54,829 | 38,433 | -30% | 1 | 1 | 0% | 2,084 | 3,472 | +67% | 0 | 0 | — |
case-08 | fail→pass | 36,939 | 9,949 | -73% | 1 | 1 | 0% | 2,538 | 3,782 | +49% | 0 | 0 | — |
case-09 | fail→pass | 21,224 | 10,301 | -51% | 1 | 1 | 0% | 2,224 | 2,697 | +21% | 0 | 0 | — |
case-10 | pass→pass | 27,083 | 30,125 | +11% | 1 | 1 | 0% | 1,911 | 3,478 | +82% | 0 | 0 | — |
case-11 | pass→pass | 20,296 | 5,758 | -72% | 1 | 1 | 0% | 2,179 | 2,791 | +28% | 0 | 0 | — |
case-12 | pass→pass | 19,102 | 16,017 | -16% | 1 | 1 | 0% | 1,239 | 3,331 | +169% | 0 | 0 | — |
case-13 | fail→pass | 24,958 | 11,656 | -53% | 1 | 1 | 0% | 2,681 | 2,976 | +11% | 0 | 0 | — |
case-14 | pass→pass | 18,031 | 11,359 | -37% | 1 | 1 | 0% | 1,742 | 2,981 | +71% | 0 | 0 | — |
case-15 | pass→pass | 42,939 | 11,826 | -72% | 1 | 1 | 0% | 1,767 | 3,245 | +84% | 0 | 0 | — |
case-16 | fail→pass | 38,489 | 29,505 | -23% | 1 | 1 | 0% | 2,244 | 3,446 | +54% | 0 | 0 | — |
case-17 | fail→pass | 14,543 | 13,160 | -10% | 1 | 1 | 0% | 1,983 | 2,978 | +50% | 0 | 0 | — |
case-18 | fail→fail | 22,526 | 40,789 | +81% | 1 | 1 | 0% | 2,272 | 3,650 | +61% | 0 | 0 | — |
case-19 | pass→pass | 29,587 | 29,545 | -0% | 1 | 1 | 0% | 2,202 | 4,453 | +102% | 0 | 0 | — |
case-20 | fail→pass | 19,585 | 5,898 | -70% | 1 | 1 | 0% | 2,352 | 3,158 | +34% | 0 | 0 | — |
case-21 | fail→pass | 27,688 | 5,513 | -80% | 1 | 1 | 0% | 1,210 | 2,919 | +141% | 0 | 0 | — |
case-22 | pass→pass | 14,144 | 5,727 | -60% | 1 | 1 | 0% | 2,014 | 2,649 | +32% | 0 | 0 | — |
case-23 | pass→pass | 39,814 | 36,027 | -10% | 1 | 1 | 0% | 2,735 | 3,753 | +37% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 20 counted toward the lift figure. The other 3 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +52 percentage points is the difference between those two pass rates over the 20 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
| Model | Method | Date | Lift |
|---|---|---|---|
| gemini-3.6-flash | verified | 8/21/2026 | +55% |
Other measured skills in the registry, with their headline benchmark lift.