Skill flagged — suspicious patterns detected

ClawHub Security flagged this skill as suspicious. Review the scan results before using.

xhs-publisher-pro

v1.4.0

小红书通用自动发帖技能。全流程自动化:AI生成帖子内容 → 生成封面图(6套风格模板)→ Puppeteer自动发布到小红书创作者中心。内置 stealth 反风控、人类化打字模拟。适合运营任意垂直领域小红书账号(科技、生活、美食、旅行、节日、知识分享等)。当用户需要自动发小红书帖子、生成封面图、或定时发帖时使用。

1· 142·0 current·0 all-time
byHalley@halleyyang

Install

OpenClaw Prompt Flow

Install with OpenClaw

Best for remote or guided setup. Copy the exact prompt, then paste it into OpenClaw for halleyyang/xhs-publisher-pro.

Previewing Install & Setup.
Prompt PreviewInstall & Setup
Install the skill "xhs-publisher-pro" (halleyyang/xhs-publisher-pro) from ClawHub.
Skill page: https://clawhub.ai/halleyyang/xhs-publisher-pro
Keep the work scoped to this skill only.
After install, inspect the skill metadata and help me finish setup.
Use only the metadata you can verify from ClawHub; do not invent missing requirements.
Ask before making any broader environment changes.

Command Line

CLI Commands

Use the direct CLI path if you want to install manually and keep every step visible.

OpenClaw CLI

Bare skill slug

openclaw skills install xhs-publisher-pro

ClawHub CLI

Package manager switcher

npx clawhub@latest install xhs-publisher-pro
Security Scan
VirusTotalVirusTotal
Benign
View report →
OpenClawOpenClaw
Suspicious
medium confidence
Purpose & Capability
Name/description (auto-generate content, create cover image, use Puppeteer to publish) align with the included code and npm dependencies (puppeteer, puppeteer-extra, stealth plugin). The human-typing, stealth, session storage, and cover-generation logic are coherent with the stated goal.
!
Instruction Scope
SKILL.md and scripts instruct the agent to: request the user's phone number and SMS code for first-time login and save a session locally (PROFILE_DIR). That is necessary for the task but sensitive. Additionally, SKILL.md contains a pre-scan prompt-injection signal (unicode-control-chars) — this could be an attempt to manipulate evaluation or LLM behavior and should be treated as suspicious. The instructions also rely on running npm install which triggers postinstall actions that attempt system-level fixes/installations (see install_mechanism).
Install Mechanism
There is no formal install spec, but package.json defines a postinstall script (postinstall.js) which runs automatically after npm install. postinstall.js probes for system Chrome and tries to auto-install Chromium via platform package managers (apt-get/dnf/yum/brew) or trigger a Puppeteer internal download using a Chinese mirror. Automatic attempts to run package manager installs from a postinstall script are more invasive than typical npm postinstall behavior and may be surprising to users.
Credentials
The skill does not request unrelated credentials or environment variables. It uses optional env vars commonly associated with Puppeteer (PUPPETEER_EXECUTABLE_PATH) and a PROFILE_DIR for session storage (XHS_PROFILE_DIR). No external API keys or unrelated secrets are requested.
Persistence & Privilege
The skill stores login sessions under ~/.openclaw-sessions/xiaohongshu by default and the postinstall script may install system packages or download browsers. always is false and the skill does not request elevated platform privileges itself, but postinstall may invoke system package managers (which may require root/sudo). The persistence is limited to its own session directory and installed local browser binaries.
Scan Findings in Context
[unicode-control-chars] unexpected: A unicode control character-based prompt-injection pattern was detected in SKILL.md. This is unrelated to the functionality of publishing posts and suggests the skill's markdown may contain characters intended to influence LLM processing or evaluations. Treat as suspicious and inspect the raw SKILL.md for hidden characters before trusting automated evaluation.
What to consider before installing
This skill is broadly consistent with its stated purpose (it uses Puppeteer + stealth to automate posting and generates cover images), but there are a few things to consider before installing or running it: - Postinstall behavior: npm install will run postinstall.js which probes for Chrome and attempts to auto-install Chromium via apt-get/dnf/yum/brew or trigger a Puppeteer internal download. That can invoke system package managers or long-running downloads. If you don't want automatic system installs, review and run postinstall.js manually or run npm with scripts disabled (e.g., npm ci --ignore-scripts) and then perform required steps yourself. - Sensitive inputs: You will need to provide a phone number and SMS verification code for first-time login. Sessions are saved locally to ~/.openclaw-sessions/xiaohongshu by default. Inspect the code to confirm there is no network upload of session files before trusting it; the provided files claim local-only storage, but you should verify no outbound network code exists in any code not shown to you. - Prompt-injection marker: A unicode-control-chars pattern was detected in the SKILL.md. This is not necessary for the skill's functionality and could be an attempt to manipulate LLM behavior. Inspect the SKILL.md raw text for hidden control characters and remove them. - Safety precautions: run the code in an isolated environment (VM or disposable container) first, review postinstall.js and xhs_publisher.js for any network/upload calls you don't expect, and consider creating a throwaway test account instead of your real account until you are confident. If you allow postinstall to run system package managers, be prepared for it to try installing packages that require root privileges.
scripts/postinstall.js:65
Shell command execution detected (child_process).
Patterns worth reviewing
These patterns may indicate risky behavior. Check the VirusTotal and OpenClaw results above for context-aware analysis before installing.

