← Back to Skills Marketplace
baoshan685

Easy Xiaohongshu

by baoshan685 · GitHub ↗ · v0.2.4 · MIT-0
cross-platform ✓ Security Clean
224
Downloads
2
Stars
1
Active Installs
13
Versions
Install in OpenClaw
/install easy-xiaohongshu
Description
根据主题生成小红书图文内容,并在本地 `xiaohongshu-mcp` 可用时辅助发布图文笔记。
README (SKILL.md)

Easy-xiaohongshu - 小红书 AI 图文自动发布

从创意到发布,全自动完成 — 提示词优化 → 图文生成 → 一键发布


核心能力

能力 描述
🤖 智能提示词优化 根据账号定位自动匹配最佳风格(13 种预设)
📝 图文生成 文案 + 排版 + AI 成品图,一站式完成
📱 自动发布 通过 MCP 服务一键发布到小红书
📋 发布文案生成 自动生成标题 + 正文 + 标签

快速开始

Step 1:获取 API Key

  1. z.3i0.cn 注册账号
  2. 在钱包管理中按需充值(生图有成本,最低 0.2 元/张)
  3. 在令牌管理中点击【添加令牌】
  4. 输入名称等信息后保存
  5. 复制生成的 API Key

Step 2:安装技能

cd ~/clawd/skills/Easy-xiaohongshu
bash install.sh

安装脚本会:

  • ✅ 检查 Python 环境
  • ✅ 安装依赖
  • ✅ 引导 API Key 配置
  • ✅ 检查 MCP 服务状态

Step 3:发送创作主题

我想发一篇主题为【xxxxxx】的小红书,帮我制作内容

Step 4:确认文案

技能会同时生成:

  • 📄 图文方案(8 页图文内容)
  • 📝 发布文案(标题 + 正文 + 标签)

确认没问题后进入下一步。

Step 5:确认图片

8 张成品图会逐张生成并发给你预览,确认效果后进入下一步。

Step 6:发布到小红书

技能会通过 MCP 服务自动发布。首次使用需要扫码登录,之后无需重复登录。发布前会再次确认。


支持的风格预设

账号类型 风格 适合场景
科技博主 极简科技感 AI 工具、数码测评
亲子博主 温馨插画风 育儿经验、亲子互动
美妆博主 高级 ins 风 护肤教程、彩妆分享
健身博主 活力运动风 健身计划、减脂塑形
美食博主 治愈系 家常菜、美食探店
学习博主 清新简约 学习方法、考试经验
旅行博主 电影感 旅行攻略、风景摄影
职场博主 商务简约 职场技能、时间管理
漫画博主 热血漫画风 动漫解析、漫画推荐
摄影博主 胶片质感 摄影教程、作品分享
穿搭博主 时尚杂志风 穿搭分享、OOTD
游戏博主 电竞科技风 游戏攻略、测评
音乐博主 唱片封面风 歌单推荐、音乐分享

自动发布(可选)

发布功能需要 xiaohongshu-mcp 服务,参考 xhs-mac-mcp 技能安装。

MCP 配置

config/local-config.json 中配置:

{
  "mcp": {
    "url": "http://localhost:18060/mcp",
    "timeout_seconds": 30
  }
}

文件结构

Easy-xiaohongshu/
├── SKILL.md                    # 技能说明(本文件)
├── README.md                   # 详细文档
├── install.sh                  # 一键安装脚本
├── requirements.txt            # Python 依赖
├── config/
│   ├── default-config.json     # 默认配置
│   └── local-config.json       # 本地配置(API Key 等)
├── scripts/
│   ├── optimize_prompt.py      # 提示词优化器
│   ├── generate_content.py     # 文案生成器
│   ├── generate_image.py       # 图片生成器
│   └── publish_to_xhs.py       # 小红书发布
├── references/
│   ├── style-presets.json      # 13 种风格预设
│   ├── hashtag-library.json    # 标签库
│   ├── prompt-template.md      # 提示词模板
│   └── caption-template.md     # 文案模板
└── generated_images/           # 生成的图片输出目录

依赖

