ZJU-REAL/Easel / skills/builtin/skill-xhs-publisher
skill-xhs-publisher
Verified将图文/视频内容发布到小红书(XHS)。基于 Playwright + 持久化登录态,headless 即可运行, 流程与选择器移植自成熟开源实现 xiaohongshu-mcp(含发布成功校验、上传完成等待、话题联想绑定、 新旧发布按钮兼容、反检测)。适用场景:发布图文笔记、发布视频、扫码登录、发布前预检。
| File | Kind | Size |
|---|---|---|
| AGENTS.md | markdown | 1.7 KB |
| EASEL-META.md | markdown | 3.3 KB |
| SKILL.md | skill md | 5.2 KB |
| public/whitedew.jpg | binary | 112.2 KB |
| references/commands.md | markdown | 3.8 KB |
| todo.md | markdown | 813 B |
AGENTS.md
View on GitHub# 仓库指南(xhs-publisher)
## 实现现状(2026-07 重写)
本 SKILL 的小红书发布已从旧的 **CDP-to-真实Chrome** Python 栈(`cdp_publish.py` 等,需桌面
Chrome、headless 环境不可用)**整体重写为 Playwright 版**,流程与选择器移植自成熟开源实现
[xpzouying/xiaohongshu-mcp](https://github.com/xpzouying/xiaohongshu-mcp)。旧 CDP 脚本已删除。
- 执行入口:`../../shared/scripts/xhs_publish.py`(不在本目录,属跨 SKILL 共享脚本层)。
- 本目录保留:`SKILL.md`(流程/约束)、`references/commands.md`(命令样例)、
`AGENTS.md`、`EASEL-META.md`、`public/` 和 `todo.md`;账号登录态由共享脚本管理。
## 开发/冒烟命令(CWD=项目根)
```bash
python skills/shared/scripts/xhs_publish.py selftest # 离线自检(选择器/标题算法/参数)
python skills/shared/scripts/xhs_publish.py check # 验 playwright + chromium
python skills/shared/scripts/xhs_publish.py login # 提取二维码扫码(持久化),本地有桌面时加 --headed
python skills/shared/scripts/xhs_publish.py plan ... # dry-run 预检
python skills/shared/scripts/xhs_publish.py publish --exec --headed ... # 首次校验选择器
```
## 维护规范
- 小红书改版导致定位失败:**只改 `xhs_publish.py` 顶部 `SELECTORS` 字典**(单点集中,每条标了
参考源),不要散改流程逻辑;先 `--headed` 观察再改。
- 反检测:脚本已内置 `--disable-blink-features=AutomationControlled` + 逐字符输入 + zh-CN;
新增交互优先用 Playwright 原生动作,避免可被检测的大段 JS 注入。
- 安全:禁止提交真实 Cookie / 账号令牌;登录态在 `~/.easel-browser-profiles/`,不入库。
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |