x
X (Twitter) API for tweets and profiles. Use when user mentions "X", "Twitter", "x.com", "twitter.com", shares a tweet link, "check X", or asks about social media posts.
Best use case
x is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
X (Twitter) API for tweets and profiles. Use when user mentions "X", "Twitter", "x.com", "twitter.com", shares a tweet link, "check X", or asks about social media posts.
Teams using x should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/x/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How x Compares
| Feature / Agent | x | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
X (Twitter) API for tweets and profiles. Use when user mentions "X", "Twitter", "x.com", "twitter.com", shares a tweet link, "check X", or asks about social media posts.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
## How to Use ### 1. Get Authenticated User Profile ```bash xurl whoami ``` ### 2. Look Up User by Username > **Note:** Replace `elonmusk` with the actual username. Leading `@` is optional. ```bash xurl user elonmusk ``` ### 3. Look Up User by ID > **Note:** Replace `12345` with the actual user ID. You can obtain user IDs from other endpoint responses. ```bash xurl /2/users/12345?user.fields=id,name,username,description,public_metrics,created_at ``` ### 4. Look Up Multiple Users Get profiles for multiple users at once (up to 100): > **Note:** Replace the IDs with actual user IDs, comma-separated. ```bash xurl '/2/users?ids=12345,67890&user.fields=id,name,username,description,public_metrics' ``` ### 5. Get a Tweet by ID > **Note:** Replace `1234567890` with the actual tweet ID. Full URLs like `https://x.com/user/status/1234567890` also work. ```bash xurl read 1234567890 ``` ### 6. Get Multiple Tweets Get details for multiple tweets at once (up to 100): > **Note:** Replace the IDs with actual tweet IDs, comma-separated. ```bash xurl '/2/tweets?ids=1234567890,0987654321&tweet.fields=created_at,public_metrics,author_id,text&expansions=author_id&user.fields=name,username' ``` ### 7. Get User's Tweets (Timeline) Get recent tweets posted by the authenticated user: ```bash xurl timeline -n 10 ``` Query parameters for raw API (if you need another user's timeline): ```bash xurl '/2/users/USER_ID/tweets?max_results=10&tweet.fields=created_at,public_metrics,text&exclude=retweets,replies' ``` - `max_results` - 5 to 100 (default: 10) - `start_time` / `end_time` - ISO 8601 datetime filter - `since_id` / `until_id` - Tweet ID boundaries - `pagination_token` - For paginating results - `exclude` - Comma-separated: `retweets`, `replies` ### 8. Get User's Mentions ```bash xurl mentions -n 10 ``` ### 9. Search Recent Tweets Search for tweets from the past 7 days: > **Note:** Replace the query with your search terms. ```bash xurl search "openai lang:en -is:retweet" -n 10 ``` Common search operators: - `from:username` - Tweets from a specific user - `to:username` - Tweets replying to a user - `@username` - Tweets mentioning a user - `#hashtag` - Tweets with a hashtag - `has:links` / `has:images` / `has:videos` - Media filters - `-is:retweet` - Exclude retweets - `-is:reply` - Exclude replies - `lang:en` - Filter by language - `conversation_id:123` - Tweets in a conversation thread ### 10. Get User's Followers > **Note:** Replace `elonmusk` with the actual username. ```bash xurl followers --of elonmusk -n 20 ``` ### 11. Get User's Following > **Note:** Replace `elonmusk` with the actual username. ```bash xurl following --of elonmusk -n 20 ``` ## Pagination Most list endpoints support pagination. For shortcut commands, use `-n` to control result count. For raw API endpoints, check the `meta.next_token` field in the response: ```bash xurl '/2/tweets/search/recent?query=example&max_results=10' | jq .meta ``` Use the returned `next_token` value as `pagination_token` in the next request to get more results. ## Common user.fields | Field | Description | |-------|-------------| | `id` | Unique user ID | | `name` | Display name | | `username` | Handle (without @) | | `description` | Bio text | | `created_at` | Account creation date | | `public_metrics` | Followers, following, tweet, and listed counts | | `profile_image_url` | Avatar URL | | `verified` | Verification status | | `location` | User-defined location | | `url` | User-defined URL | ## Common tweet.fields | Field | Description | |-------|-------------| | `id` | Unique tweet ID | | `text` | Tweet content | | `created_at` | Post timestamp | | `author_id` | Author's user ID | | `public_metrics` | Retweets, replies, likes, quotes, bookmarks, impressions | | `conversation_id` | Thread root tweet ID | | `lang` | Detected language | | `referenced_tweets` | Retweet/quote/reply references | | `entities` | URLs, hashtags, mentions, cashtags | ## Guidelines 1. **Read-only access**: This connector only grants read permissions; you cannot post, like, or retweet 2. **Rate limits**: X API has strict rate limits; avoid rapid successive calls 3. **Prefer shortcut commands**: Use `xurl search`, `xurl user`, `xurl read` etc. over raw API paths when possible 4. **Raw API fallback**: For bulk lookups or advanced queries, use `xurl '/2/...'` with query parameters 5. **Fields are opt-in (raw API only)**: Raw endpoints only return `id` and `text` by default; specify `tweet.fields` and `user.fields` for richer data. Shortcut commands include common fields automatically 6. **7-day search window**: The recent search endpoint only covers the past 7 days 7. **Pagination**: Use `-n` for shortcut commands, `max_results` and `pagination_token` for raw API
Related Skills
zoom
Zoom API for managing meetings, webinars, cloud recordings, and user data. Use when user mentions "Zoom", "Zoom meeting", "join URL", "cloud recording", or "webinar".
zeptomail
ZeptoMail API for transactional email. Use when user mentions "ZeptoMail", "transactional email", "send email", or Zoho email.
zep
Zep API for long-term memory and conversation history management in AI agents. Use when user mentions "Zep", "conversation memory", "session memory", "memory search", "user facts", "agent memory", or "long-term memory".
zendesk
Zendesk API for customer support. Use when user mentions "Zendesk", "support ticket", "customer service", or help desk.
zapsign
ZapSign API for e-signatures. Use when user mentions "ZapSign", "e-signature", "sign document", or Brazilian e-signature.
zapier
Zapier API for workflow automation. Use when user mentions "Zapier", "zap", "automation", or asks about connecting apps.
youtube
YouTube API for videos and channels. Use when user mentions "YouTube", "youtube.com", "youtu.be", shares a video link, "channel stats", or asks about video content.
xero
Xero API for accounting. Use when user mentions "Xero", "accounting", "invoices", "bookkeeping", or asks about financial management.
wrike
Wrike API for project management. Use when user mentions "Wrike", "wrike.com", shares a Wrike link, "Wrike task", or asks about Wrike workspace.
workos
WorkOS API for enterprise SSO, SCIM directory sync, RBAC fine-grained authorization, and audit logs. Use when user mentions "WorkOS", "SSO", "SAML", "SCIM", "directory sync", "enterprise authentication", "audit log", or "fine-grained authorization".
workflow-migration
VM0 migration helper for Claude Code workflows. Use when user says "migrate to VM0", "move to VM0", "convert skill to VM0", or asks about migrating local Claude Code workflows.
wix
Wix API for website management. Use when user mentions "Wix", "wix.com", "wixsite.com", shares a Wix link, "Wix site", or asks about Wix CMS.