Like a lobster shell, security has layers — review code before you run it.

automationvk973w0vmp29k3rsjryetfc9xr18570qzchinesevk973w0vmp29k3rsjryetfc9xr18570qzlatestvk973w0vmp29k3rsjryetfc9xr18570qzpuppeteervk973w0vmp29k3rsjryetfc9xr18570qzsocial-mediavk973w0vmp29k3rsjryetfc9xr18570qzxiaohongshuvk973w0vmp29k3rsjryetfc9xr18570qz
142downloads
1stars
8versions
Updated 1w ago
v1.4.0
MIT-0

xhs-publisher · 小红书自动发帖

你说主题,AI 写文案、配封面、发帖子。一句话搞定,不用懂技术。


✨ 为什么选这个 skill?

市面上的小红书自动化工具要么需要复杂配置,要么发完就被风控限流。这个 skill 做了三件别人没做的事:

1. 真正的反风控 内置 puppeteer-extra-plugin-stealth,自动处理几十项浏览器指纹特征(webdriver、plugins、languages、UA……),让平台识别不出是自动化程序。

2. 人类化操作模拟 打字速度随机变化(30~150ms/字),中文通过输入法模拟,偶尔停顿思考——行为上和真人发帖无法区分。

3. AI 全程生成内容 不只是自动发,文案、封面、话题标签全部由 AI 生成,你只需要说一个主题。


🚀 快速开始(小白版)

第一步:说你想发什么

帮我发一篇清明节的小红书
帮我发一篇职场新人避坑的帖子
帮我发一篇推荐深圳周末去处的小红书

第二步:确认封面和内容

AI 会先把封面图和文案发给你预览,你觉得 OK 就说"发布"。

第三步:首次需要登录

第一次用时,AI 会让你输入手机号 + 验证码登录小红书。登录一次后自动保存,约 7 天内不用再登录

登录信息只存在你自己的电脑上,不会上传任何地方。


🎨 6 套封面模板

根据标题自动匹配,同一标题每次用同一套模板,保持账号风格统一。

模板配色适合内容
🔴 珊瑚红·撞色红白对撞,冲击力强热点、节日、话题性内容
⬜ 奶油白·极简白底黑字,高级留白知识干货、深度观点
🌿 墨绿·自然风深绿奶白,清新文艺人文、旅行、生活方式
🌊 深蓝·知性风深海蓝渐变,沉稳理性科普、职场、财经
💛 柠黄·活力风明黄黑字,年轻活泼美食、穿搭、娱乐
💜 丁香紫·治愈风薰衣草紫,圆润柔和情感、心理、治愈系

封面尺寸 1080×1440px,符合小红书图文比例标准。


🛠️ 第一次用的准备工作

1. 安装字体(必须)

封面中文渲染需要 Noto Sans SC 字体,否则文字显示为方块。

mkdir -p ~/.fonts
# 下载 NotoSansSC-Regular.otf 和 NotoSansSC-Bold.otf 放入 ~/.fonts/
# 详细步骤见 references/setup.md

2. 安装依赖

cd skills/xhs-publisher/scripts
npm install

⚠️ 国内网络 Puppeteer 下载 Chrome 超时? 三选一:

方案 A:用国内镜像(推荐)

npm run install:cn

方案 B:跳过下载,用系统已安装的 Chrome

