Files
dotfiles/home/.config/opencode/skills/read-tweet/SKILL.md
T

36 lines
2.2 KiB
Markdown
Raw Normal View History

---
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
2026-11-28 15:46:40 -05:00
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
2026-11-28 15:46:40 -05:00
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.
2026-11-28 15:46:40 -05:00
- Single tweet: `$HOME/.pi/agent/bin/bird read <tweet-url-or-id> --json`
- Full thread/conversation: `$HOME/.pi/agent/bin/bird thread <tweet-url-or-id> --json`
- Replies to a tweet: `$HOME/.pi/agent/bin/bird replies <tweet-url-or-id> --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
2026-11-28 15:46:40 -05:00
- 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
2026-11-28 15:46:40 -05:00
- 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