Agent skill · marketing growth · affaan-m

x-api

X/Twitter API integration for posting tweets, threads, reading timelines, search, and analytics. Covers OAuth auth patterns, rate limits, and platform-native content posting. Use when the user wants to interact with X programmatically.

Why this skill is useful

Provides specific OAuth patterns and API commands for programmatic interaction with X, which the AI wouldn't reliably generate on its own.

What it needs

Requires x account access. About 3k tokens when loaded. Last updated 2026-08-06. 238,342 stars on the source repository.

What this skill does

X API 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. OAuth 1.0a (User Context) Required for: posting tweets, managing account, DMs, and any write flow. Legacy aliases such as XAPIKEY, XAPISECRET, and XACCESSSECRET may exist in older setups. Prefer the XCONSUMER and XACCESSTOKENSECRET names when documenting or wiring new flows. Core Operations Post a Tweet Post a Thread Read User Timeline Search Tweets Pull Recent Original Posts for Voice Modeling Get User by Username Upload Media and Post Rate Limits X API rate limits vary by endpoint, auth method, and account tier, and they change over time. Always: Check the current X developer docs before hardcoding assumptions Read x-rate-limit-remaining and x-rate-limit-reset headers at runtime Back off automatically instead of relying on static tables in code Error Handling Security Never hardcode tokens. Use environment variables or .env files. Never commit .env files. Add to .gitignore. Rotate tokens if exposed. Regenerate at developer.x.com. Use read-only tokens when write access is not needed. Store OAuth secrets securely — not in source code or logs. Integration with Content Engine Use brand-voice plus content-engine to generate platform-native content, then post via X API: 1. Pull recent original posts when voice matching matters 2. Build or reuse a VOICE PROFILE 3. Generate content with content-engine in X-native format 4. Validate length and thread structure 5. Return the draft for approval unless the user explicitly asked to post now 6. Post via X API only after approval 7. …

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills affaan-m/x-api--a57c81

View the source on GitHub

Browse the @skills marketplace