X Brand Operator
End-to-end X/Twitter brand account automation using xurl (X API v2) with browser fallback. No extra API keys beyond xurl app config.
Core Tools
- -
xurl --app <app> — Post, reply, like, follow, search via X API v2 - INLINECODE1 — Fallback for posting/replying when xurl fails (profile: user)
- INLINECODE2 — Schedule recurring tasks (post, engage, report)
- INLINECODE3 — Send Telegram alerts on failures or completions
Posting a Tweet
Primary (xurl):
CODEBLOCK0
Fallback (browser, only if xurl fails):
- 1.
browser open → https://x.com/compose/post (profile: user) - Wait 4 seconds
- INLINECODE6 → find text input ref
- INLINECODE7 → click input, type tweet
- INLINECODE8 → find Post button ref
- INLINECODE9 → click Post
- INLINECODE10 → confirm success
Rule: Try each method once only. On failure → notify via Telegram, include draft text, then exit. Never loop.
Replying to a Tweet
Primary: INLINECODE11
Fallback: Open tweet URL in browser → snapshot → click Reply → type → submit.
Content Quality Standard (score before posting)
| Criterion | Weight |
|---|
| Hook strength | 25 pts |
| Value density |
25 pts |
| Platform fit | 20 pts |
| CTA clarity | 15 pts |
| Conciseness | 15 pts |
Minimum score: 70/100. Rewrite once if below threshold; do not post if still failing.
Format rules: Single paragraph, no line breaks, ≤ 280 chars, 1–2 hashtags, end with brand URL.
Content Pillar Rotation (daily posting)
Rotate through pillars by day of week. See references/content-strategy.md for pillar definitions, templates, and tone guide. Adapt pillars to the brand's positioning.
Keyword Engagement (weekly)
Search target keywords → filter genuine posts (skip bots/ads) → like + reply + follow author.
Reply quality rules:
- - Acknowledge the person's pain point first
- Add 2–4 sentences of genuine value
- Naturally mention the brand (no hard sell)
- Never use "Great post!" / "So true!" filler
See references/engagement-playbook.md for keyword lists and reply templates.
Cron Job Setup
See references/cron-config.md for recommended schedules and full agentTurn prompt templates for:
- - Morning post (UTC 14:00 daily)
- Evening post (UTC 20:00 daily)
- Weekly keyword engagement (Monday UTC 10:00)
- Weekly Substack draft (Wednesday UTC 13:00)
- Weekly report (Sunday UTC 21:00)
Failure Handling
| Situation | Action |
|---|
| xurl fails | Switch to browser fallback immediately |
| Browser also fails |
Send Telegram alert with draft text, exit |
| Any step in engagement fails | Skip that item, continue to next |
| Always | Send Telegram summary at end of engagement/report runs |
Never retry more than once per method. Never loop.
X品牌运营官
使用xurl(X API v2)配合浏览器回退机制,实现端到端的X/Twitter品牌账号自动化运营。除xurl应用配置外,无需额外API密钥。
核心工具
- - xurl --app <应用名> — 通过X API v2发布、回复、点赞、关注、搜索
- browser — 当xurl失败时的发布/回复回退方案(用户配置文件)
- cron — 调度周期性任务(发布、互动、报告)
- message — 失败或完成时发送Telegram提醒
发布推文
主要方式(xurl):
bash
xurl --app <应用名> post <推文内容>
回退方案(浏览器,仅在xurl失败时使用):
- 1. browser open → https://x.com/compose/post(用户配置文件)
- 等待4秒
- browser snapshot → 查找文本输入框引用
- browser act → 点击输入框,输入推文
- browser snapshot → 查找发布按钮引用
- browser act → 点击发布
- browser snapshot → 确认成功
规则: 每种方法仅尝试一次。失败时 → 通过Telegram通知,附带草稿文本,然后退出。绝不循环。
回复推文
主要方式: xurl --app <应用名> reply <推文ID> <回复内容>
回退方案: 在浏览器中打开推文URL → 截图 → 点击回复 → 输入内容 → 提交。
内容质量标准(发布前评分)
25分 |
| 平台适配度 | 20分 |
| 行动号召清晰度 | 15分 |
| 简洁性 | 15分 |
最低分数:70/100。 低于阈值时重写一次;若仍不达标则不发布。
格式规则: 单段落,无换行,≤280字符,1-2个话题标签,以品牌URL结尾。
内容支柱轮换(每日发布)
按星期轮换内容支柱。支柱定义、模板和语气指南请参见references/content-strategy.md。根据品牌定位调整支柱内容。
关键词互动(每周)
搜索目标关键词 → 筛选真实帖子(跳过机器人/广告)→ 点赞+回复+关注作者。
回复质量规则:
- - 首先认可对方的痛点
- 添加2-4句有真实价值的内容
- 自然提及品牌(不硬性推销)
- 绝不使用好帖子!/说得太对了!等填充语
关键词列表和回复模板请参见references/engagement-playbook.md。
Cron任务设置
推荐时间表和完整agentTurn提示模板请参见references/cron-config.md,涵盖:
- - 早间发布(每日UTC 14:00)
- 晚间发布(每日UTC 20:00)
- 每周关键词互动(周一UTC 10:00)
- 每周Substack草稿(周三UTC 13:00)
- 每周报告(周日UTC 21:00)
失败处理
| 情况 | 操作 |
|---|
| xurl失败 | 立即切换至浏览器回退方案 |
| 浏览器也失败 |
发送Telegram提醒并附带草稿文本,退出 |
| 互动中任何步骤失败 | 跳过该项,继续处理下一项 |
| 始终执行 | 在互动/报告运行结束时发送Telegram摘要 |
每种方法最多重试一次。绝不循环。