--- name: read-tweet description: Use when the user asks to read, fetch, or show the content of an X (Twitter) tweet or thread by URL or ID. Triggers on x.com/twitter.com URLs or tweet IDs. Uses the local `bird` CLI to pull content via the browser cookie session. --- # Read X/Twitter Tweet Content with bird When the user asks to read, fetch, view, or summarize a tweet (or thread), use the local `bird` CLI instead of `webfetch`. It authenticates through the Brave cookie session and returns full tweet content and metadata. ## Commands Use `$HOME/.pi/agent/bin/bird`, the Brave-only wrapper. It reads the X cookies from Brave and execs the installed bird. Use an absolute path because PATH can be sparse in non-interactive shells. Do not call `/opt/homebrew/bin/bird` directly, since that skips the wrapper and asks Keychain for Chrome Safe Storage. - Single tweet: `$HOME/.pi/agent/bin/bird read --json` - Full thread/conversation: `$HOME/.pi/agent/bin/bird thread --json` - Replies to a tweet: `$HOME/.pi/agent/bin/bird replies --json` Prefer `--json` for parseable output (author, text, media, created_at, metrics). Drop `--json` only if the user wants pretty-printed terminal output. ## When to use - User pastes an `x.com`/`twitter.com` URL and asks anything about it - User references a tweet by numeric ID - User asks for "the thread", "the replies", or "what does this tweet say" ## When NOT to use - User asks to post, reply, like, bookmark, follow, or search tweets — use other subcommands through the same wrapper (see `$HOME/.pi/agent/bin/bird --help`) - User asks about article content linked FROM a tweet — `bird` only returns tweet text/metadata, not outbound article bodies; fall back to `webfetch` on the linked URL ## Notes - The wrapper reads `auth_token` and `ct0` from Brave only and passes them to bird as env vars. No paid dev account needed. - If the wrapper cannot read Brave Safe Storage, approve the Keychain dialog and retry. Do not switch browsers or call the Homebrew binary directly. - If a fetch fails with auth errors, tell the user to sign in to x.com in Brave and retry - Quote tweets and retweets include the referenced tweet in the JSON payload