Twitter/X data: fetch tweets, search, user profiles, followers, replies, trends. Use for any x.com or twitter.com URL or lookup (e.g. summarize this tweet, recent posts by @vitalikbuterin, search $SOL min_faves:50).
What this skill does
# Twitter / X (script-mode)
Read-only access to twitterapi.io endpoints. 13 functions covering tweets,
users, followers, replies, threads, quotes, articles, and trends.
All requests go through sc-proxy via `core.http_client.proxied_get`. The
`TWITTER_API_KEY` env var is auto-injected server-side, no local key needed
on the agent machine.
## Script Usage
Standard invocation pattern:
```bash
python3 - <<'EOF'
import sys, json
sys.path.insert(0, "/data/workspace/skills/twitter")
from exports import twitter_user_info, twitter_user_tweets
profile = twitter_user_info(username="vitalikbuterin")
print(json.dumps(profile, indent=2))
recent = twitter_user_tweets(username="vitalikbuterin")
print(f"got {len(recent.get('tweets', []))} tweets")
EOF
```
Tweet ID extraction from URL: the last path segment of any
`x.com/{user}/status/{id}` or `twitter.com/{user}/status/{id}` URL is the
tweet ID. Pass it as a string (Python int will lose precision on long IDs).
## Function Reference (signatures)
All 13 functions live in `exports.py`. Returns are dicts straight from
twitterapi.io — keys vary per endpoint, inspect once before scripting.
### Tweet endpoints
| Function | Description |
|---|---|
| `twitter_search_tweets(query, cursor=None)` | Advanced search. Operators: `from:user`, `to:user`, `#tag`, `$cashtag`, `lang:en`, `has:media`, `has:links`, `is:reply`, `min_faves:N`, `since:YYYY-MM-DD`, `until:YYYY-MM-DD`. |
| `twitter_get_tweets(tweet_ids)` | Fetch one or more tweets by ID. `tweet_ids` = list of strings (also accepts comma-string). |
| `twitter_tweet_replies(tweet_id, cursor=None)` | Replies to a tweet. |
| `twitter_tweet_retweeters(tweet_id, cursor=None)` | Users who retweeted. |
| `twitter_tweet_thread_context(tweet_id)` | Full thread context (parents + direct replies). |
| `twitter_tweet_quote(tweet_id, cursor=None)` | Quote tweets. |
| `twitter_get_article(tweet_id)` | Long-form X article body. |
| `twitter_get_trends(woeid=None, country=None, category=None, limit=None)` | Trending topics; all filters optional. |
### User endpoints
| Function | Description |
|---|---|
| `twitter_user_info(username)` | Profile: bio, follower/following counts, tweet count, verified. |
| `twitter_user_tweets(username, cursor=None)` | User's recent tweets. |
| `twitter_user_followers(username, cursor=None)` | Follower list. |
| `twitter_user_followings(username, cursor=None)` | Accounts followed. |
| `twitter_search_users(query, cursor=None)` | Search users by name/keyword. |
`username` is the handle WITHOUT `@` (e.g. `"elonmusk"`, not `"@elonmusk"`).
Pagination: when a response includes `next_cursor`, pass it back as `cursor`
on the next call.
## When to use this skill
- ANY `x.com/...` or `twitter.com/...` URL → start here, NOT `web_fetch`
(Twitter blocks scrapers).
- Single tweet detail → `twitter_get_tweets([tweet_id])`.
- "What's @user been posting?" → `twitter_user_tweets`.
- KOL discovery / cashtag mentions → `twitter_search_tweets("$SOL min_faves:50")`.
- Trending topics → `twitter_get_trends`.
## Error handling
- `402 Credits is not enough` → upstream proxy credits exhausted; tell user
to top up. Don't retry.
- `429` → rate limited; surface to user, don't auto-retry.
- `404 user not found` → suggest verifying the handle spelling.
## Version Policy (hard rule)
This skill is **script-mode** (`delivery: script`). It does NOT register
runtime tools — agent must `read_file` SKILL.md and call functions via
`bash` + `python3`. The legacy `tools.py` / `__init__.py` files are kept
for backward compatibility but are no longer the preferred entry point.
Bump rules:
- Any signature change, env-var change, or sc-proxy contract change → MAJOR
- New function added, response schema clarified → MINOR
- Bug fix or doc-only change → PATCH
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.