Install
openclaw skills install xiaohongshu-longpost-autoWhen 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.
openclaw skills install xiaohongshu-longpost-autoWhen 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 this skill when the user mentions any of the following keywords:
1. Content Preprocessing → 2. Login Detection → 3. Enter Publishing Page → 4. Fill Content →
5. One-Click Formatting → 6. Select Template → 7. Generate Description → 8. Add Tags →
9. Declare Original → 10. Publish
Segmentation Principles:
Content Structure:
Opening Hook (50-100 chars) → Spark curiosity or resonate
Body Paragraphs (300-500 chars each) → Problem/Background → Analysis/Methods → Cases/Experience → Summary/Suggestions
Closing Interaction (50 chars) → Encourage comments or saves
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:
// Detect login status
browser.navigate('https://creator.xiaohongshu.com/')
// If redirected to /login page, not logged in
Visit: https://creator.xiaohongshu.com/publish/publish
Operation Steps:
Technical Implementation:
browser.navigate('https://creator.xiaohongshu.com/publish/publish')
browser.snapshot() // Get page elements
browser.act({ kind: 'click', ref: 'e111' }) // Click "Write Long-Form Post"
browser.act({ kind: 'click', ref: 'e148' }) // Click "New Creation"
| Field | Requirements |
|---|---|
| Title | ≤20 characters, containing 1-2 keywords |
| Body Text | Paste preprocessed content |
Technical Implementation:
// Fill title
browser.act({ kind: 'type', ref: 'e253', text: 'Title content' })
// Fill body text (inject using evaluate)
browser.act({
kind: 'evaluate',
fn: "() => { const editor = document.querySelector('[contenteditable]'); editor.textContent = 'Body content'; editor.dispatchEvent(new InputEvent('input', {bubbles: true})); return 'done'; }"
})
Click the "One-Click Formatting" button; the system automatically optimizes the format.
Technical Implementation:
browser.act({ kind: 'click', ref: 'e260' }) // Click "One-Click Formatting"
| 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:
browser.act({ kind: 'click', ref: 'e334' }) // Click "Logical Structure" template
browser.act({ kind: 'click', ref: 'e647' }) // Click "Next"
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:
Technical Implementation:
browser.act({ kind: 'type', ref: 'e706', text: 'Description content' })
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:
Technical Implementation:
browser.act({ kind: 'click', ref: 'e723' }) // Click "Topic" button
browser.act({ kind: 'click', ref: 'e1033' }) // Click recommended tag "#ArtificialIntelligence"
browser.act({ kind: 'click', ref: 'e712' }) // Click recommended tag "#LargeLanguageModels"
Operation Steps:
Technical Implementation:
browser.act({ kind: 'click', ref: 'e806' }) // Check original declaration
browser.act({ kind: 'click', ref: 'e1083' }) // Check agreement box
browser.act({ kind: 'click', ref: 'e1088' }) // Click "Declare Original"
Pre-Publishing Checklist:
Technical Implementation:
browser.act({ kind: 'click', ref: 'e1013' }) // Click "Publish"
Publication Success Indicators:
| 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 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" })
1. Element Locating:
refs: 'aria' to obtain stable aria-ref locators2. Content Injection:
// Recommended method: Use evaluate + dispatchEvent
browser.act({
kind: 'evaluate',
fn: "() => {
const editor = document.querySelector('[contenteditable]');
editor.textContent = 'Content';
editor.dispatchEvent(new InputEvent('input', { bubbles: true }));
return 'done';
}"
})
3. Waiting Strategy: