mcpField
X
xiaohongshu-publisher

xiaohongshu-publisher

github.com/solar-lunaMarketing & growth72151 installsUpdated 40w ago
Repository

About xiaohongshu-publisher

xiaohongshu-publisher is a Skill for preparing and publishing content to Xiaohongshu. It is intended for users automating social posts, and can shorten long articles before publishing through xiaohongshu-mcp.

Key features

  1. 01Convert content to Xiaohongshu format
  2. 02Shorten articles and extract key points
  3. 03Publish directly through the service
  4. 04Support titles, text, and images

Use cases

  1. 01Adapt a long article into a Xiaohongshu post
  2. 02Publish content to a logged-in Xiaohongshu account

MCP support

The Skill publishes content to Xiaohongshu through the xiaohongshu-mcp service.

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/solar-luna/fully-automatic-article-generation-skill --skill xiaohongshu-publisher

After installing, type/xiaohongshu-publisherin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

publisher.py
README.md
simple_publish.py
scripts/
content_adapter.py
image_generator.py
xiaohongshu_client.py

Details

From the project README

小红书自动发布 Skill

自动将内容发布到小红书平台。

功能

  • 格式转换: 将文章内容转换为小红书格式(≤1000字,emoji风格)
  • 智能压缩: 将长文章压缩到1000字以内,提取核心要点
  • 直接发布: 通过xiaohongshu-mcp服务直接发布到小红书账号

使用场景

当用户说以下类似话术时使用此Skill:

  • "发布到小红书"
  • "推送到小红书"
  • "小红书发布"
  • "同步到小红书"
  • "发一篇小红书"

使用方法

方法1:简化脚本发布(推荐,快速)
cd ~/.claude/skills/xiaohongshu-publisher
python3 simple_publish.py "标题" "内容内容"

示例:

python3 simple_publish.py \
  "Gemini 3 Pro炸场了" \
  "🔥 Gemini 3 Pro炸场了!核心亮点:🏆推理能力第一..."
方法2:完整功能发布
cd ~/.claude/skills/xiaohongshu-publisher
python3 publisher.py \
  --title "文章标题" \
  --content "文章内容或文件路径" \
  --cover "封面图路径"
方法3:直接REST API调用
curl -s -X POST http://localhost:18060/api/v1/publish \
  -H "Content-Type: application/json" \
  -d '{
    "title": "标题",
    "content": "内容",
    "images": ["/app/images/cover.png"],
    "tags": ["AI", "科技"]
  }'

前置要求

  1. xiaohongshu-mcp 服务运行中

    docker ps | grep xiaohongshu-mcp
    
  2. 已登录小红书账号

    • Cookies 已配置到 ~/xiaohongshu-mcp/docker/data/cookies.json

限制

  • 标题: 最多20字
  • 正文: 最多1000字(含emoji)
  • 图片: 最多9张

API端点

  • 发布接口: http://localhost:18060/api/v1/publish
  • 方法: POST
  • Content-Type: application/json

Comments

Markdown supported