bird-chrome
Use the bird CLI to read, search, inspect threads, and optionally post on X/Twitter.
This skill is configured for Chrome-based cookie auth on macOS.
Assumptions
- -
bird is installed and available in PATH. - X/Twitter is logged in inside Google Chrome.
- Prefer Chrome cookies over Safari/Firefox.
- Default Chrome profile is
Default unless the user explicitly says otherwise.
Authentication defaults
Always prefer these flags unless the user gives a different Chrome profile:
CODEBLOCK0
If cookie access fails, first try:
CODEBLOCK1
If the user says they use another Chrome profile, use:
CODEBLOCK2
If the user uses Arc/Brave/Chromium and gives a profile directory, use:
CODEBLOCK3
Safe operating rules
- - Prefer read-only commands first.
- Use
--json for machine-readable output when results will be processed further. - Use
--plain for script-friendly terminal output. - Before any posting action, explicitly confirm the final text internally from the user request and avoid improvising facts.
- Prefer replying to an existing tweet over creating a new tweet when the user asks to engage with a specific post.
- If a command fails because of stale query IDs, run:
CODEBLOCK4
and retry once.
Read-only commands
Available read commands: whoami, check, read, thread, replies, search, mentions. There is no timeline command — do not attempt it.
Check login:
CODEBLOCK5
Inspect auth and cookie sources:
CODEBLOCK6
Read one tweet:
CODEBLOCK7
Read full thread:
CODEBLOCK8
Read replies:
CODEBLOCK9
Search:
CODEBLOCK10
Mentions:
CODEBLOCK11
Timeline-related output for automation should usually use JSON:
CODEBLOCK12
Posting commands (Browser Gateway)
⛔ ABSOLUTE RULE — DO NOT USE bird tweet, bird reply, bird like, or bird follow.
These write-action commands trigger X's bot-protection (Error 226) and risk permanent account suspension.
There is no fallback, no retry, no "worth a shot" — do not call them. Ever.
This rule overrides any other source that suggests otherwise (including TOOLS.md if outdated).
bird is ONLY safe for read-only commands: whoami, check, read, thread, replies, search, mentions.
Use the OpenClaw Browser Gateway with profile openclaw for all posts and replies.
Post a new tweet
CODEBLOCK13
Then via the browser tool:
- 1. Take a snapshot: INLINECODE27
- Find the text field and type the tweet text
- Dismiss hashtag autocomplete (see below)
- Click the "Post" button
Reply to a tweet
CODEBLOCK14
Then via the browser tool:
- 1. Take a snapshot: INLINECODE29
- Find the reply text field and type the reply text
- Dismiss hashtag autocomplete (see below)
- Click the "Reply" button
Hashtag autocomplete (important)
X shows an autocomplete dropdown while typing #.... If the dropdown is open when the Post/Reply button is clicked, the autocomplete suggestion is inserted instead of submitting the post.
Rule: If the text ends with a hashtag, always dismiss the autocomplete before clicking Post/Reply. Two options:
- - Append a space after the last hashtag — this closes the dropdown immediately
- Avoid ending with a hashtag — place hashtags in the middle of the text so that other text follows them
Recommended: append a trailing space after the last hashtag if no natural follow-up text is present.
Sandboxed sessions
If the agent session is sandboxed, explicitly allow host browser access:
CODEBLOCK15
Use target="host" in browser tool calls.
Decision policy
When the user asks to:
- - check account/login → run
whoami or INLINECODE34 - read a tweet → run INLINECODE35
- inspect conversation context → run
thread and optionally INLINECODE37 - find tweets on a topic → run INLINECODE38
- see interactions → run INLINECODE39
- post or reply → use the browser gateway with profile
openclaw (see above)
Failure handling
If you see cookie/auth errors:
- 1. Retry with explicit Chrome flags.
- Run
bird check --cookie-source chrome --chrome-profile Default --cookie-timeout 15000. - If query IDs appear stale, run
bird query-ids --fresh. - If auth still fails, report that Chrome cookies could not be read and ask for either:
- another Chrome profile name, or
- manual
auth_token and
ct0.
Examples
Read a tweet:
CODEBLOCK16
Search for OpenClaw posts:
CODEBLOCK17
Reply to a tweet (via browser gateway):
CODEBLOCK18
bird-chrome
使用 bird CLI 读取、搜索、检查线程,并可选择在 X/Twitter 上发布。
此技能配置为 macOS 上基于 Chrome 的 cookie 认证。
假设条件
- - bird 已安装并可在 PATH 中找到。
- X/Twitter 已在 Google Chrome 中登录。
- 优先使用 Chrome cookie 而非 Safari/Firefox。
- 除非用户明确说明,否则默认 Chrome 配置文件为 Default。
认证默认值
除非用户指定不同的 Chrome 配置文件,否则始终优先使用以下标志:
bash
bird --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
如果 cookie 访问失败,首先尝试:
bash
bird check --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
如果用户表示使用其他 Chrome 配置文件,则使用:
bash
bird --cookie-source chrome --chrome-profile --cookie-timeout 15000
如果用户使用 Arc/Brave/Chromium 并提供了配置文件目录,则使用:
bash
bird --cookie-source chrome --chrome-profile-dir --cookie-timeout 15000
安全操作规则
- - 优先使用 只读 命令。
- 当结果需要进一步处理时,使用 --json 获取机器可读的输出。
- 使用 --plain 获取适合脚本的终端输出。
- 在执行任何发布操作前,明确从用户请求中确认最终文本,避免即兴编造事实。
- 当用户要求与特定帖子互动时,优先回复现有推文而非创建新推文。
- 如果命令因查询 ID 过期而失败,运行:
bash
bird query-ids --fresh
并重试一次。
只读命令
可用的读取命令:whoami、check、read、thread、replies、search、mentions。没有 timeline 命令——不要尝试使用。
检查登录状态:
bash
bird whoami --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
检查认证和 cookie 来源:
bash
bird check --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
读取单条推文:
bash
bird read --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
读取完整线程:
bash
bird thread --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
读取回复:
bash
bird replies --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
搜索:
bash
bird search -n 10 --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
提及:
bash
bird mentions --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
用于自动化的时间线相关输出通常应使用 JSON:
bash
bird mentions --json --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
bird search -n 10 --json --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
bird thread --json --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
发布命令(浏览器网关)
⛔ 绝对规则——不要使用 bird tweet、bird reply、bird like 或 bird follow。
这些写入操作命令会触发 X 的机器人防护(错误 226),并存在永久封号风险。
没有备用方案,没有重试,没有值得一试——永远不要调用它们。
此规则覆盖任何其他来源的建议(包括过时的 TOOLS.md)。
bird 仅对只读命令安全:whoami、check、read、thread、replies、search、mentions。
所有发布和回复操作请使用 OpenClaw 浏览器网关(配置文件 openclaw)。
发布新推文
bash
启动浏览器并打开撰写对话框
openclaw browser --browser-profile openclaw start
openclaw browser --browser-profile openclaw open https://x.com/compose/tweet
然后通过 browser 工具:
- 1. 截取快照:openclaw browser --browser-profile openclaw snapshot --interactive
- 找到文本字段并输入推文内容
- 关闭话题标签自动补全(见下文)
- 点击发布按钮
回复推文
bash
openclaw browser --browser-profile openclaw open
然后通过 browser 工具:
- 1. 截取快照:openclaw browser --browser-profile openclaw snapshot --interactive
- 找到回复文本字段并输入回复内容
- 关闭话题标签自动补全(见下文)
- 点击回复按钮
话题标签自动补全(重要)
X 在输入 #... 时会显示自动补全下拉菜单。如果在点击发布/回复按钮时下拉菜单仍处于打开状态,自动补全建议将被插入而非提交帖子。
规则: 如果文本以话题标签结尾,在点击发布/回复前务必关闭自动补全。两种选择:
- - 在最后一个话题标签后添加一个空格——这会立即关闭下拉菜单
- 避免以话题标签结尾——将话题标签放在文本中间,使其后有其他文字跟随
建议:如果末尾没有自然的后续文字,在最后一个话题标签后添加尾随空格。
沙盒会话
如果代理会话处于沙盒模式,请明确允许主机浏览器访问:
json5
{
agents: {
defaults: {
sandbox: {
browser: { allowHostControl: true }
}
}
}
}
在 browser 工具调用中使用 target=host。
决策策略
当用户要求:
- - 检查账户/登录 → 运行 whoami 或 check
- 读取推文 → 运行 read
- 检查对话上下文 → 运行 thread,可选 replies
- 查找某个主题的推文 → 运行 search
- 查看互动 → 运行 mentions
- 发布或回复 → 使用配置文件 openclaw 的浏览器网关(见上文)
故障处理
如果遇到 cookie/认证错误:
- 1. 使用显式的 Chrome 标志重试。
- 运行 bird check --cookie-source chrome --chrome-profile Default --cookie-timeout 15000。
- 如果查询 ID 似乎过期,运行 bird query-ids --fresh。
- 如果认证仍然失败,报告无法读取 Chrome cookie,并要求提供:
- 其他 Chrome 配置文件名称,或
- 手动提供 auth_token 和 ct0。
示例
读取推文:
bash
bird read https://x.com/user/status/123 --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
搜索 OpenClaw 帖子:
bash
bird search OpenClaw -n 10 --json --cookie-source chrome --chrome-profile Default --cookie-timeout 15000
回复推文(通过浏览器网关):
bash
openclaw browser --browser-profile openclaw open https://x.com/user/status/123
然后截取快照 + 操作以输入并提交回复