xiaohongshu-publisher

Draft and publish posts to 小红书 (Xiaohongshu/RED). Use when creating content for 小红书, drafting posts, generating cover images, or publishing via browser automation. Covers the full workflow from content creation to browser-based publishing, including cover image generation with Pillow.

16 stars

Best use case

xiaohongshu-publisher is best used when you need a repeatable AI agent workflow instead of a one-off prompt.

Draft and publish posts to 小红书 (Xiaohongshu/RED). Use when creating content for 小红书, drafting posts, generating cover images, or publishing via browser automation. Covers the full workflow from content creation to browser-based publishing, including cover image generation with Pillow.

Teams using xiaohongshu-publisher should expect a more consistent output, faster repeated execution, less prompt rewriting.

When to use this skill

  • You want a reusable workflow that can be run more than once with consistent structure.

When not to use this skill

  • You only need a quick one-off answer and do not need a reusable workflow.
  • You cannot install or maintain the underlying files, dependencies, or repository context.

Installation

Claude Code / Cursor / Codex

$curl -o ~/.claude/skills/xiaohongshu-publisher/SKILL.md --create-dirs "https://raw.githubusercontent.com/diegosouzapw/awesome-omni-skill/main/skills/cli-automation/xiaohongshu-publisher/SKILL.md"

Manual Installation

  1. Download SKILL.md from GitHub
  2. Place it in .claude/skills/xiaohongshu-publisher/SKILL.md inside your project
  3. Restart your AI agent — it will auto-discover the skill

How xiaohongshu-publisher Compares

Feature / Agentxiaohongshu-publisherStandard Approach
Platform SupportNot specifiedLimited / Varies
Context Awareness High Baseline
Installation ComplexityUnknownN/A

Frequently Asked Questions

What does this skill do?

Draft and publish posts to 小红书 (Xiaohongshu/RED). Use when creating content for 小红书, drafting posts, generating cover images, or publishing via browser automation. Covers the full workflow from content creation to browser-based publishing, including cover image generation with Pillow.

Where can I find the source code?

You can find the source code on GitHub using the link provided at the top of the page.

SKILL.md Source

# 小红书 Publisher

Create, format, and publish posts to 小红书 (Xiaohongshu/RED) through browser automation.

## Requirements

- **Python 3** with **Pillow** (`pip install Pillow` or `apt install python3-pil`)
- **CJK fonts** — `fonts-noto-cjk` on Linux (`apt install fonts-noto-cjk`), or Noto Sans CJK via Homebrew on macOS
- **OpenClaw browser tool** — access to a browser with the user logged into 小红书 creator portal
- A connected **OpenClaw node** (or sandbox browser) with Chrome/Chromium for browser automation

## Overview

This skill handles the complete 小红书 publishing pipeline:
1. **Draft** — Write post content in 小红书 style
2. **Cover** — Generate a cover image (1080×1440)
3. **Review** — Send draft to user for approval via messaging channel
4. **Publish** — Use browser automation to post (or deliver for manual posting)

## Workflow

### Step 1: Draft Content

Create post content following 小红书 style. See [references/content-guide.md](references/content-guide.md) for formatting rules, structure, and examples.

Key rules:
- Title ≤20 chars, with emoji hook
- Use `---` section breaks, emoji bullets, short paragraphs
- End with question CTA + hashtags (8-12 tags)
- Save draft to `memory/xiaohongshu-draft.md`

### Step 2: Generate Cover Image

Run the cover generation script:

```bash
python3 <skill-dir>/scripts/gen_cover.py --title "主标题" --subtitle "副标题" --tags "标签1,标签2,标签3" --output /path/to/cover.png
```

Options:
- `--title` — Main title (large text, required)
- `--subtitle` — Subtitle line (medium text, optional)
- `--tags` — Comma-separated feature tags shown as pills (optional)
- `--badge` — Top-right badge text (default: "OpenClaw")
- `--output` — Output path (default: `cover.png`)
- `--gradient` — Color scheme: `purple` (default), `blue`, `green`, `orange`, `dark`

Output: 1080×1440 PNG with gradient background, decorative elements, CJK text.

### Step 3: Send for Review

Send the draft content + cover image to the user's messaging channel for review. Format:

```
📝 小红书草稿 — [主题]

标题:[标题]

[正文内容]

封面图已生成:[path]

请确认:
✅ 可以发布
✏️ 需要修改
❌ 不发
```

**Never auto-publish.** Always wait for explicit user approval.

