Files
Hermes-Skills/social-media/xiaohongshu-style/references/publishing-workflow.md
T
Hermes Skills Manager 6770bc9b9d Initial commit: Hermes Agent skills collection
- Trading skills (OKX, dividend, lottery, quantitative)
- Creative skills (ASCII art, diagrams, video)
- Development skills (GitHub, debugging, TDD)
- Research skills (arXiv, blog monitoring)
- Productivity skills (email, documents, notes)
- MCP integration skills
- Custom user skills
2026-07-05 02:31:15 -04:00

54 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# 小红书发布工作流
## opencli 发布命令
```bash
opencli xiaohongshu publish "<content>" \
--title "<标题>" \
--images "path1.png,path2.png" \
--topics "标签1,标签2,标签3" \
--draft # 可选:先存草稿
```
### 参数约束
- `title`: 最多 20 字(含 emoji
- `content`: 笔记正文,支持换行
- `images`: 逗号分隔,最多 9 张,支持 jpg/png/gif/webp
- `topics`: 逗号分隔,不含 # 号
- `--draft`: true/false,存草稿不直接发布
### 前置条件
1. Chrome 已安装 opencli 浏览器扩展
2. 已登录小红书创作者中心
3. `opencli doctor` 显示 Extension: connected
### 故障排查
```
opencli doctor
```
- `[MISSING] Extension: not connected` → Chrome 扩展未安装/未启用
- `BROWSER_CONNECT` 错码 → 需要重启 daemon: `opencli daemon restart`
- 如果扩展已装但连不上 → Chrome 需要保持打开状态
## 配图生成
### 流程
1. 写 HTML 卡片(单卡单文件,width: 420px
2. 用 Hermes browser 工具截图:
- `browser_navigate(url='file:///tmp/card.html')`
- `browser_vision(question='截图')` → 自动保存 screenshot_path
3. 截图路径在 `/home/openclaw/.hermes/cache/screenshots/`
4. 复制到 `~/.hermes/output/xhs_images/` 供 opencli 使用
### ⚠️ chromium snap 限制
snap 版 chromium 的 `--screenshot` 参数受 AppArmor 限制,写文件会 permission denied。
**不要用** `chromium-browser --headless --screenshot=...`
**用** Hermes 内置 browser 工具(browser_navigate + browser_vision)。
### 卡片设计规范
- 宽度 420px,深色背景 (#1a1a2e#16213e 渐变)
- 金色 (#f0c040) 标题/强调
- 青绿 (#00d4aa) 数据
- 圆角 24px,内边距 36px 28px
- 免责声明小字 10px #555