npm run install:skip

脚本会自动探测系统 Chrome 路径,支持:

  • macOS/Applications/Google Chrome.app
  • WindowsC:\Program Files\Google\Chrome\...
  • Linux/usr/bin/google-chrome/usr/bin/chromium-browser/snap/bin/chromium

也可以手动指定路径:

export PUPPETEER_EXECUTABLE_PATH=/path/to/your/chrome

方案 C:先安装 Chromium 再跳过下载

# Ubuntu / Debian
sudo apt-get install -y chromium-browser
npm run install:skip

# macOS (Homebrew)
brew install --cask chromium
npm run install:skip

验证安装是否成功:

npm run check
# 输出示例:Chrome: /usr/bin/google-chrome

❓ 常见问题

Q:发帖会被风控吗? 风险已大幅降低。内置 stealth 反指纹 + 人类化行为模拟,是目前最接近真人操作的方案。但小红书风控持续升级,建议每天发帖不超过 3 篇,不要在短时间内连续发。

Q:会不会发出去奇怪的内容? 不会。每次发布前都有预览确认环节。另外脚本内置内容安全检查,自动拦截人身攻击、煽动对立等违规内容,避免封号风险。

Q:登录信息安全吗? 安全。Session 只保存在本地 ~/.openclaw-sessions/xiaohongshu/,不经过任何第三方服务器。

Q:发帖失败了怎么排查? 失败时会自动截图保存到工作目录(xhs_pre_publish.png),可以直接看到发布前的页面状态。

Q:话题标签加不上怎么办? v1.2.1 已修复话题选择器,使用小红书真实 DOM 结构精确匹配。如果仍然失败,说明小红书更新了页面结构,欢迎提 issue。


👨‍💻 开发者文档

安装

npx clawhub@latest install xhs-publisher-pro

基础用法

const { generateCoverImage, publishPost } = require('./scripts/xhs_publisher.js');

// 生成封面图
const imgPath = await generateCoverImage(
  '五一去哪儿玩?这几个地方别错过',          // 标题(≤20字)
  '人少景美还不贵\n亲测三个宝藏目的地\n每个都值得去一次', // 副标题(\n换行)
  '/tmp/xhs_cover.png'                       // 输出路径
);

// 发布帖子
const result = await publishPost({
  title: '五一去哪儿玩?这几个地方别错过',
  content: '每年五一都在纠结去哪玩...',       // 正文(不含话题标签)
  topics: ['五一旅游', '旅行攻略', '小众目的地'], // 最多 5 个话题
  imagePath: imgPath,
  phone: '13812345678',                      // session 失效时自动触发登录
  askCodeFn: async (prompt) => await askUser(prompt), // 返回 6 位验证码
});

console.log(result.success, result.postUrl);

API 文档

函数参数返回值说明
generateCoverImage(title, subtitle, outputPath, footer?)标题、副标题、输出路径、可选署名Promise<string> 输出路径生成 1080×1440px 封面图
publishPost(options)见下方Promise<{ success, postUrl }>发帖主函数,含安全检查和登录引导
checkContentSafety(title, content)标题、正文{ safe, reason }独立内容安全检查
detectPageState(page)Puppeteer page{ loggedIn, blocked, reason }检测页面登录/风控状态
isSessionLikelyValid()boolean判断 session 是否在 7 天有效期内

publishPost 参数:

{
  title: string,       // 标题,≤20 字
  content: string,     // 正文,200~400 字效果最佳
  topics: string[],    // 话题标签,最多 5 个,不含 #
  imagePath: string,   // 封面图绝对路径
  phone?: string,      // 手机号,session 失效时使用
  askCodeFn?: (prompt: string) => Promise<string>, // 向用户索取验证码
}

环境变量

变量说明默认值
XHS_PROFILE_DIRSession 存储目录~/.openclaw-sessions/xiaohongshu

版本历史

版本更新内容
v1.2.1修复话题选择器(使用真实 DOM 结构);修复 postUrl 变量作用域 bug
v1.2.0humanType 支持中文;字体路径动态查找;段落空行逻辑优化;话题上限 3→5;publishPost 返回 postUrl
v1.1.0引入 stealth 反指纹插件;人类化打字速度;随机视口
v1.0.0初始版本

更多配置说明见 references/setup.md,写作规范见 references/posting-guide.md

Comments

Loading comments...