### Step 4: Publish via Browser

After user approval, publish using browser automation on the configured node.

See [references/browser-publish.md](references/browser-publish.md) for the complete browser automation steps.

Summary:
1. Navigate to `https://creator.xiaohongshu.com/publish/publish`
2. Enter title and body text
3. Upload cover image via browser `upload` action
4. Click publish

### Fallback: Manual Publishing

If browser automation is unavailable (CDP issues, node offline, etc.), send the complete post to the user's channel with all content formatted for easy copy-paste:

```
📋 小红书发帖内容(请手动发布)

【标题】[标题]

【正文】
[正文内容]

【标签】[hashtags]

封面图:[path to cover image]
```

## Known Limitations

- **Mac Chrome CDP**: Chrome launched via SSH/node may fail to bind `--remote-debugging-port` on macOS (GUI session required). If `browser start` fails, fall back to manual publishing.
- **Login state**: 小红书 creator portal requires login. If the session has expired, ask the user to re-login in their browser before proceeding.
- **Pillow emoji**: Pillow cannot render color emoji (NotoColorEmoji.ttf) — use text/icon alternatives in cover images.

## Cron Integration

This skill works with cron jobs for scheduled daily posting. Typical cron setup:

```
Schedule: 0 8 * * * (Asia/Shanghai)
Session: isolated agentTurn
Delivery: announce to user's channel
```

The cron job message should reference this skill and include the content plan/topic for the day.

Related Skills

image-publisher

16
from diegosouzapw/awesome-omni-skill

Upload local images to image hosting services and get accessible URLs. Use this skill when the user wants to upload a local image file to an image host and get the public URL. Supports GitHub and S3-compatible storage (Qiniu, Aliyun OSS, Tencent COS, etc.).

content-publisher

16
from diegosouzapw/awesome-omni-skill

Autonomous content creation, review, and multi-platform publishing for ACT ecosystem. Includes Empathy Ledger Content Hub for photography, videography, and storytelling with AI-powered tagging and ecosystem syndication.

x-article-publisher-skill

16
from diegosouzapw/awesome-omni-skill

Publish articles to X/Twitter

bgo

10
from diegosouzapw/awesome-omni-skill

Automates the complete Blender build-go workflow, from building and packaging your extension/add-on to removing old versions, installing, enabling, and launching Blender for quick testing and iteration.

Coding & Development

large-data-with-dask

16
from diegosouzapw/awesome-omni-skill

Specific optimization strategies for Python scripts working with larger-than-memory datasets via Dask.

langsmith-fetch

16
from diegosouzapw/awesome-omni-skill

Debug LangChain and LangGraph agents by fetching execution traces from LangSmith Studio. Use when debugging agent behavior, investigating errors, analyzing tool calls, checking memory operations, or examining agent performance. Automatically fetches recent traces and analyzes execution patterns. Requires langsmith-fetch CLI installed.

langchain-tool-calling

16
from diegosouzapw/awesome-omni-skill

How chat models call tools - includes bind_tools, tool choice strategies, parallel tool calling, and tool message handling

langchain-notes

16
from diegosouzapw/awesome-omni-skill

LangChain 框架学习笔记 - 快速查找概念、代码示例和最佳实践。包含 Core components、Middleware、Advanced usage、Multi-agent patterns、RAG retrieval、Long-term memory 等主题。当用户询问 LangChain、Agent、RAG、向量存储、工具使用、记忆系统时使用此 Skill。

langchain-js

16
from diegosouzapw/awesome-omni-skill

Builds LLM-powered applications with LangChain.js for chat, agents, and RAG. Use when creating AI applications with chains, memory, tools, and retrieval-augmented generation in JavaScript.

langchain-agents

16
from diegosouzapw/awesome-omni-skill

Expert guidance for building LangChain agents with proper tool binding, memory, and configuration. Use when creating agents, configuring models, or setting up tool integrations in LangConfig.

lang-python

16
from diegosouzapw/awesome-omni-skill

Python 3.13+ development specialist covering FastAPI, Django, async patterns, data science, testing with pytest, and modern Python features. Use when developing Python APIs, web applications, data pipelines, or writing tests.

kramme:agents-md

16
from diegosouzapw/awesome-omni-skill

This skill should be used when the user asks to "update AGENTS.md", "add to AGENTS.md", "maintain agent docs", or needs to add guidelines to agent instructions. Guides discovery of local skills and enforces structured, keyword-based documentation style.