X
xiaohongshu-publisher
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
- 01Convert content to Xiaohongshu format
- 02Shorten articles and extract key points
- 03Publish directly through the service
- 04Support titles, text, and images
Use cases
- 01Adapt a long article into a Xiaohongshu post
- 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-publisherAfter installing, type/xiaohongshu-publisherin Claude Code to confirm it loaded.
Bundled files
References and scripts installed along with SKILL.md.
publisher.pyREADME.mdsimple_publish.pyscripts/content_adapter.pyimage_generator.pyxiaohongshu_client.pyDetails
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", "科技"]
}'
前置要求
-
xiaohongshu-mcp 服务运行中
docker ps | grep xiaohongshu-mcp -
已登录小红书账号
- Cookies 已配置到
~/xiaohongshu-mcp/docker/data/cookies.json
- Cookies 已配置到
限制
- 标题: 最多20字
- 正文: 最多1000字(含emoji)
- 图片: 最多9张
API端点
- 发布接口:
http://localhost:18060/api/v1/publish - 方法: POST
- Content-Type: application/json
Comments
Markdown supported