xhs-publisher▌
byheaven/byheaven-skills · updated Apr 8, 2026
MDX-style export adds YAML metadata + attribution linking explainx.ai and this canonical listing URL.
本技能文档包含小红书创作者平台的详细发布流程、DOM选择器和操作步骤。
小红书发布技能 (Xiaohongshu Publishing Skill)
本技能文档包含小红书创作者平台的详细发布流程、DOM选择器和操作步骤。
平台概述
平台: 小红书创作者平台 (Xiaohongshu Creator Platform)
域名: creator.xiaohongshu.com
发布形式选择
根据内容长度选择不同的发布入口:
| 内容长度 | 发布形式 | 入口 URL |
|---|---|---|
| < 140字 | 文字配图 | https://creator.xiaohongshu.com/publish/publish?target=image |
| ≥ 140字 | 图文笔记 | https://creator.xiaohongshu.com/publish/publish?target=article |
一、文字配图流程 (< 140字)
流程概览
1. 导航到文字配图入口
2. 点击"文字配图"按钮
3. 输入第一张图片内容(标题)
4. 添加第二张图片并输入正文内容
5. 一次性生成全部图片
6. 选择模板样式并下一步
7. 填写发布信息(标题、正文、标签)
8. 用户确认后发布
[!IMPORTANT] 核心流程: 先输入所有内容(标题 + 正文),再一次性生成全部图片。不要每张图片单独生成!
步骤 1: 导航到文字配图入口
URL: https://creator.xiaohongshu.com/publish/publish?target=image
页面加载后会显示"上传图文"选项,包含两个按钮:
- "上传图片"(红色按钮)
- "文字配图"(灰色按钮,带图标)
步骤 2: 点击"文字配图"按钮
查找方法:
find: "文字配图 button"
元素特征:
- 类型:
button - 文本: "文字配图"
- 功能: 进入文字生成图片编辑器
操作:
find("文字配图 button")
click()
wait(2)
步骤 3: 输入第一张图片内容(标题)
输入框:
find("真诚分享经验或资讯 textbox")
操作:
find("真诚分享经验或资讯 textbox")
click()
type(title)
wait(1)
步骤 4: 添加第二张图片并输入正文内容
添加第二张图片:
find("再写一张")
click()
wait(1)
正文输入框:
find("在这里输入正文 textbox")
操作:
find("在这里输入正文 textbox")
click()
type(content)
wait(1)
[!NOTE] 此时已输入所有内容(标题 + 正文),准备一次性生成全部图片。
步骤 5: 一次性生成全部图片
生成图片按钮:
find("生成图片 button")
操作:
find("生成图片 button")
click()
wait(5) // 等待所有图片生成,时间稍长
[!NOTE] 点击"生成图片"会同时生成标题和正文两张图片。不需要分别点击生成。
步骤 6: 选择模板样式并下一步
页面特征:
- 标题: "预览图片"
- 左侧大预览区域显示生成的图片
- 右侧多种模板选项(基础、边框、备忘、涂鸦、手写、光影、简约、便签、印刷、科技等)
- 底部有"下一步"按钮
模板选择:
- 默认选中"边框"模板(蓝色边框高亮)
- 可点击其他模板切换样式
- 自动化流程建议使用默认选中的模板
操作:
// 使用默认选中的模板
find("下一步 button")
click()
wait(2)
步骤 7: 填写发布信息
页面标题: "发布图文"
7.1 图片编辑区
特征:
- 显示 "图片编辑 (2/18)" - 表示已添加2张图片,最多18张
- 左侧有"添加"按钮可继续添加图片
- 显示已生成的图片缩略图
7.2 填写标题
标题输入框:
find("填写标题会有更多赞哦 input")
操作:
find("填写标题会有更多赞哦 input")
form_input(title)
7.3 填充完整正文内容和标签
正文文本框:
find(包含标题的 textbox) // 正文文本框
重要说明:
- 正文文本框会自动填充第一张图片的内容(标题)
- 必须替换为完整的正文内容(不是摘要或部分内容)
- 正文内容包括:完整正文 + 两个换行 + 标签
操作:
find(包含标题的 textbox) // 正文文本框
click()
key("cmd+a") // 全选现有内容
type(content + "\n\n" + tags) // 填充完整正文 + 两个换行 + 标签
[!WARNING] 标签格式要求: 正文内容和标签之间必须有两个换行(
\n\n),否则标签会紧贴正文显示不美观。
标签格式:
- 使用
#开头 - 多个标签用空格分隔
- 建议不超过3个标签
- 标签前必须有两个换行符与正文分隔
7.4 其他发布选项
话题按钮:
find: "话题"
用户按钮:
find: "用户"
表情按钮:
find: "表情"
活动话题:
- 页面会显示当前平台的活动话题
- 格式: "# 第五人格五周年春"
- 可选择参与
添加地点:
find: "添加地点"
添加合集:
find: "添加合集"
关联群聊:
find: "选择群聊"
步骤 8: 发布
发布按钮:
find: "发布 button"
element_type: button
color: 红色(主要行动按钮)
暂存草稿按钮:
find: "暂存草稿 button"
element_type: button
color: 灰色(次要行动按钮)
自动保存:
- 页面会自动保存草稿
- 底部显示"自动保存于 HH:MM"
⚠️ 重要提示: 根据安全策略,自动化脚本应该:
- 填充所有内容后停止
- 显示消息提示用户审核
- 不要自动点击"发布"按钮
- 由用户自己在浏览器中点击"发布"
二、图文笔记流程 (≥ 140字)
流程概览
1. 导航到图文笔记入口
2. 点击"新的创作"按钮
3. 填写标题
4. 填写正文内容
5. 点击"一键排版"选择模板
6. 填写正文摘录和标签
7. 填写其他发布信息
8. 用户确认后发布
步骤 1: 导航到图文笔记入口
URL: https://creator.xiaohongshu.com/publish/publish?target=article
页面加载后会显示"写长文"页面,特征:
- 主标题:"支持千字长文,全屏阅读体验"
- 两个按钮:"新的创作"(红色)和"导入链接"
- 底部有"长文合集"区域
步骤 2: 点击"新的创作"按钮
查找方法:
find: "新的创作 button"
元素特征:
- 类型:
button - 文本: "新的创作"
- 颜色: 红色(主要行动按钮)
步骤 3: 填写标题
点击"新的创作"后,进入长文编辑器。
页面特征:
- 顶部标题: "新的创作"
- 工具栏: H₁、H₂、列表、引用、图片、表情等格式化工具
- 两个输入区域: 标题区和正文区
标题输入框:
find: "输入标题"
element_type: textbox
输入方法:
click(ref_51) // 点击标题输入框
type("小红书自动发布工具使用指南") // 输入标题
步骤 4: 填写正文内容
正文编辑器:
// 正文编辑器是一个 generic 元素(ref_55)
// 不是标准的 textarea
输入方法:
click(ref_55) // 点击正文编辑区域
type("正文内容...") // 输入正文
正文特性:
- 支持富文本编辑
- 字数统计显示在底部:"字数:194"
- 自动保存功能:"自动保存于 HH:MM"
- 最大支持 10000 字
步骤 5: 点击"一键排版"选择模板
一键排版按钮:
find: "一键排版 button"
点击后进入排版预览页面。
排版预览页面特征:
- 左侧: 内容预览(文章卡片形式)
- 右侧: 多种模板选项
- "简约基础"(默认选中 ✓)
- "清新明朗"
- "黑白极简"
- 底部: "拖动滑块快速定位"控件
下一步按钮:
find: "下一步 button"
点击"下一步"进入最终发布页面。
步骤 6: 填写正文内容和标签
页面标题: "发布图文"
重要说明:
- 图文笔记有"正文摘录"输入框,名称虽然是"摘录",但必须填充完整的正文内容
- 不是填写摘要,而是填写全部正文内容 + 标签
正文内容输入框:
find: "输入正文摘录 textarea"
element_type: textbox
输入方法:
click(ref_194) // 点击正文内容输入框
type(完整正文内容 + "\n\n" + 标签) // 输入完整正文 + 标签
内容格式:
- 填充完整的正文内容(不是摘要)
- 在正文结束后换两行
- 然后添加标签(
#开头) - 多个标签用空格分隔
- 建议不超过3个标签
示例:
在这个信息爆炸的时代,内容创作者面临着越来越多的平台和渠道选择。小红书作为一个重要的社交电商平台,已经成为许多创作者分享生活方式和产品推荐的首选平台。
为了提高发布效率,我们开发了这款自动化发布工具。它可以帮助你快速将内容发布到小红书平台,节省大量的重复性工作时间。
本文将详细介绍如何使用这个工具,让你的内容发布工作变得更加轻松高效。无论你是个人创作者还是团队运营,这个工具都能为你带来显著的效率提升。
#小红书发布 #自动化工具 #效率提升
步骤 7: 填写其他发布信息
标题输入框 (可选,通常自动填充):
find: 包含标题文本的 textbox
max_length: 20字符
封面图:
- 系统会自动将长文内容转换为封面图
- 显示在"图片编辑"区域
- 左侧有"添加"按钮可添加更多封面图
其他选项:
- 添加地点
- 添加合集
- 关联群聊
- 活动话题(与文字配图相同)
步骤 8: 发布
发布按钮:
find: "发布 button"
element_type: button
color: 红色
暂存草稿按钮:
find: "暂存草稿 button"
⚠️ 重要提示: 根据安全策略,自动化脚本应该:
- 填充所有内容后停止
- 显示消息提示用户审核
- 不要自动点击"发布"按钮
- 由用户自己在浏览器中点击"发布"
图文笔记 vs 文字配图对比
| 特性 | 文字配图 (< 140字) | 图文笔记 (≥ 140字) |
|---|---|---|
| 入口 URL | target=image |
target=article |
| 编辑方式 | 文字生成图片 | 富文本编辑器 |
| 标题输入 | 第一张图片内容 | 独立标题输入框 |
| 正文输入 | 第二张图片开始 | 正文编辑器 |
| 封面图 | 手动生成多张 | 自动生成封面 |
| 发布页正文区 | 正文文本框 | "正文摘录"输入框 |
| 正文填充方式 | 完整正文 + 标签 | 完整正文 + 标签 |
| 格式化 | 无 | 支持 H1/H2/列表等 |
| 字数限制 | 建议 < 140 | 140-10000字 |
关键提示: 两种模式在发布页面都必须填充完整的正文内容而非摘要或部分内容。
三、通用元素和选择器
登录状态检测
方法 1: 检查用户头像
find: "用户头像"
如果找不到用户头像或显示"登录"按钮,说明未登录。
方法 2: 检查 URL 重定向 如果导航到发布页面后 URL 重定向到登录页面,说明未登录。
错误处理
常见错误提示:
- "请先登录" - 需要用户手动登录
- "内容不能为空" - 未填写必填字段
- "标题不能超过20字" - 标题过长
- "图片数量不足" - 至少需要1张图片
四、最佳实践
1. 内容准备
- 标题: 简洁明了,不超过20字
- 正文: 分段清晰,使用换行增强可读性
- 标签: 选择相关度高的标签,建议2-3个
2. 图片建议
- 文字配图: 至少2张(标题+正文)
- 内容分布:
- 第一张:核心标题或问题
- 后续图片:详细说明、步骤、总结
3. 标签选择
好的标签示例:
#小红书发布#自动化工具
How to use xhs-publisher on Cursor
AI-first code editor with Composer
Prerequisites
Before installing skills in Cursor, ensure your development environment meets these requirements:
- ›Cursor installed and configured on your development machine
- ›Node.js version 16.0+ with npm package manager (verify with
node --version) - ›Active project directory or workspace where you want to add xhs-publisher
Execute installation command
Execute the skills CLI command in your project's root directory to begin installation:
The skills CLI fetches xhs-publisher from GitHub repository byheaven/byheaven-skills and configures it for Cursor.
Select Cursor when prompted
The CLI will show a list of available agents. Use arrow keys to navigate and space to select Cursor:
Verify installation
Confirm successful installation by checking the skill directory location:
Reload or restart Cursor to activate xhs-publisher. Access the skill through slash commands (e.g., /xhs-publisher) or your agent's skill management interface.
Security & Verification Notice
We perform automated surface-level scans (Gen AI Scanner, Socket, Snyk) during installation. These checks detect common vulnerabilities but do not guarantee complete security. Always review skill source code and verify the publisher's reputation before production use.
Skills execute code in your development environment. Always verify the publisher's identity, review recent commits, and test in isolated environments before production deployment.
List & Monetize Your Skill
Submit your Claude Code skill and start earning
Use Cases▌
User Story & Requirements Generation
Create detailed user stories, acceptance criteria, and feature specs
Example
Generate user stories for 'password reset feature' with acceptance criteria, edge cases, and test scenarios
Reduce spec writing time by 50%, ensure comprehensive coverage
Competitive Analysis
Research competitors, compare features, identify gaps
Example
Analyze 5 competitor products, create feature comparison matrix, suggest differentiation opportunities
Complete competitive research in 2 hours instead of 2 days
Roadmap Prioritization
Evaluate features using frameworks (RICE, ICE, Kano) and create prioritized backlogs
Example
Score 20 feature ideas using RICE framework, generate prioritized roadmap with rationale
Make data-driven prioritization decisions faster
Stakeholder Communication
Draft PRDs, status updates, and stakeholder presentations
Example
Create executive summary of Q3 roadmap, monthly progress report, feature launch announcement
Save 3-5 hours/week on communication overhead
Implementation Guide▌
Prerequisites
- ›Claude Desktop or compatible AI client
- ›Access to product documentation and roadmap tools (Jira, Notion, etc.)
- ›Understanding of product management frameworks (RICE, Jobs-to-be-Done, etc.)
- ›Stakeholder contact information and communication channels
Time Estimate
30-60 minutes to see productivity improvements
Installation Steps
- 1.Install product management skill
- 2.Start with user story generation for known feature
- 3.Progress to competitive analysis: research 2-3 competitors
- 4.Use for roadmap prioritization: apply RICE/ICE scoring
- 5.Draft stakeholder communications and refine based on feedback
- 6.Build template library for recurring PM tasks
- 7.Share effective prompts with product team
Common Pitfalls
- ⚠Not validating competitive research—verify facts before sharing
- ⚠Accepting user stories without involving engineering team
- ⚠Over-relying on frameworks without qualitative judgment
- ⚠Not customizing outputs to company culture and communication style
- ⚠Skipping stakeholder validation of generated requirements
Best Practices▌
✓ Do
- +Validate research and competitive analysis with real data
- +Collaborate with engineering when generating technical requirements
- +Customize frameworks and templates to your company context
- +Use skill for first drafts, refine with stakeholder input
- +Document successful prompt patterns for PM tasks
- +Combine AI efficiency with human judgment and intuition
✗ Don't
- −Don't publish competitive analysis without fact-checking
- −Don't finalize user stories without engineering review
- −Don't make prioritization decisions solely on AI scoring
- −Don't skip customer validation of generated requirements
- −Don't ignore company-specific context and culture
💡 Pro Tips
- ★Provide context: company goals, constraints, customer feedback
- ★Ask for alternatives: 'Show 3 ways to prioritize this roadmap'
- ★Request stakeholder-specific formatting: 'Executive summary vs. engineering spec'
- ★Use skill for 70% generation + 30% customization to company needs
When to Use This▌
✓ Use When
Use for user story writing, competitive research, roadmap prioritization, stakeholder communication, and PRD drafting. Best for reducing repetitive documentation and research work.
✗ Avoid When
Avoid for strategic product vision (requires deep customer empathy), pricing decisions (needs market and financial expertise), or when face-to-face customer discovery is more valuable than speed.
Learning Path▌
- 1Basic: user stories, feature specs, status updates
- 2Intermediate: competitive analysis, prioritization frameworks, PRDs
- 3Advanced: product strategy, go-to-market planning, OKR setting
- 4Expert: product vision, market positioning, business model innovation
Discussion
Product Hunt–style comments (not star reviews)- No comments yet — start the thread.
Ratings
4.6★★★★★44 reviews- ★★★★★Xiao Singh· Dec 20, 2024
Solid pick for teams standardizing on skills: xhs-publisher is focused, and the summary matches what you get after install.
- ★★★★★Xiao Srinivasan· Dec 20, 2024
xhs-publisher fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Chaitanya Patil· Dec 12, 2024
xhs-publisher has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Naina Iyer· Dec 4, 2024
Registry listing for xhs-publisher matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Naina Menon· Nov 27, 2024
xhs-publisher reduced setup friction for our internal harness; good balance of opinion and flexibility.
- ★★★★★Meera Sharma· Nov 23, 2024
xhs-publisher fits our agent workflows well — practical, well scoped, and easy to wire into existing repos.
- ★★★★★Xiao Smith· Nov 11, 2024
xhs-publisher has been reliable in day-to-day use. Documentation quality is above average for community skills.
- ★★★★★Xiao Abbas· Nov 11, 2024
Registry listing for xhs-publisher matched our evaluation — installs cleanly and behaves as described in the markdown.
- ★★★★★Piyush G· Nov 3, 2024
Solid pick for teams standardizing on skills: xhs-publisher is focused, and the summary matches what you get after install.
- ★★★★★Anika Wang· Oct 26, 2024
Keeps context tight: xhs-publisher is the kind of skill you can hand to a new teammate without a long onboarding doc.
showing 1-10 of 44