What does this skill do?

The X Skill API integration allows you to interact with the X (Twitter) API to automate the posting of tweets and threads, read timelines and mentions, search for content and trends, and extract engagement metrics. It uses OAuth 2.0 Bearer Token for read operations and OAuth 1.0a for actions that require user context, while robustly handling rate limits and errors.

Automatic Posting
Post tweets and threads programmatically using OAuth 1.0a with user context.
Reading Timelines
View any user's timeline, mentions, and public data on X using a Bearer Token.
Content Search
Search for recent conversations, trends, and tweets by query using advanced filters.
Engagement Analytics
Extract public metrics (retweets, likes, replies) and the dates of each post.

Usage examples

✍️ Post a tweet
Post a tweet that says "Hello from the X API integration" using my OAuth credentials.
🧵 Create a thread
Create a thread of 3 tweets about this week's artificial intelligence news.
🔍 Search for recent tweets
Find the 10 most recent tweets about "artificial intelligence" that aren't retweets and show me their metrics.
📊 Analyze engagement
Read my timeline from the last 24 hours and give me a summary of the tweets with the highest engagement.

Features

Dual OAuth It supports OAuth 2.0 Bearer Tokens for read operations and OAuth 1.0a for write operations with user context.
Posting Tweets and Threads Create individual tweets, multi-message threads, and attach media via the v1.1 endpoint.
Advanced Search Filter tweets by query, exclude retweets, and request specific fields such as public metrics and date.
Interest Rate Limit Management Check the `x-rate-limit-remaining` and `x-rate-limit-reset` headers to apply automatic backoff.
Error Handling Processes HTTP status codes (429, 403, etc.) and extracts detailed messages from the response body.

Frequently asked questions

For read access, you need X_BEARER_TOKEN. For write access (posting tweets), you need X_CONSUMER_KEY, X_CONSUMER_SECRET, X_ACCESS_TOKEN, and X_ACCESS_TOKEN_SECRET, all of which must be set as environment variables.
It depends on your developer account's access level. Endpoints, quotas, and permissions change frequently; be sure to check the official X developer documentation before implementing write or search flows.
Yes. The skill uses the v1.1 media upload endpoint (upload.twitter.com) to obtain a media_id and then attaches it to the tweet using the v2 API.
The skill checks the `x-rate-limit-remaining` and `x-rate-limit-reset` headers in each response to apply automatic backoff when necessary.
X API Integration — Automate Tweets, Threads, and Analytics with Claude AI

¿Prefieres escuchar el contenido? Genera la narración de audio con un clic.