← 返回 Skills 市场
龙虾内容工厂
作者
HoudaLiang
· GitHub ↗
· v1.0.0
· MIT-0
98
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install guiji-xhs-factory
功能描述
龙虾内容工厂。批量生成小红书信息图+视频,定时自动发布。
使用说明 (SKILL.md)
🏭 龙虾内容工厂
批量生成小红书帖子(信息图+视频),定时自动发布。
核心流程:定义帖子 → 生成图片 → 拼成视频 → 定时发布
安装
# 1. 解压到 skills 目录
unzip guiji-xhs-factory.skill.zip -d ~/.openclaw/workspace/skills/
# 2. 安装 Python 依赖
pip3 install Pillow
# 3. 安装 ffmpeg(macOS)
brew install ffmpeg
# 4. 安装 Playwright(发布用)
npm install -g playwright
npx playwright install chromium
# 5. 确认 Chrome 运行中(CDP 端口 18800)
# 需要以 --remote-debugging-port=18800 启动 Chrome
快速开始(3 步)
第1步:编辑帖子内容
打开 {baseDir}/scripts/generate-today.py,编辑 POSTS 数组:
POSTS = [
{
"id": "my_post_1",
"schedule": "12:00", # 发布时间
"title": "帖子标题(≤20字)", # 小红书标题
"content": "正文内容+标签", # 小红书正文(含#标签)
"cards": [ # 信息图配置
{"title": "封面大标题", "items": []}, # items为空=纯标题封面
{"title": "要点标题", "items": [
"##分类名", # 高亮分类标题
"要点1", # 普通内容
"要点2",
"» 副标题文字", # 灰色副标题
"", # 空行=间距
"要点3",
]},
]
},
]
items 格式说明:
| 前缀 | 效果 | 示例 |
|---|---|---|
| 无 | 普通文字 | "自动安全审核" |
## |
分类标题(高亮色) | "##安全防护" |
» |
副标题(灰色小字) | "» 效率提升" |
"" |
空行间距 | "" |
配色预设(在 card 上加 "preset": "xxx"):
default— 深蓝黑 + 天蓝(通用)tutorial— 深绿 + 翠绿(教程)case— 深棕 + 橙色(案例)secret— 深紫 + 紫色(秘诀)cover— 深蓝 + 蓝色(封面)
第2步:生成内容
python3 {baseDir}/scripts/generate-today.py
自动完成:
- 每张 card → 1080×1440 PNG 信息图
- 所有图片 → 视频幻灯片(每张 6 秒,25fps)
- 输出
content-queue/manifest.json清单
第3步:发布
方式A:定时发布(推荐)
openclaw cron add \
--name "小红书-午间发布" \
--cron "0 12 * * *" \
--tz "Asia/Shanghai" \
--message "定时发布:读 manifest.json → 运行 node {baseDir}/scripts/publish-xhs.js \x3C视频路径> '\x3C标题>' '\x3C正文>'"
方式B:手动发布
node {baseDir}/scripts/publish-xhs.js \
/tmp/openclaw/uploads/my_post_1_slideshow.mp4 \
"我的标题" \
"我的正文内容"
发布脚本说明
publish-xhs.js 使用 Playwright 连接 Chrome(CDP 18800):
- 打开小红书创作者平台
- 上传视频
- 填写标题(React nativeInputValueSetter hack)
- 填写正文(innerHTML 注入)
- 不自动点击发布 — 等你确认后手动点
发布规则速查
| 项目 | 规则 |
|---|---|
| 标题 | ≤20 字,含数字或关键词 |
| 正文 | 300-800 字,5-8 个 #标签 |
| 配图 | 3:4 (1080×1440),3-9 张 |
| 视频 | MP4,15-60 秒 |
| 时间 | 工作日 12-13 点、20-22 点 |
| 频率 | 每天 1-3 篇,间隔 ≥2 小时 |
文件结构
guiji-xhs-factory/
├── SKILL.md # 本文件(Agent 行为手册)
├── scripts/
│ ├── generate-today.py # 内容生成脚本
│ ├── make_card.py # 信息图生成器(PIL)
│ └── publish-xhs.js # Playwright 发布脚本
└── references/
├── post-templates.md # 5 种帖子模板
└── publish-rules.md # 发布规则详解
注意事项
- ⚠️ Chrome 必须以
--remote-debugging-port=18800启动 - ⚠️ 小红书需在 Chrome 中已登录(creator.xiaohongshu.com)
- ⚠️ 视频上传比图片上传更稳定,优先用视频格式
- ⚠️ 发布脚本不会自动点发布按钮,需人工确认
Built with 🦞 by 龙虾养成师 Ursa
安全使用建议
This skill mostly does what it says (generate images, compose video, and automate filling a publish page), but there are important red flags you should consider before installing:
- Hard-coded paths: generate-today.py points to MAKE_CARD in ~/.openclaw/workspace/skills/xhs-smart-post and to a workspace-ursa directory; publish-xhs.js requires Playwright from an absolute path under /Users/houdaliang/.nvm. These indicate the package may be mispackaged or intentionally dependent on other local files — verify and update the scripts to use the skill's own bundled files (use {baseDir} or relative paths) before running.
- Chrome remote debugging: you must start Chrome with --remote-debugging-port=18800 and be logged into creator.xiaohongshu.com. Opening Chrome with remote debugging exposes the browser to local processes; only run this with processes you trust. Consider running an isolated browser/profile and ensure the port is bound to localhost only.
- Playwright and global installs: the instructions ask to install Playwright globally and to run npm npx installs. Prefer installing into a controlled environment (virtualenv for Python, project-local npm install) rather than global installs.
- No external network exfiltration was found in the code, but the publish script injects content into the page via DOM hacks and leaves the browser open for manual publish — this is expected for automation, but double-check the exact actions and test in a safe account.
Recommendation: Do not run the scripts as-is. Inspect and fix the hard-coded paths (point MAKE_CARD to the bundled scripts/make_card.py and change the Playwright require to a normal require('playwright')), run installs in isolated environments, and test in a throwaway/isolated Chrome profile/account before using on your real account.
功能分析
Type: OpenClaw Skill
Name: guiji-xhs-factory
Version: 1.0.0
The skill bundle automates content creation and posting to Xiaohongshu (XHS) using Playwright and FFmpeg, but contains several high-risk flaws and vulnerabilities. Specifically, `publish-xhs.js` uses a hardcoded absolute path to a specific user's home directory (`/Users/houdaliang/`) to load Playwright and employs `innerHTML` injection to set post content without sanitization, which could lead to self-XSS. Furthermore, `generate-today.py` references a hardcoded path for a different skill name (`xhs-smart-post`), indicating poor packaging or unintentional bugs. While the browser automation via CDP (port 18800) is aligned with the stated purpose, these implementation flaws and the control of a logged-in session represent significant security risks.
能力评估
Purpose & Capability
The declared purpose (generate images/videos and assist publishing to 小红书) matches the scripts' behavior, but the Python script references an external MAKE_CARD path (~/.openclaw/workspace/skills/xhs-smart-post/scripts/make_card.py) instead of the bundled scripts/make_card.py. Other hard-coded directories (~/.openclaw/workspace-ursa, /tmp/openclaw/uploads) and an absolute require path in publish-xhs.js point to external user-specific locations rather than the skill bundle, which is disproportionate and suggests the package is not self-contained or was mispackaged.
Instruction Scope
SKILL.md instructs installing ffmpeg, Pillow, Playwright and running Chrome with --remote-debugging-port=18800 — reasonable for browser automation — but the runtime scripts diverge from the documentation: generate-today.py uses fixed MAKE_CARD and QUEUE paths rather than {baseDir} placeholders; publish-xhs.js uses Playwright to control a logged-in browser and injects values via DOM hacks (native input setter and innerHTML). The scripts read/write local files and expect a logged-in browser, but they do not exfiltrate data externally; still, the mismatch between docs and code (absolute paths) is a scope/integrity problem.
Install Mechanism
No automated install spec is provided (instruction-only), which is low risk in principle. SKILL.md asks the user to run pip/npm/brew and to start Chrome with remote debugging; those manual steps are acceptable for this use case but increase user exposure (e.g., installing a global Playwright and opening Chrome remote debugging).
Credentials
The skill declares no required environment variables or credentials, which aligns with its description. However, it relies on a local browser session already authenticated to creator.xiaohongshu.com and uses an absolute Node module path (/Users/houdaliang/.nvm/...). The dependence on user-local state and other skill/workspace directories is disproportionate for a distributable skill and could cause it to access or rely on unrelated files.
Persistence & Privilege
The skill does not request persistent 'always' inclusion and does not modify other skills or system-wide settings. Scheduling is performed via the platform's cron command invoked by the user; the skill itself does not autonomously persist or escalate privileges.
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install guiji-xhs-factory - 安装完成后,直接呼叫该 Skill 的名称或使用
/guiji-xhs-factory触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
guiji-xhs-factory v1.0.0 – Initial release
- Batch-generate Xiaohongshu (RED) posts with infographics and video, and schedule automatic publishing.
- Step-by-step process: define posts, generate images, stitch into videos, and timed publishing.
- Includes content generator and publishing scripts (Python for image/video, Playwright for publishing).
- Customizable infographic cards with various color presets and text formats.
- Manual and scheduled publishing supported; publishing requires Chrome with remote debugging enabled.
元数据
常见问题
龙虾内容工厂 是什么?
龙虾内容工厂。批量生成小红书信息图+视频,定时自动发布。 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 98 次。
如何安装 龙虾内容工厂?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install guiji-xhs-factory」即可一键安装,无需额外配置。
龙虾内容工厂 是免费的吗?
是的,龙虾内容工厂 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
龙虾内容工厂 支持哪些平台?
龙虾内容工厂 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 龙虾内容工厂?
由 HoudaLiang(@houdaliang)开发并维护,当前版本 v1.0.0。
推荐 Skills