deepdive-xiaohongshulisted
Install: claude install-skill yinjialu/ai-frontier-daily
# deepdive-xiaohongshu
把 `content/deepdive/<slug>/draft.md` 成稿稳定转换为小红书图文笔记。
## 步骤
### 1. 生成卡片脚本 xhs.json
读成稿 `content/deepdive/<slug>/draft.md`(及 `assets/`/`xhs/assets/` 下配图),**改写**(不照搬)成 `content/deepdive/<slug>/xhs.json`。默认使用沉淀自 `content/deepdive/2026-06-24_introducing-claude-tag/xhs/` 的 editorial magazine 版式:
- `slug`:文章目录名去日期前缀。
- `title`:小红书标题,**≤20 字**,点出核心钩子。
- `style`:固定 `"editorial"`。
- `edition` / `brand` / `period`:如 `"AI FRONTIER"` / `"变量生活"` / `"2026.06"`。
- `cover`:文章已有封面图相对路径(如 `assets/cover-*.png`);没有则 `null`。
- `coverTitle`:封面显示标题,可用 `\n` 手动断成两行。
- `topics`:封面 pill,2~3 个短标签。
- `coverCaption`:封面底部 1~2 行短句。
- `cards`:**4~8 张**,每张 `heading` 最多两行、每行 ≤14 字;优先用下面三种卡:
- `{"kind":"quote","heading","quote","notes","footer"}`:观点/转折卡,`notes` 为 `[label,text]` 数组。
- `{"kind":"image","heading","image","caption","footer"}`:配图解释卡,`image` 是相对路径。
- `{"kind":"closing","heading","quote","notes","footer"}`:收束/导流卡。
- `caption`:笔记正文,**≤1000 字**,开头一句抓人 + 分点讲清 + 结尾引导,自然口吻。
- `tags`:1~10 个,如 `["AI","Claude","Agent"]`。
**改写原则**:长文 → 杂志卡。封面给总隐喻;quote 卡承载判断;image 卡承载关键结构图/小黑插画;closing 卡收束到公众号长文。不要把长段落塞进 bullet,宁可减少卡数、放大单个判断。
### 2. 校验 + 渲染
```bash
python -m scripts.deepdive.xhs_validate content/deepdive/<slug>/xhs.json # 不过线先改
python -m scripts.deepdive.render_xhs content/deepdive/<slug> # 出图到 output/deepdive/<slug>/
```
校验不过会列出超限项(标题/文案/卡数/行数/每行字数)——按提示缩短重生成,**不要硬发**。
### 3. 发布
- 移动端:打开发布页 `publish.html`「深度内容」入口 → 选当前 slug → 「📲 发送到快捷指令」把图存相册 → 小红书 App 手动发;文案从