1uokun/xiaohongshu-skill
Overview
This skill automates content publishing to Xiaohongshu (Little Red Book), providing login status checks and image+text post publishing using built-in JavaScript and Playwright. It runs locally without requiring an external MCP server and saves browser session data to speed repeated use. The skill supports titles, body text, images (local or HTTP/HTTPS), and topic tags with platform-aware constraints.
How this skill works
The skill uses Playwright to launch a Chromium browser, inspect page DOM to determine login state, and drive the Xiaohongshu web UI to create posts. Publishing accepts a title, body text, a list of image paths or URLs, and up to three topic tags; images are downloaded automatically when given as HTTP/HTTPS links. The tool enforces title length limits and appends the required ending marker to every post.
When to use it
- When you need to publish multiple image+text posts to Xiaohongshu from a local workflow.
- When you want automated checks to ensure the Xiaohongshu account is logged in before publishing.
- When you need to upload a mix of local images and remote image URLs automatically.
- When you want to standardize post structure including title, body, tags, and the mandatory ending note.
- When preparing scheduled or batch content and validating platform constraints programmatically.
Best practices
- Install Node.js and Playwright before running scripts: npm install playwright && npx playwright install chromium.
- Manually log in the first time so the browser session can be saved for subsequent automated runs.
- Keep titles short (platform limit—up to ~20 characters/words) and supply tags separately via the tags parameter.
- Provide at least one image; mix local absolute paths and HTTP/HTTPS links as needed (remote images will be downloaded).
- Validate content and image paths locally before invoking publish to avoid partial uploads or failures.
Example use cases
- Batch publish a travel photo diary: title + body + multiple images + #travel tag.
- Automate a daily product highlight post with consistent ending marker for attribution.
- Pre-check login status in a CI step before triggering a content publishing job.
- Migrate curated content where images are stored remotely: pass URLs and let the skill download them.
FAQ
Yes—first run requires a manual login so Playwright can store the browser session; future runs reuse that session unless cleared.
What image formats and sources are supported?
Local absolute file paths and HTTP/HTTPS image links are supported; common formats (JPEG, PNG) are accepted and remote images are downloaded automatically.