xhs-publisher

Automate Xiaohongshu posting workflows with persistent sessions and AI-generated content.

6|Updated Mar 2, 2026
One-click install
npx skills add https://github.com/PengJiyuan/xhs-skill --skill xhs-publisher-pengjiyuan
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xhs-publisher
Source: https://github.com/PengJiyuan/xhs-skill/tree/main
Command: npx skills add https://github.com/PengJiyuan/xhs-skill --skill xhs-publisher-pengjiyuan

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires playwright, pillow, cryptography, requests, and includes scripts (resource) components.

What problem does it solve?

小红书笔记的发布流程繁琐且重复,需多步操作来完成登录、内容生成、图片生成与最终发布。本 Skill 提供一个端到端的自动化解决方案,整合登录会话持久化、AI 辅助文案与图片生成、以及一键发布能力,显著提升内容创作与分发效率。

Core Features & Use Cases

  • 持久化登录与会话管理:通过浏览器数据目录实现第一次登录后后续无需再次扫码即可发布。
  • AI 内容与图片生成:基于标题与文本内容自动生成风格化文案,提供封面模板和多张配图选项,支持水印与 AI 合成声明合规要求。
  • 多账号管理:支持多个小红书账号的独立浏览器数据目录与切换,方便跨账号内容分发。
  • 全流程自动化发布:从上传图片、填写标题与正文、自动提取标签到最终发布,提供失败重试与回溯机制。

Quick Start

登录一次并保持会话后,使用 xhs_auto.py 发布笔记,传入标题、正文与标签即可完成发布。

Frequently Asked Questions about xhs-publisher

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate Xiaohongshu posting with AI-generated content and images?

Automating Xiaohongshu posting is achieved by orchestrating login, content generation, image creation, and publishing into a single end-to-end workflow. The process handles everything from AI-assisted copywriting to cover image synthesis and final note distribution.

Can I manage multiple Xiaohongshu accounts for automated publishing?

Yes, multi-account publishing is supported through independent browser data directories. This setup allows you to manage and switch between multiple Xiaohongshu accounts to facilitate cross-account content distribution without session conflicts.

How does persistent login work for Xiaohongshu automation?

Persistent login works by saving browser session data to a specific directory after your first QR code scan. This mechanism ensures subsequent automated publishing attempts do not require repeated manual logins or scanning.

Does the Xiaohongshu automation tool support headless mode and error recovery?

Yes, the Xiaohongshu automation tool supports both headless and non-headless browser modes. It includes production-grade error handling with automatic failure retries, progress reporting, and robust recovery mechanisms for publishing workflows.

What dependencies do I need for automated Xiaohongshu note publishing?

Automated Xiaohongshu publishing requires Python dependencies including Playwright for browser automation, Pillow for image processing, Cryptography for session security, and Requests for API interactions to ensure stable multi-account content generation.

Why does my automated Xiaohongshu publishing fail during image upload?

Automated publishing failures during image upload usually trigger the built-in retry and error handling mechanism. Check if your pluggable LLM or image generation backend is configured correctly, as the system relies on these for cover creation and fallbacks.