ClawSkills logoClawSkills

X Articles

使用 AI 发布热门 X (Twitter) 文章。获得高参与度的长篇内容。经过验证的吸引模式、浏览器自动化。适用于 Claude、Cursor、OpenCla

介绍

# X Articles — Viral Long-Form for Twitter

**战胜算法。** 使用经过验证的病毒式传播模式创建并发布 X(Twitter)文章。

AI 驱动的格式化、钩子模式和浏览器自动化。处理 Draft.js 的怪癖、嵌入限制和图片上传。

## 快速参考

### 内容格式规则(关键)

X 文章使用具有特定怪癖的 Draft.js 编辑器:

1. **换行 = 段落换行** - 每个换行符都会创建一个带有间距的新段落块 2. **将句子合并到一行** - 同一段落中的所有句子必须位于同一行 3. **使用纯文本,而非 Markdown** - X 文章使用富文本,而非 Markdown 4. **不要使用破折号(—)** - 替换为冒号或重写句子

**错误:** ``` Sentence one. Sentence two. Sentence three. ```

**正确:** ``` Sentence one. Sentence two. Sentence three. ```

### 嵌入限制(重要)

**嵌入的帖子始终在内容块的末尾渲染,而非行内。**

变通方法: - 构建文章结构以引用“见下文帖子” - 接受视觉流:文本 → 文本 → 底部嵌入 - 使用 `插入 > 帖子` 菜单(不要粘贴 URL)

### 图片规格

| 类型 | 宽高比 | 推荐尺寸 | |------|--------------|------------------| | 封面/头图 | 5:2 | 1792x716 或类似尺寸 | | 内文图片 | 16:9 或 4:3 | 1792x1024 (DALL-E HD) |

## 病毒式文章结构

### 模板

``` HOOK (hit insecurity or opportunity)

WHAT IT IS (1-2 paragraphs with social proof)

WHY MOST PEOPLE WON'T DO IT (address objections)

THE [X]-MINUTE GUIDE - Step 1 (time estimate) - Step 2 (time estimate) - ...

YOUR FIRST [N] WINS (immediate value) - Win 1: copy-paste example - Win 2: copy-paste example

THE COST (value comparison)

WHAT TO DO AFTER (next steps)

THE WINDOW (urgency)

CTA (soft or hard) ```

### 有效的钩子模式

**不安全感/错失恐惧(FOMO):** ``` everyone's talking about X... and you're sitting there wondering if you missed the window ```

**大机会:** ``` this is the biggest opportunity of our lifetime ```

**新闻钩子:** ``` X just open sourced the algo. Here's what it means for you: ```

**RIP 模式:** ``` RIP [profession]. This AI tool will [action] in seconds. ```

**WTF 模式:** ``` WTF!! This AI Agent [does amazing thing]. Here's how: ```

**个人故事:** ``` When I was young, I was always drawn to people who... ```

### CTA 模式

**硬 CTA(互动诱饵):** ``` RT + follow + reply 'KEYWORD' and I'll send the cheat sheet ```

**软 CTA:** ``` If you take this advice and build something, let me know! ```

**简单 CTA:** ``` Feel free to leave a like and RT if this helped. ```

## 风格指南

### Damian Player 风格(战术型) - 全小写(刻意为之) - 紧迫、战术性的语调 - 1500 字以上 - 大量逐步细节 - 带有吸铁石的硬 CTA

### Alex Finn 风格(激励型) - 正常的大小写 - 温暖、激励性的语调 - 800-1200 字 - WHY(为什么)与 HOW(怎么做)的结合 - 软 CTA + 产品链接

### Dan Koe 风格(哲学型) - 长篇散文(2000 字以上) - 个人故事式开场 - 命名框架(例如“金字塔原理”) - 深度教学,而非仅仅是战术 - 通讯 CTA

## 需避免的常见错误

- 少于 500 字的短文章 - 只有事实没有故事/情感 - 没有清晰的章节或标题 - 没有异议处理 - 没有“即时收获”部分 - 没有 CTA - 通用的 AI 腔调语言 - 到处都是破折号(—) - 过度使用 Emoji - 粘贴推文 URL 而不是使用插入菜单

## 浏览器自动化 (agent-browser)

### 先决条件 - clawd 浏览器运行在 CDP 端口 18800 上 - 已在浏览器上登录 X

### 导航到文章编辑器 ```bash # Open new article agent-browser --cdp 18800 navigate "https://x.com/compose/article"

