xhs-kit-publisher
使用xhs-kit Python库高效发布小红书内容,无需浏览器,支持多账号和定时发布
Why use this skill?
Learn to automate your Xiaohongshu content workflow with xhs-kit-publisher. Manage multiple accounts, schedule posts, and eliminate browser bloat easily.
Install via CLI (Recommended)
clawhub install openclaw/skills/skills/glittering/xhs-kit-publisherWhat This Skill Does
The xhs-kit-publisher skill is a specialized automation tool designed for efficient content management on the Xiaohongshu (Little Red Book) platform. Unlike traditional browser-based automation that relies on heavy UI rendering and prone-to-failure interactions, this skill utilizes a lightweight Python-based approach. It enables users to authenticate via QR code, maintain multiple persistent session cookies, and trigger content publishing directly from their terminal or automated scripts. By eliminating the need for a GUI, it significantly reduces system resource consumption and increases the stability of mass-publishing workflows.
Installation
To get started with xhs-kit-publisher, ensure you have Python 3.8+ installed on your system. Follow these steps in your terminal:
- Create a dedicated virtual environment for the project:
python3 -m venv xhs-env && source xhs-env/bin/activate. - Install the core library:
pip install -U xhs-kit. - Ensure browser drivers are available:
playwright install chromium. - Install necessary support libraries:
pip install pillow requests markdown pyyaml. Finally, executeclawhub install openclaw/skills/skills/glittering/xhs-kit-publisherto register the skill within the OpenClaw environment.
Use Cases
- Social Media Marketing: Manage multiple brand accounts simultaneously for consistent cross-posting of promotional content.
- Content Scheduling: Automate the publishing of batches of content at optimal engagement times without manual intervention.
- Mass Posting Operations: Efficiently distribute high volumes of localized content using simple scripts while ensuring safety intervals between posts.
- Automated Reporting & Debugging: Use the built-in debug mode to validate metadata, images, and content formatting before committing to a live publish.
Example Prompts
- "Publish a new post with title 'Summer Travel Hacks' and content 'Follow these 5 tips for a cheaper vacation' using the account stored in account1.json, and include the image located at ./images/summer.jpg."
- "Schedule my upcoming promotional content for tomorrow at 10 AM, making sure to use the primary cookie file configured in my environment."
- "Run a debug test for my draft article to ensure the tags and image size comply with Xiaohongshu platform standards before I perform the final batch upload."
Tips & Limitations
- Rate Limiting: Always include a
sleepdelay in your scripts if publishing more than five items in quick succession to avoid account flagging. - Image Optimization: While the tool supports various image formats, keeping file sizes under 2MB ensures faster uploads and better reliability.
- Cookie Security: The generated session cookies grant full access to your account. Ensure the
config/directory permissions are restricted to your user account to prevent unauthorized access. - Maintenance: Small updates to the platform UI can occasionally break API endpoints; always check the library documentation for updates if you encounter authentication errors.
Metadata
Not sure this is the right skill?
Describe what you want to build — we'll match you to the best skill from 16,000+ options.
Find the right skillPaste this into your clawhub.json to enable this plugin.
{
"plugins": {
"official-glittering-xhs-kit-publisher": {
"enabled": true,
"auto_update": true
}
}
}Tags(AI)
Flags: network-access, file-write, file-read, external-api