Xiaohongshu Automatic Long-Form Post Publishing
Feature Overview
When users have long-form content ready to publish on Xiaohongshu, automatically completes the entire process: login detection, long content segmentation optimization, AI-generated images, content filling, AI-generated tags, tag activation, original content declaration, and publishing. Only QR code login requires manual operation; all other steps are fully automated.
Trigger Conditions
Trigger this skill when the user mentions any of the following keywords:
- - Xiaohongshu long-form post publishing
- Publish Xiaohongshu long-form post
- Automatically publish Xiaohongshu long-form post
- Xiaohongshu long-form notes
- Xiaohongshu article publishing
- 小红书长文发布
- 发布小红书长文
- 自动发小红书长文
- 小红书长文笔记
- 小红书文章发布
Use Cases
- - Users have existing long-form note content ready to publish on Xiaohongshu
🔄 Workflow
CODEBLOCK0
Step-by-Step Guide
1️⃣ Content Preprocessing
Segmentation Principles:
- - 300-500 characters per paragraph to maintain reading rhythm
- Add subheadings for easy browsing
- Front-load key information; present core points at the beginning of each paragraph
- Appropriate spacing with blank lines between paragraphs
- Moderate use of emojis ✨💡
Content Structure:
CODEBLOCK1
2️⃣ Login Detection
Visit: https://creator.xiaohongshu.com/
| Status | Action |
|---|
| Logged in | Directly enter publishing page |
| Not logged in |
Prompt user to scan QR code, wait for completion |
Technical Implementation:
CODEBLOCK2
3️⃣ Enter Publishing Page
Visit: INLINECODE1
Operation Steps:
- 1. Navigate to the publishing page
- Click the "Write Long-Form Post" button
- Click "New Creation" to enter the editor
Technical Implementation:
CODEBLOCK3
4️⃣ Fill Content
| Field | Requirements |
|---|
| Title | ≤20 characters, containing 1-2 keywords |
| Body Text |
Paste preprocessed content |
Technical Implementation:
CODEBLOCK4
5️⃣ One-Click Formatting
Click the "One-Click Formatting" button; the system automatically optimizes the format.
Technical Implementation:
CODEBLOCK5
6️⃣ Select Template
| Template Type | Applicable Scenarios |
|---|
| Fresh Minimalist | Lifestyle sharing, reading notes |
| Workplace Expertise |
Experience summaries, skill sharing |
| Vibrant Fashion | Beauty/fashion, trending topics |
| Warm Healing | Emotional stories, inspirational content |
| Professional Rigorous | Educational content, tutorials, guides |
| Logical Structure | Tech news, industry analysis |
| Simple Basic | General content |
Principle: Choose based on content theme and target audience
Recommendation: For tech/workplace content, select "Logical Structure" or "Workplace Expertise"
Technical Implementation:
CODEBLOCK6
7️⃣ Generate Body Description
Optimization Principles:
| Element | Requirements |
|---|
| Length | 50-100 characters |
| Content |
Summarize core points or highlights |
| Tone | Conversational, friendly |
| Hook | Create suspense or highlight pain points at the beginning |
| Keywords | Include 1-2 search keywords |
Example:
- - ❌ "This article introduces several methods for time management"
- ✅ "Same 24 hours, why can others get 3 times the work done? These 5 time management techniques doubled my productivity, number 3 is truly amazing!"
Technical Implementation:
CODEBLOCK7
8️⃣ Add Tags
Tag Structure (5-8 total):
| Type | Quantity | Example |
|---|
| Core Tags | 1-2 | #WorkplaceExpertise #LearningMethods |
| Niche Tags |
2-3 | #TimeManagement #Productivity |
| Popular Tags | 1-2 | #OfficeWorkers #Students |
| Long-Tail Tags | 1-2 | #PomodoroTechnique #MorningJournal |
Checklist:
- - ✅ 5-8 tags total
- ✅ Highly relevant to content
- ✅ Balanced popularity (high traffic + precise)
Technical Implementation:
CODEBLOCK8
9️⃣ Declare Original
Operation Steps:
- 1. Check the "Original Content Declaration" checkbox
- In the pop-up, check "I have read and agree"
- Click the "Declare Original" button
Technical Implementation:
CODEBLOCK9
🔟 Publish
Pre-Publishing Checklist:
- - [ ] Title complete and engaging (≤20 characters)
- [ ] Body text formatting looks good
- [ ] Body description engaging (50-100 characters)
- [ ] Tags activated (5-8 tags)
- [ ] Original declaration checked
Technical Implementation:
CODEBLOCK10
Publication Success Indicators:
- - Page displays green checkmark ✅
- Displays "Published Successfully" text
- Automatically returns to homepage after 3 seconds
⚠️ Important Notes
| Item | Description |
|---|
| Content Compliance | Must comply with Xiaohongshu community guidelines; avoid sensitive words |
| Image Copyright |
AI-generated images should avoid copyright risks |
| Publishing Frequency | Avoid publishing too frequently in a short period (recommended interval > 1 hour) |
| Engagement Maintenance | Monitor comments after publishing and respond promptly |
| Title Length | Strictly control within 20 characters; otherwise cannot publish |
| Tag Count | Minimum 3, maximum 8, recommended 5-6 |
🛠️ Error Handling
| Error Scenario | Handling Method |
|---|
| Login expired | Prompt user to scan QR code again; wait for completion and continue |
| Element not found |
Re-snapshot to get latest ref, retry up to 3 times |
| Content injection failed | Check contenteditable element, activate using focus()+click() |
| Image upload failed | Retry up to 3 times; if still failing, skip that image |
| Content moderation prompt | Prompt user to modify sensitive content |
| Publishing frequency limit | Prompt user to wait before retrying (typically 1-24 hours) |
| Title too long | Automatically truncate or have AI regenerate a shorter title |
Debugging Tips:
// 1. Screenshot to confirm current page status
browser.screenshot({ fullPage: true })
// 2. Get latest element references
browser.snapshot({ refs: 'aria' })
// 3. Check if editor is editable
browser.act({ fn: "document.querySelector('[contenteditable]').isContentEditable" })
🔧 Technical Details
Browser Automation Essentials
1. Element Locating:
- - Use
refs: 'aria' to obtain stable aria-ref locators - Avoid using unstable XPath or CSS selectors
2. Content Injection:
CODEBLOCK12
3. Waiting Strategy:
- - Wait 500-1000ms after clicks to allow page to respond
- Use snapshot to confirm element state before proceeding
🔗 Reference Documentation
小红书长文自动发布
功能概述
当用户有长文内容准备在小红书发布时,自动完成整个流程:登录检测、长内容分段优化、AI生成图片、内容填充、AI生成标签、标签激活、声明原创和发布。仅二维码登录需要手动操作,其余步骤全自动完成。
触发条件
当用户提及以下任一关键词时触发此技能:
- - 小红书长文发布
- 发布小红书长文
- 自动发布小红书长文
- 小红书长文笔记
- 小红书文章发布
- 小红书长文发布
- 发布小红书长文
- 自动发小红书长文
- 小红书长文笔记
- 小红书文章发布
使用场景
- - 用户已有准备好的长文笔记内容,需要发布到小红书
🔄 工作流程
- 1. 内容预处理 → 2. 登录检测 → 3. 进入发布页 → 4. 填充内容 →
- 一键排版 → 6. 选择模板 → 7. 生成描述 → 8. 添加标签 →
- 声明原创 → 10. 发布
分步指南
1️⃣ 内容预处理
分段原则:
- - 每段300-500字,保持阅读节奏
- 添加小标题,便于浏览
- 关键信息前置,每段开头呈现核心观点
- 段落间适当留空行
- 适度使用表情符号 ✨💡
内容结构:
开头钩子(50-100字)→ 引发好奇或共鸣
正文段落(每段300-500字)→ 问题/背景 → 分析/方法 → 案例/经验 → 总结/建议
结尾互动(50字)→ 引导评论或收藏
2️⃣ 登录检测
访问: https://creator.xiaohongshu.com/
提示用户扫码,等待完成 |
技术实现:
javascript
// 检测登录状态
browser.navigate(https://creator.xiaohongshu.com/)
// 如果跳转到/login页面,表示未登录
3️⃣ 进入发布页
访问: https://creator.xiaohongshu.com/publish/publish
操作步骤:
- 1. 导航到发布页面
- 点击 写长文 按钮
- 点击 新建创作 进入编辑器
技术实现:
javascript
browser.navigate(https://creator.xiaohongshu.com/publish/publish)
browser.snapshot() // 获取页面元素
browser.act({ kind: click, ref: e111 }) // 点击写长文
browser.act({ kind: click, ref: e148 }) // 点击新建创作
4️⃣ 填充内容
粘贴预处理后的内容 |
技术实现:
javascript
// 填充标题
browser.act({ kind: type, ref: e253, text: 标题内容 })
// 填充正文(使用evaluate注入)
browser.act({
kind: evaluate,
fn: () => { const editor = document.querySelector([contenteditable]); editor.textContent = 正文内容; editor.dispatchEvent(new InputEvent(input, {bubbles: true})); return done; }
})
5️⃣ 一键排版
点击 一键排版 按钮,系统自动优化格式。
技术实现:
javascript
browser.act({ kind: click, ref: e260 }) // 点击一键排版
6️⃣ 选择模板
| 模板类型 | 适用场景 |
|---|
| 清新简约 | 生活分享、读书笔记 |
| 职场干货 |
经验总结、技能分享 |
| 活力时尚 | 美妆/穿搭、热门话题 |
| 温暖治愈 | 情感故事、励志内容 |
| 专业严谨 | 教育内容、教程指南 |
| 逻辑结构 | 科技资讯、行业分析 |
| 简单基础 | 通用内容 |
原则: 根据内容主题和目标受众选择
推荐: 科技/职场类内容选择逻辑结构或职场干货
技术实现:
javascript
browser.act({ kind: click, ref: e334 }) // 点击逻辑结构模板
browser.act({ kind: click, ref: e647 }) // 点击下一步
7️⃣ 生成正文描述
优化原则:
概括核心观点或亮点 |
| 语气 | 口语化、亲切 |
| 钩子 | 开头设置悬念或突出痛点 |
| 关键词 | 包含1-2个搜索关键词 |
示例:
- - ❌ 本文介绍了几种时间管理方法
- ✅ 同样的24小时,为什么别人能完成3倍的工作量?这5个时间管理技巧让我效率翻倍,第3个真的太绝了!
技术实现:
javascript
browser.act({ kind: type, ref: e706, text: 描述内容 })
8️⃣ 添加标签
标签结构(共5-8个):
| 类型 | 数量 | 示例 |
|---|
| 核心标签 | 1-2 | #职场干货 #学习方法 |
| 细分标签 |
2-3 | #时间管理 #效率提升 |
| 热门标签 | 1-2 | #打工人 #学生党 |
| 长尾标签 | 1-2 | #番茄工作法 #晨间日记 |
检查清单:
- - ✅ 共5-8个标签
- ✅ 与内容高度相关
- ✅ 热度均衡(高流量+精准)
技术实现:
javascript
browser.act({ kind: click, ref: e723 }) // 点击话题按钮
browser.act({ kind: click, ref: e1033 }) // 点击推荐标签#人工智能
browser.act({ kind: click, ref: e712 }) // 点击推荐标签#大语言模型
9️⃣ 声明原创
操作步骤:
- 1. 勾选 原创内容声明 复选框
- 在弹出的窗口中勾选 我已阅读并同意
- 点击 声明原创 按钮
技术实现:
javascript
browser.act({ kind: click, ref: e806 }) // 勾选原创声明
browser.act({ kind: click, ref: e1083 }) // 勾选同意框
browser.act({ kind: click, ref: e1088 }) // 点击声明原创
🔟 发布
发布前检查清单:
- - [ ] 标题完整且有吸引力(≤20字)
- [ ] 正文排版美观
- [ ] 正文描述有吸引力(50-100字)
- [ ] 标签已激活(5-8个)
- [ ] 原创声明已勾选
技术实现:
javascript
browser.act({ kind: click, ref: e1013 }) // 点击发布
发布成功标志:
- - 页面显示绿色对勾 ✅
- 显示发布成功文字
- 3秒后自动返回首页
⚠️ 重要注意事项
| 项目 | 说明 |
|---|
| 内容合规 | 必须遵守小红书社区规范,避免敏感词 |
| 图片版权 |
AI生成的图片需避免版权风险 |
| 发布频率 | 避免短时间内频繁发布(建议间隔>1小时) |
| 互动维护 | 发布后关注评论并及时回复 |
| 标题长度 | 严格控制在20字以内,否则无法发布 |
| 标签数量 | 最少3个,最多8个,建议5-6个 |
🛠️ 错误处理
| 错误场景 | 处理方法 |
|---|
| 登录过期 | 提示用户重新扫码,等待完成后继续 |
| 元素未找到 |
重新截图获取最新ref,最多重试3次 |
| 内容注入失败 | 检查contenteditable元素,使用focus()+click()激活 |
| 图片上传失败 | 最多重试3次,仍失败则跳过该图片 |
| 内容审核提示 | 提示用户修改敏感内容 |
| 发布频率限制 | 提示用户等待后重试(通常1-24小时) |
| 标题过长 | 自动截断或让AI