依赖 用途 必需
Python 3.8+ 脚本运行
requests HTTP 请求
Z3i0 API 图像生成
xiaohongshu-mcp 自动发布 发布时必需

配置说明

API 配置

建议先复制示例文件:

cp config/local-config.example.json config/local-config.json

config/local-config.json 中配置:

{
  "api": {
    "key": "你的 API Key",
    "base_url": "https://z.3i0.cn/v1beta",
    "model": "gemini-3.1-flash-image-preview"
  },
  "user_preferences": {
    "account_type": "漫画博主",
    "content_direction": "动漫解析",
    "target_audience": "二次元爱好者"
  }
}

用户偏好

技能会记住你的账号类型偏好,下次使用时自动应用。如需修改,重新运行 install.sh 或手动编辑 local-config.json


输出内容

文件 描述
generated_content.json 生图原始文本 + page_prompts 结构化提示词
generated_caption.json 发布文案(标题 + 正文 + 标签)
generated_images/*.png 生成的 8 张成品图

常见问题

Q: API Key 在哪里获取?

A: 在 z.3i0.cn 注册后,在令牌管理中创建。

Q: 发布失败怎么办?

A: 检查 MCP 服务是否运行,首次发布需要扫码登录。

Q: 可以修改风格预设吗?

A: 可以,编辑 references/style-presets.json


许可证

MIT License


更新日志

  • 2026-03-23: 添加 install.sh 安装脚本、完善 13 种风格预设、集成提示词优化器
Usage Guidance
This skill is internally coherent for generating content and publishing via a local MCP service, but take simple precautions before installing or running it: - Inspect install.sh, setup-auto-sync.sh, and auto-sync.sh before running. auto-sync.sh will git add & commit everything in the skill directory — it can accidentally commit your API key or other secrets if you run it or if setup-auto-sync.sh enables periodic sync. - The API key for z.3i0.cn is stored in config/local-config.json (plaintext) by the installer. Consider using environment-only configuration (EASY_XHS_CONFIG) or ensure config/local-config.json is in your .gitignore and not pushed to any remote. - The skill contacts z.3i0.cn for generation and assumes a local MCP service at http://localhost:18060/mcp for publishing. If you don’t run a local MCP service, publishing won’t work — it will not contact official Xiaohongshu endpoints directly. - Pip installs only the requests package per requirements.txt, but run pip in an isolated venv if you prefer. - Be aware of per-image costs on the z.3i0.cn service (documented in SKILL.md). Monitor usage and billing on that account. If you want stronger assurance, request the contents of setup-auto-sync.sh and publish-related scripts (publish_to_xhs.py) to confirm they don’t perform unexpected network calls, push commits, or create background services.
Capability Assessment
Purpose & Capability
Name/description (generate Xiaohongshu posts + optional MCP publish) match the code and SKILL.md. The code calls the declared external image/text service (z.3i0.cn) and expects a local MCP endpoint for publishing. No unrelated credentials or strange external hosts are required.
Instruction Scope
SKILL.md and the scripts focus on prompt optimization, content/image generation (via the Z3i0/Gemini-style API) and optional local publishing through xiaohongshu-mcp. The install script only checks Python, installs requirements, writes a local config, and checks the MCP endpoint. It does not ask the agent to read unrelated system files or contact unexpected remote endpoints.
Install Mechanism
There is no registry install that downloads arbitrary archives. The package is code+scripts included in the skill bundle and an install.sh that installs Python deps via pip (requirements.txt contains only requests). No remote downloads from unknown personal servers are performed by the provided scripts.
Credentials
The skill needs an API key for z.3i0.cn (documented in SKILL.md and config). It also supports environment overrides (EASY_XHS_CONFIG, XHS_MCP_URL). These are proportionate to the stated functionality. Note: the install script writes the API key in plaintext to config/local-config.json; that file can be accidentally committed if not excluded.
Persistence & Privilege
The skill is not set to always:true and does not request elevated agent privileges. However the repository includes auto-sync.sh and setup-auto-sync.sh (present but not fully inspected here). auto-sync.sh will 'git add -A' and commit changes in the skill directory — this could inadvertently include plaintext API keys or other secrets if run or if setup-auto-sync.sh wires it into a cron/automation. Review those scripts before running them.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install easy-xiaohongshu
  3. After installation, invoke the skill by name or use /easy-xiaohongshu
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v0.2.4
清理 git 相关配置
v0.2.3
补充 GitHub 项目地址到技能说明
v0.2.2
移除 SKILL.md 常见问题中的图片成本问答
v0.2.1
合并图片生成与发布文案为一体化提示词;更新内容生成逻辑以一次产出图文与caption;删除价格Q&A
v0.2.0
新增 install.sh 安装脚本;完善 13 种风格预设;集成提示词优化器;补充发布文案自动生成(标题/正文/标签);更新 README 与 SKILL 文档。
v1.0.7
Restore v1.0.4: 13 style presets, 14 hashtag categories, theme→style recommendation, API-based content & image generation
v1.0.6
Add config files, scripts, and references for complete workflow
v1.0.5
- 配置逻辑调整:API Key 仅从本地 config/default-config.json 读取,不再支持环境变量。 - SKILL.md 文档同步更新,明确说明 API Key 的读取方式和安全策略。 - 进一步强调 API Key 本地存储与安全细节,提高用户隐私保护。 - 相关脚本代码优化,消除对环境变量的依赖。
v1.0.4
easy-xiaohongshu v1.0.4 - 增加“安全说明”部分,解释杀毒软件可能的误报及开源保障。 - 其余说明文档内容未变,功能无修改。
v1.0.3
- 优化了文档中的使用示例,将“漫画博主”示例更换为“亲子博主”更贴合主题。 - 其余内容未变,保持功能说明和使用流程一致。 - 本次更新仅涉及文档(SKILL.md)内容调整,对功能无影响。
v1.0.2
- 优化说明文档,突出无需门槛、全流程自动化体验 - 使用流程部分内容表述更友好、步骤更简明 - 示例小红书主题更新为更贴近日常内容 - 明确 openclaw 全流程自动生成、发布的定位和优势 - 纯文档改进,无功能和配置变动
v1.0.1
**Easy-xiaohongshu 1.0.1 Changelog** - 改进安装与快速上手指引:简化为“注册API Key+一句话配置”流程,并新增详细指引。 - 风格智能预设扩展到13类账号,类型和应用场景更加细分。 - 强调“逐张生成图片、实时反馈、断点续传”及续传机制的优势。 - 优化配置及参数说明,明确API Key读取优先级,补充超时/重试相关配置参数。 - 精简并重组文档结构,突出核心流程与优势,使新手一看即用。 - 更新部分命令行用法、更贴合实际交互体验。
v1.0.0
Easy-xiaohongshu 1.0.0 - 自动化小红书图文内容生成与发布 - 实现一键从文案生成、视觉设计、到小红书内容自动发布的全流程 - 支持 8 页图文方案自动生成,图片含中文文案,无需手动设计 - 按账号定位智能匹配风格、色调和语气,满足多种博主需求 - 自动生成标题、正文和标签,并适配 MCP 服务扫码登录后一键发文 - 完善安装引导、环境变量、依赖说明及故障排查指南 - 提供命令行和直接对话两种便捷用法
Metadata
Slug easy-xiaohongshu
Version 0.2.4
License MIT-0
All-time Installs 1
Active Installs 1
Total Versions 13
Frequently Asked Questions

What is Easy Xiaohongshu?

根据主题生成小红书图文内容,并在本地 `xiaohongshu-mcp` 可用时辅助发布图文笔记。 It is an AI Agent Skill for Claude Code / OpenClaw, with 224 downloads so far.

How do I install Easy Xiaohongshu?

Run "/install easy-xiaohongshu" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is Easy Xiaohongshu free?

Yes, Easy Xiaohongshu is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does Easy Xiaohongshu support?

Easy Xiaohongshu is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created Easy Xiaohongshu?

It is built and maintained by baoshan685 (@baoshan685); the current version is v0.2.4.

💬 Comments