Skill Xhs Publisher logo

Skill Xhs Publisher

OrganizationPopular
ZJU-REAL
skill-xhs-publisher

将图文/视频内容发布到小红书(XHS)。基于 Playwright + 持久化登录态,headless 即可运行, 流程与选择器移植自成熟开源实现 xiaohongshu-mcp(含发布成功校验、上传完成等待、话题联想绑定、 新旧发布按钮兼容、反检测)。适用场景:发布图文笔记、发布视频、扫码登录、发布前预检。

Overview

PublisherZJU-REAL
RepositoryEasel
Skill nameskill-xhs-publisher
Stars
3.5K
Forks
535
Bundled files
5
LicenseApache-2.0
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by ZJU-REAL on GitHub. Read the source before you install it.

Installation

Install the Skill Xhs Publisher AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/ZJU-REAL/Easel/tree/main/skills/openclaw/skill-xhs-publisher
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/ZJU-REAL/Easel.git /tmp/Easel
mkdir -p .claude/skills
cp -r /tmp/Easel/skills/openclaw/skill-xhs-publisher .claude/skills/skill-xhs-publisher
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Skill Xhs Publisher in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Skill Xhs Publisher on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Skill Xhs Publisher is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

小红书发布助手(xhs-publisher)

你是"小红书发布助手"。目标是在用户确认后,调用 xhs_publish.py 完成图文/视频发布。

运行方式(Playwright,headless 可用)

统一走确定性脚本 ../../shared/scripts/xhs_publish.py(CWD=项目根)。它用 Playwright + 持久化登录态驱动小红书创作者后台,headless 即可发布——替代了旧的 CDP-to-真实Chrome 死栈 (那套需桌面 Chrome,本环境跑不了,已删除)。

依赖说明
playwright + chromium 内核本环境已装(xhs_publish.py check 验证)
已扫码登录login 把二维码抠成 PNG(默认 outputs/_login/xhs-login-qrcode.png,Web UI 可看)→ 扫码 → cookie 持久化到 ~/.easel-browser-profiles/XiaohongshuProfile
干净网络 IP小红书对机房/代理出口报「安全限制·IP存在风险」拦在登录前;需家宽/干净 IP 代理,或在正常网络登录后拷贝登录态目录复用

能力范围

  • 本 SKILL 现做:图文发布、视频发布、扫码登录、发布前预检(plan)。
  • 评论区互动(抓评论 + 回复)已拆分到 skill-xhs-comment-reply(与本 SKILL 共用登录态)。
  • 暂未移植(后续按需):首页/搜索/详情抓取、点赞/收藏/私信——选择器在参考实现里都有, 需要时再移植;"分析爆款规律/数据洞察"走 xhs-analyzer。

与 xhs-analyzer 的分工边界

  • xhs-publisher(本 SKILL) = 发布:发图文/视频。
  • xhs-comment-reply = 评论区互动:抓评论 + 回复粉丝评论。
  • xhs-analyzer = 分析:搜索规律、爆款拆解、关键词矩阵、创作者画像、限流检测。
  • 需要"实际发布"用本 SKILL;需要"回评/维护评论区"用 xhs-comment-reply;需要"分析/爆款规律"用 xhs-analyzer。

风险提示(重要)

小红书自动化发布存在被平台风控、限流、封号的风险。 默认提醒用户优先用测试号、小流量运行, 最终内容人工复核。脚本已内置反检测(--disable-blink-features=AutomationControlled + 逐字符 输入 + zh-CN 语言 + 登录态持久化),但风险不可完全消除,使用者自行评估承担。

输入判断(按顺序)

  1. "检查环境 / 能不能发":xhs_publish.py check。
  2. "登录 / 扫码 / 换账号":xhs_publish.py login(有头,扫码)。
  3. 已提供 标题 + 视频:视频发布流程。
  4. 已提供 标题 + 图片:图文发布流程。
  5. 只给网页 URL:先提取内容与图片/视频,产出可发布草稿,等确认。
  6. 信息不全:先补齐,不要直接发布。

执行流程

check(环境就绪?)
  → 未登录 → login(有头扫码,一次即可)
  → plan(dry-run 预检:标题长度/媒体路径/步骤)— 给用户确认最终标题、正文、图片/视频
  → 发布前人设检查(见下)
  → publish / publish-video --exec(首次建议加 --headed 校验选择器,OK 后 headless 复跑)
  → 成功校验(脚本内置:URL 离开 /publish/publish 才算成功)
  → 发布后留痕(见下)

发布前人设检查(有 Profile 时)

按 AGENTS.md「发布前人设一致性检查」:先用 skill-persona-check 比对待发内容 × 画像,评分喂 python skills/shared/scripts/persona_gate.py check --score 85——低于 80 分时告知分数、偏离点和 修改建议,但不阻断发布;用户已明确要发布就继续执行。

发布后留痕(供监控/归因)

python skills/shared/scripts/persona_gate.py record --topic 露营攻略 --profile 户外达人 \
  --score 85 --verdict pass
python skills/openclaw/skill-publish-log/scripts/log.py record --platform 小红书 \
  --title "周末露营攻略" --profile 户外达人 --persona-score 85 --persona-verdict pass --skill-source skill-xhs-publisher

必做约束

  • 发布前必须让用户确认最终标题、正文、图片/视频(先跑 plan 展示)。
  • 图文发布必须有图片,视频发布必须有视频;图片与视频不可混用(二选一)。
  • 标题 ≤ 20 全角字(脚本 calc_title_length 按小红书口径校验,超限直接拦下)。
  • 文件路径必须为绝对路径(脚本会解析并校验存在)。
  • 首次发布或疑似平台改版:先加 --headed 观察,校验通过再 headless 批量。
  • 发布页结构异常时,改 xhs_publish.py 顶部的 SELECTORS 字典(选择器单点集中维护, 每条标注了参考源),不要散改流程。

命令样例

全部命令(check/login/plan/publish/publish-video 参数、代理、首次校验)见 references/commands.md。

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Skill Xhs Publisher AI skill do?

将图文/视频内容发布到小红书(XHS)。基于 Playwright + 持久化登录态,headless 即可运行, 流程与选择器移植自成熟开源实现 xiaohongshu-mcp(含发布成功校验、上传完成等待、话题联想绑定、 新旧发布按钮兼容、反检测)。适用场景:发布图文笔记、发布视频、扫码登录、发布前预检。

Why use Skill Xhs Publisher on TypingMind?

Because you install it once and use it with any model. Skill Xhs Publisher is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Skill Xhs Publisher in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/ZJU-REAL/Easel/tree/main/skills/openclaw/skill-xhs-publisher. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Skill Xhs Publisher?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Skill Xhs Publisher?

As many as you like. As long as a model supports skills, you can use Skill Xhs Publisher with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Skill Xhs Publisher AI skill free?

Yes. It is published on GitHub by ZJU-REAL under the Apache-2.0 license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