# Take snapshot to see current state agent-browser --cdp 18800 snapshot ```

### 粘贴内容 ```bash # Put content in clipboard cat article.txt | pbcopy

# Click content area, select all, paste agent-browser --cdp 18800 click '[contenteditable="true"]' agent-browser --cdp 18800 press "Meta+a" agent-browser --cdp 18800 press "Meta+v" ```

### 上传封面图片 ```bash # Upload to file input agent-browser --cdp 18800 upload 'input[type="file"]' /path/to/cover.png

# Wait for Edit media dialog, click Apply agent-browser --cdp 18800 snapshot | grep -i apply agent-browser --cdp 18800 click @e5 # Apply button ref ```

### 发布 ```bash # Find and click Publish button agent-browser --cdp 18800 snapshot | grep -i publish agent-browser --cdp 18800 click @e35 # Publish button ref

# Confirm in dialog agent-browser --cdp 18800 click @e5 # Confirm ```

### 清理(重要!) ```bash # Close tab after publishing agent-browser --cdp 18800 tab list agent-browser --cdp 18800 tab close 1 ```

### 故障排除:过时的元素引用

如果由于引用过时导致点击失败,请使用 JS 评估: ```bash agent-browser --cdp 18800 evaluate "(function() { const btns = document.querySelectorAll('button'); for (let btn of btns) { if (btn.innerText.includes('Publish')) { btn.click(); return 'clicked'; } } return 'not found'; })()" ```

## 内容准备脚本

### 将 Markdown 转换为 X 友好格式

```bash # scripts/format-for-x.sh #!/bin/bash # Converts markdown to X Articles format

INPUT="$1" OUTPUT="${2:-${INPUT%.md}-x-ready.txt}"

cat "$INPUT" | \ # Remove markdown headers, keep text sed 's/^## /\n/g' | \ sed 's/^### /\n/g' | \ sed 's/^# /\n/g' | \ # Remove markdown bold/italic sed 's/\*\*//g' | \ sed 's/\*//g' | \ # Remove em dashes sed 's/ — /: /g' | \ sed 's/—/:/g' | \ # Join lines within paragraphs (keeps blank lines as separators) awk 'BEGIN{RS=""; FS="\n"; ORS="\n\n"} {gsub(/\n/, " "); print}' \ > "$OUTPUT"

echo "Created: $OUTPUT" ```

## 发布前检查清单

- [ ] 钩子在第一行就抓住了注意力 - [ ] 尽早处理异议 - [ ] 包含时间估算的逐步指南 - [ ] 包含即时收获部分 - [ ] 结尾有 CTA - [ ] 没有破折号(—) - [ ] 句子合并在单行上 - [ ] 封面图片 5:2 宽高比 - [ ] 嵌入内容引用为“见下文” - [ ] 校对 AI 腔调语言

## 可引用的推文模式

用于推广您的文章:

**结果 + 代价:** ``` I gave an AI agent full access to my MacBook. It checks email, manages calendar, pushes code. Costs $20/month. A VA costs $2000. ```

**你不需要 X:** ``` You don't need a Mac Mini. You don't need a server. I'm running my AI agent on an old MacBook Air from a drawer. ```

**差距警告:** ``` The gap between 'has AI agent' and 'doesn't' is about to get massive. I set mine up in 15 minutes. ```

**紧迫感:** ``` Most people will bookmark this and never set it up. Don't be most people. The window is closing. ```

## 示例工作流

1. **撰写文章**,使用 Markdown 并包含清晰的章节 2. **运行格式脚本**,转换为 X 友好的纯文本 3. **生成封面图片**,使用 DALL-E(1792x716 或 5:2 比例) 4. **通过浏览器自动化打开 X 文章编辑器** 5. **粘贴内容**并在编辑器中手动添加章节标题 6. **通过文件输入上传封面图片** 7. **在章节分隔处添加内文图片** 8. **插入嵌入内容**(它们会出现在底部) 9. **预览并校对** 10. **发布** 11. **发布推广推文**,包含钩子 + 文章链接

## 相关技能

- `bird` - 用于发布推文的 X/Twitter CLI - `de-ai-ify` - 从文本中去除 AI 行话 - `ai-pdf-builder` - 生成 PDF(用于吸铁石)

---

由 [@NextXFrontier](https://x.com/NextXFrontier) 构建

更多产品