← 返回 Skills 市场
hhua007

RedNote Publish Auto

作者 hungryboy · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
23
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install rednote-publish-auto
功能描述
小红书笔记创作与发布完整技能。用户给定主题或资料,自动完成:文案撰写 → Markdown 卡片生成 → 图片渲染 → 小红书发布,全流程一键完成。
使用说明 (SKILL.md)

小红书笔记创作与发布技能

一键完成从主题到小红书发布的全流程:文案撰写 → 生成 Markdown → 渲染图片卡片 → 自动发布。

使用方式

当用户说「发小红书」「写一篇小红书」「发布到小红书」「生成小红书笔记」时触发本技能。

输入确认

收到请求后,开始制作。第四步「发布小红书」前会展示内容预览, 必须等用户明确确认「可以发布」后才执行发布,不会自动发布。

工作流程

自动完成以下 4 步,第四步需用户确认:

第一步:撰写小红书文案

根据用户主题,生成完整小红书风格内容,包括:

  • 吸引眼球的标题(≤20字)
  • 钩子开头(1-2句激发好奇)
  • 正文(分段清晰,每段 2-3 句,含 emoji 点缀)
  • 总结 + CTA
  • Tags 标签(5-10 个)

第二步:生成渲染用 Markdown

将文案写成专用于图片渲染的 Markdown 文件:

---
emoji: "🤖"
title: "大标题(≤15字)"
subtitle: "副标题(≤15字)"
---

# 第一部分标题

正文内容...

# 第二部分标题

正文内容...

...

注意:正文用 --- 分隔符分成多个段落,每段约 200-400 字左右,避免单段内容过长导致渲染被截断。

第三步:渲染图片卡片

python3 scripts/render_xhs.py \x3Cmarkdown_file> -o \x3C输出目录> -m auto-split -t default
  • 推荐模式:auto-split(根据内容高度自动切分,不会截断内容)
  • 默认主题:default(简约灰白)
  • 生成的图片:封面 cover.png + 正文卡片 card_1.png card_2.png ...

第四步:发布小红书

XHS_COOKIE=\x3Ccookie> python3 scripts/publish_xhs.py \
  --title "\x3C标题>" \
  --desc "\x3C描述>" \
  --images cover.png card_1.png card_2.png ...
  • Cookie 从 ~/.openclaw/workspace/.xhs_cookie.env 读取
  • Cookie 失效时告知用户重新提供

图片规格

类型 尺寸 比例
封面 1080×1440px 3:4
正文卡片 1080×? px 3:4(高度按内容自适应)

可用主题

主题 风格
default 简约灰白(默认)
playful-geometric 活泼几何(紫粉渐变)
neo-brutalism 新粗野主义(红黄撞色)
botanical 植物园自然(绿色系)
professional 专业商务(蓝色系)
retro 复古怀旧(橙棕系)
terminal 终端命令行(暗黑系)
sketch 手绘素描(灰调)

分页模式说明

模式 适用场景
auto-split 推荐。内容长短不稳定时使用,自动切分不会截断
separator 内容已手动用 --- 控制好量
auto-fit 固定尺寸,整体缩放文字填满
dynamic 根据内容动态调整高度(仅适合短内容)

Cookie 配置

⚠️ 安全警告:Cookie 等同于账号密码!

  • 持有此 Cookie 可代表您的账号进行发布操作
  • 请勿在公开场合分享
  • 建议使用专用小号,并及时在网页端撤销授权

Cookie 保存在:~/.openclaw/workspace/.xhs_cookie.env

格式:

XHS_COOKIE=your_cookie_string_here

获取方式:

  1. 浏览器登录小红书(https://www.xiaohongshu.com)
  2. F12 → Network → 任意请求 → Request Headers → 复制 Cookie 字段
  3. 告知 Agent 更新
  4. 如需撤销:网页端 → 设置 → 账号安全 → 退出登录对应设备

依赖安装

如遇缺少依赖提示,运行:

pip install markdown PyYAML playwright xhs python-dotenv requests
playwright install chromium
安全使用建议
Install only if you are comfortable giving the skill a Xiaohongshu/RedNote session cookie that can publish as you. Use a dedicated account, review every preview before saying “可以发布”, avoid API mode unless you control the API service, and revoke/logout the cookie after use.
能力评估
Purpose & Capability
The creation/rendering/publishing workflow matches the stated purpose, but the capability includes high-impact public account posting and use of a full Xiaohongshu session cookie.
Instruction Scope
SKILL.md says publishing must wait for an explicit user confirmation, which is an important safeguard; users still need to verify the preview, target account, and public/private status before approving.
Install Mechanism
There is no install spec, but SKILL.md and requirements.txt document manual pip/Playwright setup with unpinned third-party packages. This is expected for rendering and publishing but should be installed in an isolated environment.
Credentials
Registry metadata declares no env vars or primary credential, while the skill and script require XHS_COOKIE and the script also supports XHS_API_URL for API mode.
Persistence & Privilege
The skill stores a persistent account cookie locally; SKILL.md names ~/.openclaw/workspace/.xhs_cookie.env, while the provided script searches .env files in the current/project directories, creating ambiguity around where the sensitive session is kept.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install rednote-publish-auto
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /rednote-publish-auto 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.1
- 增加内容预览和用户确认流程:现在在发布到小红书前会展示预览,需用户明确同意后才会自动发布,避免误发布。 - 更新输入确认说明,强调不会自动发布,提升使用安全性。 - Cookie 配置部分加入安全警告,提示用户风险并建议仅用专用账号。
v1.0.0
Skill initial release for xhs-publisher: - Provides a complete workflow for Xiaohongshu (小红书) note creation and publishing: copywriting → Markdown card generation → image rendering → automatic publishing. - Triggers on user intent such as "写一篇小红书" or "生成小红书笔记". - Supports multi-step automation including engaging content creation, Markdown formatting for image rendering, image card splitting, and final publishing with cookie authentication. - Includes detailed documentation on usage, input requirements, rendering themes, image specs, and cookie configuration. - Offers multiple rendering themes and pagination modes for flexible output. - 提供完整的“小红书”笔记创建和发布工作流程:文案撰写 → Markdown 卡片生成 → 图片渲染 → 自动发布。 - 根据用户意图触发,例如“写一篇小红书”或“生成小红书笔记”。 - 支持多步骤自动化,包括互动内容创建、Markdown 图片渲染格式设置、图片卡片分割以及使用 cookie 认证的最终发布。 - 包含详细的使用文档,涵盖输入要求、渲染主题、图片规格和 cookie 配置。 - 提供多种渲染主题和分页模式,实现灵活的输出。
元数据
Slug rednote-publish-auto
版本 1.0.1
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

RedNote Publish Auto 是什么?

小红书笔记创作与发布完整技能。用户给定主题或资料,自动完成:文案撰写 → Markdown 卡片生成 → 图片渲染 → 小红书发布,全流程一键完成。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 23 次。

如何安装 RedNote Publish Auto?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install rednote-publish-auto」即可一键安装,无需额外配置。

RedNote Publish Auto 是免费的吗?

是的,RedNote Publish Auto 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

RedNote Publish Auto 支持哪些平台?

RedNote Publish Auto 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 RedNote Publish Auto?

由 hungryboy(@hhua007)开发并维护,当前版本 v1.0.1。

💬 留言讨论