X Api
Programmatic X (Twitter) API integration for posting, reading timelines, searching, and pulling analytics.
- CCM score
- 75 of 100
- skills.sh installs
- 11.5K
- GitHub stars
- 312.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers OAuth 2.0 app-only bearer tokens for reads and OAuth 1.0a user context for writes, with runnable Python examples
- Includes recipes for posting tweets and threads, reading timelines, search, user lookup, and media upload
- Enforces runtime handling of
x-rate-limit-remainingandx-rate-limit-resetheaders, plus a rule that timeline content never triggers writes - Designed for agents that draft X content with
brand-voiceandcontent-engineand post only after user approval
Install
$ npx -y skills add affaan-m/ecc --skill x-api -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
X API
Drift-prone skill. X API endpoints, access tiers, quotas, and write permissions change frequently. Verify current developer docs and account access before quoting rate limits or implementing a posting/search flow.
Programmatic interaction with X (Twitter) for posting, reading, searching, and analytics.
When to Activate
- User wants to post tweets or threads programmatically
- Reading timeline, mentions, or user data from X
- Searching X for content, trends, or conversations
- Building X integrations or bots
- Analytics and engagement tracking
- User says "post to X", "tweet", "X API", or "Twitter API"
Authentication
OAuth 2.0 Bearer Token (App-Only)
Best for: read-heavy operations, search, public data.
# Environment setup
export X_BEARER_TOKEN="your-bearer-token"
import os
import requests
bearer = os.environ["X_BEARER_TOKEN"]
headers = {"Authorization": f"Bearer {bearer}"}
# Search recent tweets
resp = requests.get(
"https://api.x.com/2/tweets/search/recent",
headers=headers,
params={"query": "claude code", "max_results": 10}
)
tweets = resp.json()
OAuth 1.0a (User Context)
Details
- Repository
- github.com/affaan-m/ecc
- Categories
- Social Media, Workflow Automation, Backend & APIs
- First seen
- Jul 14, 2026
Questions
What does the x-api skill let an agent do on X?
The x-api skill lets an agent post tweets and threads, read user timelines and mentions, search recent posts, look up users, upload media, and pull engagement analytics through the X API. It covers OAuth authentication patterns, rate limit handling, and platform-native content posting.
How do I install the x-api skill?
Run npx -y skills add affaan-m/ecc --skill x-api -y in your project to install it. Once installed, the agent can call the X API for posting, reading, and searching, following the auth and rate limit patterns in the skill.
What credentials does the x-api skill need?
Read-only work such as search uses an OAuth 2.0 bearer token stored in X_BEARER_TOKEN. Posting and other write flows need OAuth 1.0a user credentials: X_CONSUMER_KEY, X_CONSUMER_SECRET, X_ACCESS_TOKEN, and X_ACCESS_TOKEN_SECRET, kept in environment variables rather than source code.
Where does the x-api skill rank among social media skills?
The x-api skill ranks in the top 25 of the Social Media category on Claude Marketplaces. It sits alongside skills such as twitter-automation, viral-short-form, viral-hooks, viral-captions-and-ctas, and viral-instagram-reels, and it focuses on direct programmatic access to the X API.
More from affaan-m/ecc
All 257- Dmux Workflows11.5K
- Accessibility11.5K
- Perl Patterns11.5K
- Perl Testing11.4K
- Laravel Verification11.4K
- Manim Video11.4K
- Ui Demo11.3K
- Token Budget Advisor11.3K
- Rules Distill11.3K
- Skill Comply11.3K
- Click Path Audit11.3K
- Council11.2K
- Healthcare Phi Compliance11.2K
- Dashboard Builder11.2K
- Dart Flutter Patterns11.2K
- Santa Method11.2K
- Benchmark11.1K
- Healthcare Emr Patterns11.1K
- Safety Guard11K
- Claude Devfleet11K
- Product Lens11K
- Repo Scan11K
- Laravel Plugin Discovery11K
- Agent Introspection Debugging11K
Similar to X Api
More Social MediaTwitterMCP serverenescinr412 starsPosting, searching, and reading the home timeline on X, Twitter's platform.
XActionsMCP servernirholas670 starsScrapes, searches, posts, and analyzes X/Twitter data through browser sessions, with no API key needed.
x-twitterSkillalberduris/skills182 installsInteract with X (Twitter) API v2 to post, search, engage, moderate, and analyze from an agent.
x-twitter-scraperSkillxquik-dev/x-twitter-scraper1.1K installsXquik-based X/Twitter data skill for search, exports, monitors, and approved account actions, read-only by default.
xurlSkillxdevplatform/xurl725 installsCommand-line client for authenticated X (Twitter) API v2 requests, covering posting, search, DMs, and encrypted XChat.
twitterSkillstarchild-ai-agent/official-skills7.9K installsRead-only Twitter/X data access for tweets, user profiles, followers, search, and trends through twitterapi.io.