← Back to Skills Marketplace
hhua007

RedNote Publish Auto

by hungryboy · GitHub ↗ · v1.0.1 · MIT-0
cross-platform ⚠ suspicious
23
Downloads
0
Stars
0
Active Installs
2
Versions
Install in OpenClaw
/install rednote-publish-auto
Description
小红书笔记创作与发布完整技能。用户给定主题或资料,自动完成:文案撰写 → Markdown 卡片生成 → 图片渲染 → 小红书发布,全流程一键完成。
README (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
Usage Guidance
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.
Capability Assessment
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.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install rednote-publish-auto
  3. After installation, invoke the skill by name or use /rednote-publish-auto
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
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 配置。 - 提供多种渲染主题和分页模式,实现灵活的输出。
Metadata
Slug rednote-publish-auto
Version 1.0.1
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 2
Frequently Asked Questions

What is RedNote Publish Auto?

小红书笔记创作与发布完整技能。用户给定主题或资料,自动完成:文案撰写 → Markdown 卡片生成 → 图片渲染 → 小红书发布,全流程一键完成。 It is an AI Agent Skill for Claude Code / OpenClaw, with 23 downloads so far.

How do I install RedNote Publish Auto?

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

Is RedNote Publish Auto free?

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

Which platforms does RedNote Publish Auto support?

RedNote Publish Auto is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created RedNote Publish Auto?

It is built and maintained by hungryboy (@hhua007); the current version is v1.0.1.

💬 Comments